Log In  


Maze solving algorithms

Random

Cart #randmaze-0 | 2023-02-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Note:

Takes ages, so I made it faster

Rating:2/10

Breadth-First Search

Cart #bfsmaze-1 | 2023-02-04 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Note:

Actually not bad, although will search a lot

Rating:4/10

Depth-First Search

Cart #dfsmaze-1 | 2023-02-04 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Note:

Worse than BFS, because it misses nearby targets

Rating:3/10

Wall-Follower

Cart #wall_follower-0 | 2023-02-04 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Note:

Might fail with loops

Rating:4/10

Dead-End Filling Algorithm

Cart #dead_end_filling-0 | 2023-02-04 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Note:

Will fail with loops

Produces a path

Rating:5/10

A*

Too lazy to code my own.
Instead, check this one made by @dw817:

https://www.lexaloffle.com/bbs/?pid=115379#p

1


Hi @Guest122:

I was reading above - you having difficulties in solving a maze, and the very cart of mine you mentioned below was the very one I was going to mention.

Small world. :)

At some point I need to sit down and recode it so it's a proper function that can work with any size maze or obstacles.

I was also looking at the methods you used here. Quite interesting to watch, really. Gold star for your persistence into the matter.



[Please log in to post a comment]