Expand description


This crate is a small and naive implementation of several Algorithms resolving Mazes.

  • It exposes the Algorithm trait encapsulating the behavior of such an algorithm.
  • It also provides structures to generate Maze ([generate]) and execute said algorithms on them (Executor).




A context given to the Algorithm on every progress call, provide informations about the maze and method to create a Guess.

A structure holding a Maze and iteratively solving it with a provided Algorithm.

A guess to pass to the current Executor at the end of every progress call.

An insight given to the Algorithm on every progress call. On the first time about the starting point and every consecutive call about the tail of the previous guess.

Data structure representing a maze on a grid. stores each possible paths as a HashMap mapping each positions to the accessible adjascent ones.

A discrete position on a 2D-grid.

Most common maze generation technique, recursively creating paths to unvisited cells, each time choosing next direction at random.


Trait encapsulating the behavior of an algorithm solving mazes. Implementing this trait is done by providing a progress method which gets called iteratively on each steps of a [Maze] resolution.

Trait encapsulating the behavior of a type capable to create mazes.