Skip to main content

Functional Video Games in CS1 II

From Structural Recursion to Generative and Accumulative Recursion

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 7193))

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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   54.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   72.00
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Felleisen, M., Findler, R.B., Fisler, K., Flatt, M., Krishnamurthi, S.: How to Design Worlds (2008), http://world.cs.brown.edu/1/

  2. Felleisen, M., Findler, R.B., Flatt, M., Krishnamurthi, S.: How to Design Programs: An Introduction to Programming and Computing. MIT Press, Cambridge (2001)

    MATH  Google Scholar 

  3. 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)

    Google Scholar 

  4. 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)

    Article  MATH  Google Scholar 

  5. 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)

    Google Scholar 

  6. 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)

    Chapter  Google Scholar 

  7. Peyton-Jones, S.: Parallel Implementations of Functional Programming Languages. The Computer Journal 32(2) (1989)

    Google Scholar 

  8. Rich, E., Knight, K.: Artificial Intelligence. McGraw-Hill, New York (1991)

    Google Scholar 

  9. 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)

    Google Scholar 

  10. Szymanski, B.K.: Parallel Functional Languages and Compilers. Frontier Series. ACM Press, New York (1991)

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics