Aimless, Random Wanderings

For my blockly maze solution, I wanted to find the smallest, most compact phrase to get him to the end of the maze.  With that in mind, I knew I couldn’t rely on step-by-step commands, such as a long list of ‘Move Forwad’s and ‘Turn Right’s.  And also, not being a programming genius or a logic expert, decided to go with something simple, and almost stupid.

My phrase is ‘Move Forward’ and ‘Turn Randomly,’ and repeat until finished.   It seems silly I know, and the first time I ran the program it took nearly 15 minutes to complete it.  But it does work, and I definitely is one of the shortest programs I’ve seen.  It might be be the most effective of fastest method, but it got the job done for me and didn’t require as deep of thought or time setting the program up as some of the more complex ones do.  Although it is mostly based on luck, which I doubt would get me very far in the programming world, it was fun to watch the little guy wander aimlessly around the maze, cheering him in the right direction as he hopefully turned down the right path.

Leave a Reply

Your email address will not be published. Required fields are marked *