a-maze-ing
Python project · algorithms, terminal
Maze generator with multiple algorithms, pathfinding solvers and terminal visualization.
The problem
Generate a valid maze from a config file, write it in a hexadecimal wall format and show it in the terminal. Built as a duo with luispais.
What I built
- Recursive backtracking with an explicit stack (depth-first), with an option to open extra walls for mazes with loops.
- Breadth-first search for the shortest path, since the maze graph is unweighted.
- Seeded generation, so a maze can be reproduced exactly.
- A terminal renderer that can show or hide the solution, regenerate from the UI, and draws a "42" of blocked cells in the middle of big mazes.
- The generator packaged as a reusable
mazegenlibrary (wheel and sdist).
The hard part
Validation grew bigger than generation: walls have to agree on both sides, borders must be closed, every open cell must connect, and the "42" pattern has to fit without breaking any of that.
Built with
- Python 3.10+
- mypy
- flake8
- setuptools packaging
More projects
- metro · Lisbon metro sim in pixel art: watch the four lines run, step into any station, board a train and ride it.
- call_me_maybe · Turns a sentence into a JSON function call with a 0.6B model using constrained decoding — parseable by construction, not by luck.
- codexion · Multithreaded twist on the Dining Philosophers: coders compete for shared dongles, with FIFO/EDF scheduling.
- fly-in · Drone fleet routing: Dijkstra pathfinding, turn-based scheduling and a pygame replay.
- push_swap · Highly optimized sorting with two stacks and a tiny set of allowed operations.
- ft_printf · printf rebuilt from scratch: chars, strings, pointers, decimals, unsigned and hex.
- get_next_line · Reads a file descriptor one line at a time with careful dynamic memory handling.
- Libft · My own C standard library — the foundation every later 42 project is built on.