Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /websites/LinuxPackage02/te/ll/me/tellmehowto.net/public_html/answers/newanswer.php on line 37

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /websites/LinuxPackage02/te/ll/me/tellmehowto.net/public_html/answers/newanswer.php on line 37

Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /websites/LinuxPackage02/te/ll/me/tellmehowto.net/public_html/answers/newanswer.php on line 38

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /websites/LinuxPackage02/te/ll/me/tellmehowto.net/public_html/answers/newanswer.php on line 38

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /websites/LinuxPackage02/te/ll/me/tellmehowto.net/public_html/answers/newanswer.php:37) in /websites/LinuxPackage02/te/ll/me/tellmehowto.net/public_html/checklogin2.php on line 24

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /websites/LinuxPackage02/te/ll/me/tellmehowto.net/public_html/answers/newanswer.php:37) in /websites/LinuxPackage02/te/ll/me/tellmehowto.net/public_html/checklogin2.php on line 24
Can you solve a maze by program?
...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 Are The Best Puzzles For Kids?
Should A Maze Only Have One Route From A To B?
What Is Killer Sudoku X?
I Like Hanjie Puzzles, Where Can I Buy Them?
What Are Continental Crosswords Like?