Skip to content

Commit 9ea48fb

Browse files
committed
Update README
1 parent fcfcd1d commit 9ea48fb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,14 @@ npm start
2323
```
2424

2525
## Background
26-
One of the cool things about this algorithm is that it can continue building rows for the maze infinitely without running out of memory. This is because it only needs to know about 2 rows at any given time.
26+
One of the cool things about this algorithm is that it can continue building rows for the maze for a long time without running out of memory. This is because in theory it only needs to know about 2 rows at any given time.
2727

2828
Reading about it made me create this showcase. I am making it so that everytime you reload the maze, it will generate a completely different one, yet it will always be a perfect maze. A perfect maze is a maze that has no unreachable areas inside it. It has no loops or isolated walls and there is always a unique path between any two points in the maze.
2929

30-
I also took the time to make it visually show the steps the algorithm takes. You can see it generating cell by cell, giving each cell a set value, then deciding which ones to merge horizontally, and later vertically. I also gave you the ability to choose how slow the maze is generated, to see better how it works. Other settings are also the width and height, so you can make the maze reaaaally large if you want. Finally, I give you the choice to decide the merge chance, a value between 0 and 1. It's the chance to join cells horizontally. A high chance (like 0.9) tends to create horizontal mazes while a low chance creates more vertical ones.
30+
I also took the time to make it visually show the steps the algorithm takes. You can see it generating cell by cell, giving each cell a set value, then deciding which ones to merge horizontally and vertically. I also gave you the ability to choose how slow the maze is generated, to see better how it works. Other settings are also the width and height, so you can make the maze really large if you want. Finally, I give you the choice to decide the merge chance, a value between 0 and 1. It's the chance to join cells horizontally. A high chance (like 0.9) tends to create horizontal mazes while a low chance creates more vertical ones.
3131

3232
If you're wondering why there's no entrance or exit, it's because you can choose any two points in the maze's outer walls to open up and there will always be a path between the two.
3333

34-
There's one thing I didn't implement according to the instructions given at any of the sources, they say to give atleast one vertical connection to each set, but personally I wasn't able to get perfect mazes when there was more than one vertical connection per set.
35-
3634
### Sources:
3735
https://weblog.jamisbuck.org/2010/12/29/maze-generation-eller-s-algorithm
3836

0 commit comments

Comments
 (0)