john-science / mazelib

A Python library for creating and solving mazes.
MIT License
239 stars 55 forks source link

Warn users if they are using a Solver that doesn't match their Generator #94

Closed john-science closed 5 years ago

john-science commented 5 years ago

It will not be possible 100% of the time to warn users. BUT if the user tries to run a solver like WallFollower that only works on perfect mazes against a maze generated by CellularAutomaton that generates mazes that have loops sometimes, the user should get a warning.

This will not always be possible, since the user can manually create a maze and dump it into any solver. BUT there should be some control logic to determine if we have a mismatch between generator and solver.

To start, perhaps we can just have a Generator declare if it creates perfect mazes.

john-science commented 5 years ago

I have decided not to implement this. Instead, I will remove all maze solving algorithms that can not solve imperfect mazes.

The idea here is that I want this library to support the creation of ALL kinds of mazes, but only support maze-solving algorithms that are universal.