Abstract
The use of video games to teach introduction courses to programming and Computer Science is a trend that is currently flourishing. One of the most successful and promising approaches uses functional video games to get students interested and engaged in programming. This approach is successful, in part, because functional video games provide a domain of interest to most Computer Science undergraduates and remove the need to reason about designing state-based programs. A plethora of examples exist that have students develop games exploiting structural recursion which resemble such classics as Space Invaders and Snake. Once students master the basics of structural recursion the time comes to move beyond structural recursion to generative and accumulative recursion. It is up to the instructor to harness the enthusiasm and appetite that students have to develop more video games. This requires finding games that require the generation of subproblems in the same class as the input problem or that require accumulators to be successfully played or solved. This article presents a road map to make the transition from structural recursion to accumulative recursion using the N-puzzle problem as motivation to capture student enthusiasm and exploit what they have learned about program design. The N-Puzzle was also chosen to demonstrate that informed heuristic search strategies, traditionally the domain of undergraduate courses in Artificial Intelligence, are within the grasp of CS1 students. With proper guidance, CS1 students can reason such an algorithm into existence instead of simply using a textbook to study such algorithms. If the work described in this article is replicated elsewhere, there is no doubt that it will be an exciting time for Computer Science education and it will elevate the relevance of functional programming in the minds of future CS professionals.
Access provided by Autonomous University of Puebla. Download to read the full chapter text
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Felleisen, M., Findler, R.B., Fisler, K., Flatt, M., Krishnamurthi, S.: How to Design Worlds (2008), http://world.cs.brown.edu/1/
Felleisen, M., Findler, R.B., Flatt, M., Krishnamurthi, S.: How to Design Programs: An Introduction to Programming and Computing. MIT Press, Cambridge (2001)
Felleisen, M., Findler, R.B., Flatt, M., Krishnamurthi, S.: A Functional I/O System or, Fun for Freshman Kids. In: ICFP, pp. 47–58 (2009)
Findler, R.B., Clements, J., Flanagan, C., Flatt, M., Krishnamurthi, S., Steckler, P., Felleisen, M.: DrScheme: A Programming Environment for Scheme. Journal of Functional Programming 12(2), 159–182 (2002)
Markov, Z., Russell, I., Neller, T., Zlatareva, N.: Pedagogical Possibilities for the N-Puzzle Problem. In: Proceedings of the Frontiers in Education Conference, pp. S2F1–S2F6 (November 2006)
Morazán, M.T.: Functional Video Games in the CS1 Classroom. In: Page, R., Horváth, Z., Zsók, V. (eds.) TFP 2010. LNCS, vol. 6546, pp. 166–183. Springer, Heidelberg (2011)
Peyton-Jones, S.: Parallel Implementations of Functional Programming Languages. The Computer Journal 32(2) (1989)
Rich, E., Knight, K.: Artificial Intelligence. McGraw-Hill, New York (1991)
Russell, S.J., Norvig, P., Candy, J.F., Malik, J.M., Edwards, D.D.: Artificial intelligence: A Modern Approach. Prentice-Hall, Inc., Upper Saddle River (1996)
Szymanski, B.K.: Parallel Functional Languages and Compilers. Frontier Series. ACM Press, New York (1991)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Morazán, M.T. (2012). Functional Video Games in CS1 II. In: Peña, R., Page, R. (eds) Trends in Functional Programming. TFP 2011. Lecture Notes in Computer Science, vol 7193. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-32037-8_10
Download citation
DOI: https://doi.org/10.1007/978-3-642-32037-8_10
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-32036-1
Online ISBN: 978-3-642-32037-8
eBook Packages: Computer ScienceComputer Science (R0)