Skip to content

Commit 2cd17f0

Browse files
committed
perf(maze): improve maze example description
1 parent 717a3ee commit 2cd17f0

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

  • artificialintelligence/assignments/maze

artificialintelligence/assignments/maze/README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ There are many ways to implement a maze generation and one of the most common is
1616
2. Else:
1717
1. Remove the top cell from the stack, backtracking;
1818

19-
??? example
19+
??? example "Simulation"
20+
21+
If you simulate the algorithm visually, the result would be something similar to the following
2022

2123
![Maze generation](maze.gif)
2224

@@ -39,12 +41,6 @@ In order to give consistency on how to decide the direction of the next cell, th
3941
3. If there are one visitable, do not call random, just return the first neighbor found;
4042
4. If there are two or more visitable neighbors, call random and return the neighbor at the index of the random number modulo the number of visitable neighbors. `vec[i]%visitableCount`
4143

42-
??? example Simulation
43-
44-
If you simulate the algorithm visually, the result would be something similar to the following
45-
46-
![Maze generation](maze.gif)
47-
4844
## Input
4945

5046
The input is a single line with three `32 bits` unsigned integer numbers, `C`, `L` and `I`, where `C` and `L` are the number of columns and lines of the maze, respectively, and `I` is the index of the first random number to be used> `I` can varies from `0` to `99`.

0 commit comments

Comments
 (0)