{{wikipedia|Maze generation algorithm}} [[File:a maze.png|300px||right|a maze]]
;Task: Generate and show a maze, using the simple [[wp:Maze_generation_algorithm#Depth-first_search|Depth-first search]] algorithm. #Start at a random cell. #Mark the current cell as visited, and get a list of its neighbors. For each neighbor, starting with a randomly selected neighbor: #:If that neighbor hasn't been visited, remove the wall between this cell and that neighbor, and then recurse with that neighbor as the current cell.

; Related tasks * [[Maze solving]].