I find this interesting for how it demonstrates recursion as a means of looping. Most simple code tutorials like this just follow the procedural style, and make you throw a set of instructions inside of a loop block.
A long time ago I wrote a simplistic "genetic algorithm" and JIT for solving these puzzles as an exercise. The code is not good, but it did work.<p><a href="https://github.com/zeevt/lightbot_solver" rel="nofollow">https://github.com/zeevt/lightbot_solver</a>
It's not that simple. My 6-year-old son is having hard time - even with the Junior version on Android. Sometimes I do have issue with the regular version as well - it's much easier to write code than use the constructs.
This game has a similar code mechanic to CargoBot: <a href="https://itunes.apple.com/us/app/cargo-bot/id519690804?mt=8" rel="nofollow">https://itunes.apple.com/us/app/cargo-bot/id519690804?mt=8</a><p>CargoBot has given me hours of having to really think about how to structure my "code" to get the recursive calls just right. I haven't gotten deep into Lightbot yet, but it should be a fun puzzle if later levels have similar types of recursive challenges.
There is an old one from the same team: <a href="http://armorgames.com/play/2205/light-bot" rel="nofollow">http://armorgames.com/play/2205/light-bot</a>
<a href="http://pleasingfungus.com/Manufactoria/" rel="nofollow">http://pleasingfungus.com/Manufactoria/</a> is another great game along the same lines
Haven't seen it mentioned in the comments yet, but here's another that's a bit more hardcore: <a href="http://robocode.sourceforge.net/" rel="nofollow">http://robocode.sourceforge.net/</a><p>You code the AI for your tank then let it loose in an arena with other tanks. You have to handle path-finding, scanning, range-finding, target identification, hit/miss analysis.<p>Some of the winning bots are amazingly competent with their scan-and-move algorithms. You code in Java or some flavor of .Net.
This was really good but there were a few levels that left a bit to be desired. Some of them were basically "find a way to mash this code into these functions without exceeding the instruction cap" while others encouraged quite elegant programming. The last one of the final stage was probably the best example, I thought it was quite elegant.
As a hint: When you run out of space in a function, then just tack the still needed blocks to the end of every call of that function. It is a bad real-life programming pattern but works in this language.<p>(This language seems non-turning complete without conditionals.)
I have been looking for a game to suggest to my 8 year old nephew. This looks simple enough for him to start on. But I am guessing he might need some help when recursion comes into picture. Thanks to others who have posted other suggestions.
Right after the first level the question in my mind was, "hmm, I wonder what the tile for conditionals looks like." That question was never answered. Anybody have any ideas on how to answer it?
Was anyone able to actually play the game? It took me to an introduction, the last slide of which was "I'm finished with my hour of code" and I couldn't go any further.
I played this game some years ago before I learned anything about programming. Coming back to it with some understanding of recursion makes it a lot easier (though still tough in places).
Also a great game with the same theme from 2011: Pragmatica<p><a href="http://www.wearehive.com/games/pragmatica/" rel="nofollow">http://www.wearehive.com/games/pragmatica/</a>
My daughter has been playing it since she was 7, it's really cool to teach the basics of programming, and more generally to improve accuracy of spatial and time reasoning.
Definitely much easier than this one:
<a href="http://en.wikipedia.org/wiki/Robot_Odyssey" rel="nofollow">http://en.wikipedia.org/wiki/Robot_Odyssey</a>