# Labyrinths and mazes¶

🐭
┃┣━━━┳━━━━┳━━┓
┃┗┓┏┛┃╻╺━━┛╺┓┃
┣┓┃┗┓┗┻━━━┳╸┃┃
┃┃┣╸┣━━┳━┓┗━┛┃
┃┃┃┏┛┏╸┃╻┣━┳╸┃
┃┗━┫╻┣━━┫┗╸┃┏┫
┃┏━┫┃┃╺┓┗━┓┃┃┃
┃┃┃┃┃┗┓┗━┓┗┻╸┃
┗━┫┏┻━━━━┻━━━┛
🧀

## Situationist Times #04: International Labyrinth Edition¶

Jacqueline de Jong (one of the makers of the Situationist Times) talking about printed mazes with overlay.

The PDFs of the Situationist Times are available on Monoskop!

## 10 PRINT¶

Nick Montfort and others compilation of maze generation and other simple scripts from early home computing.

https://hub.xpub.nl/bootleglibrary/book/583

• Including what is a maze, and the ever useful (controversial?) distinction between maze and labyrinth...

The terms “maze” and “labyrinth” are generally synonyms in colloquial English. Still, many scholars and historians have argued over the distinction between these two terms. In the most popular proposed distinction, “labyrinth” refers only to single-path (unicursal) structures, while “maze” refers only to branching-path (multicursal) structures.In this book, the terms “maze” and “labyrinth” are not used to distinguish two different categories of structure or image. Instead, the two terms indicate a single conceptual category, with this book primarily using the term “maze” for both

AND an interesting link to the conversation about popular culture and the middle-class:

## Fun With Python #1: Maze Generator¶

This notebook is based on the Medium article "Fun with Python part 1: Maze Generator" written by Orestis Zekai in 2020.

It is a nice tutorial which talks you through a Python implementation of a maze generator.

You can find the tutorial here: https://medium.com/swlh/fun-with-python-1-maze-generator-931639b4fb7e

The maze generator is based on a randomized version of Prim's algorithm, which is one of the maze algorithms that is used to generate a maze:

• Pick a cell, mark it as part of the maze. Add the walls of the cell to the wall list.
• While there are walls in the list:
• Pick a random wall from the list. If only one of the cells that the wall divides is visited, then:
• Make the wall a passage and mark the unvisited cell as part of the maze.
• Add the neighboring walls of the cell to the wall list.
• Remove the wall from the list.

## Maze Generator¶

The code below is a slightly adapted version of maze.py written by Orestis Zekai: https://github.com/OrWestSide/python-scripts/blob/master/maze.py

You can use the code to generate custom mazes.

Change the following variables in the code, to make your maze bigger or smaller and to change how your maze looks like!

# --------------------------
wall_tile = "▓"
cell_tile = "░"
height = 11
width = 27
# --------------------------

NOTE: The code below is a slightly different version of the code from the tutorial. The variable names are changed in the double for-loops, to make them connect to the other canvas examples in the other notebooks. For example, a for loop to move block by block through the maze is written below in the following way, using y and x to refer to the coordinates of a block:

for y in range(height):
for x in range(width):
if (maze[y][x] == "u"):
print(unvisited, end="")