In a programming classroom for beginners, a delicate balance must be struck between teaching the design, implementation, and testing fundamentals of programming and the need for students to find their first programming course enjoyable. A course that focuses solely on the fundamentals is not likely to nourish the excitement a student may have for Computer Science. A course that focuses solely in making programming fun is not likely to have students walk away with a solid grasp of the fundamentals. A very successful approach to strike this balance uses functional video games to motivate the need to learn principles of program design and Computer Science in a context that is of interest and fun for most students. Such an approach has successfully engaged students to learn design and implementation principles using primitive data, finite compound data, structural recursion for compound data of arbitrary size, and abstraction. This article explores how to use a functional video game approach to engage beginning students in problem solving that employs generative and accumulative recursion while at the same time reinforcing the lessons on structural recursion and abstraction. In addition to these two new forms of recursion, beginning students are also introduced to depth-first searching, breadth-first searching, heuristic-based searching, and the use of randomness. The article uses the N-puzzle problem to illustrate how all these topics are seamlessly addressed in the beginner׳s classroom while keeping student enthusiasm high as evidenced by student feedback. 
Generative and accumulative recursion made fun for beginners