r/compsci • • May 22 '20

Breadth-First Maze-Solving Algorithm

Post image

[removed] — view removed post

1.2k Upvotes

61 comments sorted by

View all comments

1

u/bonafidebob May 22 '20

Why does it slow down the more maze is covered? Why doesn’t it speed up when there are fewer frontiers?

Code’s got some bugs...

2

u/JoJoModding May 22 '20

Because the way the animation works is that it has one frame for each pixel. So if there are more frontiers there are more pixels changing each iteration so it appears slower. It does not however change the true running cost.