Tuesday, March 3, 2009

Recursion for Problem-Solving

Here is our new programming technique again:
This time we are using recursion for solving a special kind of difficult problems. Those problems can be divided up into smaller sub problems of the same kind that eventually are easy enough to get solved. The Towers of Hanoi puzzle is a typical example of such a problem. We will observe how to animate this game in Alice using a recursive method.
In the lab you can be a game programmer: Animate and play the Click-a-Cow game, project 4, page 254. Parts of the solution will be provided.
A screen shot of the online implementation
of the Towers of Hanoi from NLVM:


Homework
  • Read pages 236-240
  • Review questions section 8.2
  • Have your parents/ guardians sign the consent form for our field trip to EA on Friday, April 3, 2009.

No comments: