Skip to content
HomeVideosBooks
AllTopicsTrends
BlogsPodcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    Cover of Mazes for programmers

    Mazes for programmers

    Jamis Buck · 2015

    Part I. The basics: Your first random mazes: Preparing the grid; The binary tree algorithm; The sidewinder algorithm -- Automating and displaying your mazes: Introducing our basic grid; Displaying a maze on a terminal; Implementing the binary tree algorithm; Rendering a maze as an image -- Finding solutions: Dijkstra's algorithm; Implementing Dijkstra's; Finding the shortest path; Making challenging mazes; Coloring your mazes -- Avoiding bias with random walks: Understanding biases; The Aldous-Broder algorithm; Implementing Aldous-Broder; Wilson's algorithm; Implementing Wilson's algorithm -- Adding constraints to random walks: The hunt-and-kill algorithm; Implementing hunt-and-kill; Counting dead ends; The recursive backtracker algorithm; Implementing the recursive backtracker -- Part II. New steps: Fitting mazes to shapes: Introducing masking; Implementing a mask; ASCII masks; Image masks -- Going in circles: Understanding polar grids; Drawing polar grids; Adaptively subdividing the grid; Implementing a polar grid -- Exploring other grids: Implementing a hex grid; Displaying a hex grid; Making hexagon (sigma) mazes; Implementing a triangle grid; Displaying a triangle grid; Making triangle (delta) mazes -- Braiding and weaving your mazes: Braiding mazes; Cost versus distance; Implementing a cost-aware Dikstra's algorithm; Introducing weaves and insets; Generating weave mazes -- Part III.

    ProgrammingLisp & FunctionalComputer Science
    Open LibraryAmazon
    Stats for nerds
    19recommend
    28mentions
    22people
    2018–2026years
    86% recommend14% neutral

    Mentions per year

    201820192020202120222023202420252026

    What Hacker News says

    1. kcartlidgeApr 2026
      Some interesting stuff I wasn't familiar with, thanks.

      I really like the book Mazes for Programmers by Jamis Buck [1].

      Also, my open source Dungeon generator is a (slightly-misnamed) maze generator [2]. It produces 2D maps, and also 3D files (OBJ and MTL) for use in Blender etc. I like to think it does a more 'reasonable' job than many, but I am biased.

      - [1] http://www.mazesforprogrammers.com

      - [2] https://github.com/kcartlidge/Dungeon

      thread
    2. vintagedaveMar 2026
      Other than loving maze generation -- longtime fan of Mazes for Programmers [0] here -- I love the solid software engineering in this talk. It's refreshing, and inspiring!

      [0] http://mazesforprogrammers.com/, wonderful book by Jamis Buck

      thread
    3. nickevanteJan 2026
      For anyone interested in this, Jamis Buck's book 'Mazes for Programmers' is a masterpiece of the genre.

      My personal favorite distinction is between the Recursive Backtracker (which creates long, winding corridors with few dead ends which is great for tower defense games) vs. Prim's Algorithm (which creates lots of short cul-de-sacs which is better for roguelikes). The bias of the algorithm dictates the feel of the game more than the graphics do.

      thread
    4. smartmicApr 2025
      From the book "Mazes for Programmers" by Jamis Buck, 2015, The Pragmatic Programmers (a must-read for any maze/programming enthusiast!):

      > Aren't mazes supposed to have starting points and end points? […] honestly, […] it's entirely up to you. […] The maze […] is a perfect maze, and one of the attributes of a perfect maze is that there exists exactly one path between any two cells in it. […] You pick them, and there's guaranteed to be a path between them.

      You do not need to choose an entrance or exit only on the sides, but you can also choose "Pacman-style" where the goal is to reach points inside the maze.

      "Perfect" refers to the mathematical/logical properties of a maze (i.e. no loops), not the aesthetical aspect. I have not checked though if the mazes in the source here are all perfect.

      thread
    5. vintagedaveJan 2025
      Remarkably simple with great results. I recommend checking out the author’s book Mazes for Programmers: one of the best programming books I’ve ever read. Incredibly clearly explained, and very interesting, which is an excellent combination.
      thread
    6. TomteSep 2024
      I feel similarly. My plan is the new edition of "The Nature of Code" and "Mazes for Programmers". Also maybe https://www.youtube.com/watch?v=f4s1h2YETNY
      thread

    Related

    Cover of Ray Tracer Challenge
    2019–2026

    Ray Tracer Challenge

    Jamis Buck
    21 recommend · 29
    Functional Programming Using F#Michael R. Hansen
    2019–2022

    Functional Programming Using F#

    Michael R. Hansen
    2 recommend · 2
    Cover of How to Design Programs
    2007–2026

    How to Design Programs

    Matthias Felleisen
    277 recommend · 776
    Cover of Expert F# 3.0
    2013–2022

    Expert F# 3.0

    Don Syme
    6 recommend · 8
    Cover of Structure and Interpretation of Computer Programs
    2007–2026

    Structure and Interpretation of Computer Programs

    Harold Abelson
    347 recommend · 761
    Cover of The reasoned schemer
    2007–2026

    The reasoned schemer

    Daniel P. Friedman
    45 recommend · 107
    Cover of The Little Schemer
    2007–2026

    The Little Schemer

    Daniel P. Friedman
    288 recommend · 652
    Cover of Learning Processing
    2012–2023

    Learning Processing

    Daniel Shiffman
    6 recommend · 9