Can Games Teach You To Program?

After getting severely distracted by a little gem called RoboZZle I'd had to answer with a solid maybe.  The idea behind the game is simple: for each puzzle, program a small robot to collect all of the stars without falling off the map.  Here's a an example of a typical puzzle:

robozzle_designer

What's really cool is that the author, Igor Ostrovsky, has added social features so if you sign up for an account you can rate and vote for puzzles as well as submitting your own.  This frees Igor from having to dream up all the puzzles and adds a lot more variety and a lot more devious minds the mix!

No modern programming language looks anything like the one used in the game, at least, not one anyone uses...  so what could it possibly have to teach us?  Well, solving all of the puzzles will require you to do all of these:

  • Search for patterns.
  • Invent algorithms.
  • Create reusable functions.
  • Understand recursion.
  • Simplify.

There's one item in that list that is essential for solving many of the harder problems, and it's one that still gives a lot programmers headaches in the real world...

Understand Recursion

A function that calls itself, what's so hard about that?  If you think you really understand recursion here's some puzzles to try, starting with something nice and easy and working up to trickier problems:

Made it this far?  Well done.  As a final exam I put together a puzzle of my own.  At the time of writing is remains unsolved, let me know how you get on...

So yes, maybe there is something games can teach us.  If so I'm going to be a genius!  Oh yeah, the game is built in Silverlight too which is just awesome.

27/02/2009 12:54 AM (UTC -08:00)
Sunday, March 01, 2009 5:47:43 AM (New Zealand Daylight Time, UTC+13:00)
publish the solution of "Continuations", please.
i think this puzzle has only one solution, but i'v broked my head trying to solv it :)
asdf
Sunday, March 01, 2009 7:08:59 AM (New Zealand Daylight Time, UTC+13:00)
a... i solved it. it was easier, then i thought ;)
asdf
Monday, March 09, 2009 11:02:51 PM (New Zealand Daylight Time, UTC+13:00)
whats funny is i keep on thinking to myself "if only i had a stack trace i could make this work"
Logan
Comments are closed.