Labyrinth solver

Too lazy to solve labyrinths

One of my colleagues created script generating labyrinths. An idea was to proactice js and canvas and to generate some fun for his kids.
But what if some kids are bored and don’t like labyrinths?

I created simple solution (pure html/js) which is able to find correct way in that labyrinth. It is iterative, brute force solution using collision detection:

  • check if solution found
  • check if there is an exit from current level and it was not entrance
  • check if there is a wall to change direction
  • move ball to next position
  • repeat

Full version with additional features:
https://plusz.github.io/labyrinth.html