Click the green flag and the A.I. will use random generators and memory scripts to get to the green box. All mazes are randomly generated. Remix & make the "wait __ seconds" larger to see its thought process in more detail. UPDATE: A.I. Will now deliberately move towards the green square at the end. UPDATE: Fixed a bug where the A.I. would get stuck in a "U" shape. A small triumph, but still, it's pretty great. UPDATE: A.I. Can now solve any possible maze although it takes around 500-1000 moves for those especially tricky ones.
All my scripts with some input from friends How it works (See inside for more information): This A.I. works in a randomly generated "Maze". It randomly picks a movement, and if that movement gets it closer to the finish line, it will move in that direction. If the move takes it further from the finish line, however, it will move back to where it initiated the move. If its only possible option to get to the goal is to move further from the green square, it will briefly revert to random motions. The average maze takes about 30-50 moves to complete.