The Caver Algorithm

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
34,930
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jul 26, 2007

A demonstration of the Caver algorithm, and a naive depth first search algorithm.

Category:

Film & Animation

Tags:

License:

Standard YouTube License

  • likes, 5 dislikes

Link to this comment:

Share to:

Uploader Comments (RJLeffmann)

  • 0:26 and 0:36, assuming the solver knew the boundaries of the maze, it should have also known that the directions it headed were dead ends. Euclidean distance checks at T intersections are the key here :)

  • @trjnz Yes - given that it's trying to reach a known coordinate. If you're trapped in a maze then you probably don't know where the actual exit is :)

  • Is this an example of backtracking?

  • @metabog Yes it is. Both the generator and solver are depth-first search algorithms that will track back when they find themselves in a dead end that will not lead to a solution.

  • You can also improve the maze solving algorithm by making it try squares that reduce the euclidean distance to the end in most-to-least order, since solutions are more often direct than not.

  • @domokato Good thinking, and I agree on the heuristic for solving the maze, it would probably make it a lot quicker. I'll try it out some day.

Video Responses

This video is a response to Maze Programming Challenge
see all

All Comments (29)

Sign In or Sign Up now to post a comment!
  • When I did a maze generator a long time ago, I had a parameter telling the chanse of continuing to dig straight forward or to turn left or right. That way I could set how wriggly the maze would be.

    Another parameter I would introduce if I did this today is a random chanse to stop digging and start a new branch. This way I could set if there will be few or many dead ends.

  • This is very similar to Trémaux's algorithm.

  • what's the maze generation algorithm?

  • I did this in college.

    You can improve the maze-generating algorithm by starting at the end and generating towards the start. This means the start square will likely have two paths, one of which will always be a dead end. If you generating starting at the start, the end square will have two paths, one of which will never be traversed.

    (continued)

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more