...Beauty, cleaning, DIY tips and more - free to join!
   Login   Contact us   Site map   Puzzle Club   Ask a question    Newsletter

Can you solve a maze by program?


Question asked by: mrquestion

Asked on: 06 Jan 2010

Yes you can solve a maze programatically.

There is a simple algorithm that can be used to do this.

You pick the start cell, or a cell at random. You then get a list of squares that you can move to and haven't already visited, and then you move into one of those cells and keep on going until you can't go any further. If you have reached the end of the maze, then you've solved it. If not then you backtrack to the last cell you visited where there were unexplored options, and take the next option, and so on, until you have exhausted all routes.

By: knowitall
Replied at: 06 Jan 2010
Rate Answer
Comment or provide your answer to this question
No comments have been added to this question "Can you solve a maze by program?".
Ask a New Question

Find out more about Games

Games Questions and Answers

Mazes Questions and Answers

Next question: How do I write a program to create mazes?


Become a Member! It's Free >>>

Share on Facebook: On Twitter: TwitterTweet this!

Question Keywords

program  maze  solve  

More Questions:

What Is Sudoku X?
What Is Battle Ships?
How Is Difficulty Of A Sudoku Puzzle Determined?
Does Every Sudoku Have A Solution?
What Is A Blockword?