Yesterday Google published an amazing tool google-blockly which is more or less similar to MIT Scratch. Blockly is a web-based, graphical programming language. Users can drag blocks together to build an application. No typing required :) All the code of Blockly is open source.
One of the demo programs involves solving a maze puzzle.
I had some good time playing around with the blocks and building up the logic that solves the puzzle. Here’s the solution that I came up with:
If you haven’t tried yet then do try it. Its real fun. Play Blockly-maze now.
Let me know if you have better/generic solution..
Update: I found below simpler and smaller solution on Internet. This solution not just solve the current Maze problem, but can any 2-dimensional maze problem.