Thursday, March 23

If you like mazes, these automatic generators will win you over


Find the way out of a maze on paper it was a traditional pastime in our childhood, but its presence is notable both in the real world —gardens made into labyrinths are famous— and in fiction —with multiple appearances in novels and movies—. In addition to this, these unique problems also have their extension in the world of computing.

In fact, algorithms that solve mazes have been known for decades and are closely related to graph theory. If you like this type of hobbies, there are several websites where you can generate them dynamically then print them and solve them.

Find the exit (if you can)

Labyrinths, in fact, are also the object of study in scientific laboratories in which the rats They have been protagonists. In these studies, experiments are carried out in the field of neuroscience with which it is sought to better understand spatial learning and the relevance of the hippocampus in this field.

Screenshot 2022 04 13 At 10 12 12

In a way, Google Maps is a great maze solver.

Its resolution is also a famous mathematical field: Leonhard Euler He was one of the first to analyze the problem from this mathematical point of view and this led him to make important contributions to the field of topology.

Graph theory, which is closely related to this field, has a very clear application in our daily lives: Dijkstra’s algorithm —also known as the shortest path algorithm— is the one used by both Google Maps and other navigation systems to determine the shortest route to a destination.

Also Read  Xiaomi 12 Pro, Xiaomi's weapon to conquer the high-end in 2022

These are the six most energy efficient buildings and more

For those who try to solve them, the most famous method to achieve it is the so-called right hand method. According to this system, you should not separate your right hand from the first wall you come across.

That technique has its limitations, and that’s where an alternative with more substance comes in: the so-called Tremaux algorithmwhich drastically reduces resolution time and is based on marking the paths we travel so as not to repeat them again.

There are other algorithms, of course, but if what you like is to solve that puzzle by yourself and find the way out of a maze, there are a good number of maze generators that allow us to configure various parameters to create them on screen and then print them and solve them.

Screenshot 2022 04 13 At 9 43 46

These generators often offer options like the shape of the maze (circular, square, rectangular, hexagonal), the length of the sides or lines, or the values ​​E (“Elitist tendency”, how short is the solution in relation to the size of the maze) and R (“River tendency” , when higher, fewer condemned paths, but these are longer)

We have examples like mazegenerator.net or mazegenerator.app, and in the latter case it is even possible to establish a “random seed” from which the maze is generated, but we can also create more colorful mazes What an eye, they can deceive more than help.

Screenshot 2022 04 13 At 9 46 19

Others are simpler in terms of generation options but do something curious: show the way from the entrance to the exit to demonstrate that indeed these labyrinths have a solution.

Also Read  Portable induction hobs: best options you can find on Amazon

There are other, somewhat more intricate generators: the Shadertoy community, which brings together developers who code all kinds of developments using shadersalso has in its particular library a series of dynamic maze generators.

Screenshot 2022 04 13 At 10 01 02

This maze generator is surprising for how short the program that generates it is: only 65 characters are enough. Changing any of the values ​​and then clicking on the “Play” of “Compiled in 0.0 secs” allows us to generate new mazes.

Here the handling of the options is somewhat more confusing, and in fact we simply have to edit any of the parameters of the program to then see the result of the generation on the left.

In this case that window will always remain still: in other creations by Shadertoy, these programs generate curious animations in which the playback window makes perfect sense.

And then there are other labyrinths, of course. At Xataka, in case you didn’t know, we’ve been running the ‘Paper Labyrinth’ podcast for a long time, dedicated to fantasy and science literature. We had to say it.

Leave a Reply

Your email address will not be published. Required fields are marked *