Algorithm and Web Application for Automatic Generation of Algebraic Equations for Cognitive Training
Year: 2025
Type: article
Abstract: Introduction. In modern society, maintaining cognitive functions has becomeincreasingly important. Older people face gradual memory decline and reduced thinking speed, whileyounger generations tend to lose mental arithmetic skills due to excessive reliance on calculators anddigital technologies. Existing games for cognitive stimulation (Math Puzzle, Math Fight,Mathemagics) demonstrate the potential of this approach, but share common limitations: no webversions, overloaded interfaces, or strict paid-use conditions, which reduce their accessibility for awide range of users.Purpose. The aim of this work is to analyze existing games for cognitive stimulation, to developa proprietary cross-platform web application, and to describe a custom library for automaticgeneration and verification of algebraic equations based on an Abstract Syntax Tree (AST) parser.Results. Three well-known cognitive training games were analyzed and their advantages anddisadvantages identified. Based on this analysis, a web application was developed with cross-platformand mobile-adaptive support, a REST API architecture, a level system with gradually increasingdifficulty, and an ad-free interface. The core of the application is a proprietary algorithm forgenerating all valid algebraic equations from a given number, implemented using a recursive ASTparser with progressive reduction of operator precedence. To optimize performance, the library wascompiled from Python to a C extension using MyPyc. A comparative RAM consumption analysis usingthe Tracemalloc library demonstrated that the built-in Python eval function produces excessivememory allocations when processing large sets of equations, whereas the custom library maintains asignificantly more stable memory profile.Conclusion. A web application for cognitive training was developed with adaptation for mobiledevices. A custom algorithm and library for generating and verifying algebraic equations wereimplemented and tested. The proprietary AST-based parser outperforms the built-in eval function inmemory efficiency when handling large equation arrays. The practical value of the work lies in itsapplicability for supporting and developing cognitive functions in both elderly people and youth. Thetheoretical contribution consists in the formalization of an equation-generation method using AST andthe analysis of algorithm efficiency in terms of resource consumption.
Author: Yevgeny TATARCHUK
Language: Ukrainian
Subfield: Information Systems
Field: Computer Science
Domain: Physical Sciences
Open Access status: diamond
OpenAlex ID: W7163123748
FWCI:
Cites:
Cited by:
Related to:
