frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Generating Mazes with Inductive Graphs (2017)

https://jelv.is/blog/Generating-Mazes-with-Inductive-Graphs/
20•todsacerdoti•4mo ago

Comments

tomfly•4mo ago
where is the entrance and exit?
Jaxan•4mo ago
Doesn’t matter, because all positions are reachable. So just pick any two positions at the border and remove a wall.
kazinator•4mo ago
Here is a maze that was generated recursively starting at the upper left cell.

  +    +----+----+----+----+----+----+----+----+----+
  |    |                        |                   |
  |    |                        |                   |
  +    +----+----+    +----+    +----+    +----+    +
  |              |         |                   |    |
  |              |         |                   |    |
  +----+----+    +    +----+----+----+----+----+    +
  |              |    |                        |    |
  |              |    |                        |    |
  +    +----+----+    +    +----+----+----+    +    +
  |         |              |              |    |    |
  |         |              |              |    |    |
  +    +----+    +    +----+----+----+    +    +----+
  |              |    |                   |    |    |
  |              |    |                   |    |    |
  +----+----+----+    +    +----+----+----+    +    +
  |                        |                   |    |
  |                        |                   |    |
  +    +----+----+----+    +    +----+----+----+    +
  |    |    |              |    |              |    |
  |    |    |              |    |              |    |
  +    +    +    +    +----+    +    +----+    +    +
  |    |    |    |    |         |    |         |    |
  |    |    |    |    |         |    |         |    |
  +    +    +    +    +----+----+----+    +    +    +
  |    |    |    |    |                   |         |
  |    |    |    |    |                   |         |
  +    +    +----+    +    +----+----+    +----+----+
  |              |         |                        |
  |              |         |                        |
  +----+----+----+----+----+----+----+----+----+    +

It matters to start there because it will be easier if you go backwards.

The maze has 100 cells. For each cell, we can calculate which exit goes back toward the entrance, assigning the letters U, D, L, R:

  U R R D L L R D L L
  U L L D L U L L L U
  R R U D D L L L L U
  U L D L L R R D U U
  U L L U D L L L U D
  R R R U L R R R U D
  U D R R U U R R D D
  U D U U R U U D L D
  U D U U D L L L U L
  U L L U L R R U L L
Stats:

  L - 33
  U - 29
  R - 20
  D - 18
Left and Up are more frequent back-to-entrance escapes than Right or Down. This is because of the way the maze was generated.

To check the hypothesis, we should analyze it in the other direction. For each cell, determine the exit which heads in the direction of the exit:

  D R R D L L R D L L
  D R D D L U L L L U
  D L L D D L L L L U
  D L R D L R R D D U
  R R U D D L L L U D
  R R R R D R R R U D
  U D R D L U R R D D
  U D U D R U U D L D
  U D U D R R R D U L
  U L L R U R R R R D
Stats:

  D - 30
  R - 28
  L - 24
  U - 18
There is a weaker bias for the D-R axis toward the exit, compared to the L-U axis toward the entrance. I suspect if we study larger numbers of larger mazes, we will find similar findings.

So that is to say, it is easier to navigate the maze in the reverse direction: the heuristic to try left/up exits will work more often than the right/down in the proper direction.

smartmic•4mo ago
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.

kazinator•4mo ago
While you can put the entrance and exit wherever you want, if you know that the maze was generated by a recursive branching process which had a starting point somewhere, it probably behooves you to put the start at that point corresponding to the root of the tree, so that the maze wanderer faces the most branching choices.

Laying out the abstract maze tree into the rectilinear grid of cells obfuscates the tree somewhat, but not entirely. A process that generates from upper left to lower right, for instance, will tend to generate cells whose parent-headed exits going left and up more often than not, making the reverse direction a bit easier.

(Again, it depends on the maze generation process.)

kazinator•4mo ago
Making random mazes in a rectilinear grid is a good exercise for one big reason: mazes are not all the same. Mazes have style can be very knotty and twisty, or have long passages. You can add hacks into a given algorithm to vary the style, but there are certain things it won't necessarily do.

Slack has raised our charges by $195k per year

https://skyfall.dev/posts/slack
1744•JustSkyfall•11h ago•772 comments

KDE is now my favorite desktop

https://kokada.dev/blog/kde-is-now-my-favorite-desktop/
36•todsacerdoti•49m ago•5 comments

You Had No Taste Before AI

https://matthewsanabria.dev/posts/you-had-no-taste-before-ai/
74•codeclimber•1h ago•64 comments

This Website Has No Class

https://aaadaaam.com/notes/no-class/
109•robin_reala•4h ago•41 comments

CERN Animal Shelter for Computer Mice

https://computer-animal-shelter.web.cern.ch/index.shtml
149•EbNar•6h ago•13 comments

WASM 3.0 Completed

https://webassembly.org/news/2025-09-17-wasm-3.0/
947•todsacerdoti•18h ago•409 comments

Show HN: The text disappears when you screenshot it

https://unscreenshottable.vercel.app/?text=Hello
346•zikero•10h ago•116 comments

Midcentury North American Restaurant Placemats

https://casualarchivist.substack.com/p/order-up
14•NaOH•1d ago•2 comments

Meta Ray-Ban Display

https://www.meta.com/blog/meta-ray-ban-display-ai-glasses-connect-2025/
481•martpie•12h ago•698 comments

Fast Fourier Transforms Part 1: Cooley-Tukey

https://connorboyle.io/2025/09/11/fft-cooley-tukey.html
27•signa11•3h ago•4 comments

Keeping SSH sessions alive with systemd-inhibit

https://kd8bny.com/posts/session_inhibit/
16•kd8bny•2d ago•7 comments

Pnpm has a new setting to stave off supply chain attacks

https://pnpm.io/blog/releases/10.16
80•ivanb•5h ago•64 comments

CircuitHub (YC W12) Is Hiring Operations Research Engineers (UK/Remote)

https://www.ycombinator.com/companies/circuithub/jobs/UM1QSjZ-operations-research-engineer
1•seddona•3h ago

One Token to rule them all – Obtaining Global Admin in every Entra ID tenant

https://dirkjanm.io/obtaining-global-admin-in-every-entra-id-tenant-with-actor-tokens/
244•colinprince•14h ago•37 comments

Orange Pi RV2 $40 RISC-V SBC: Friendly Gateway to IoT and AI Projects

https://riscv.org/ecosystem-news/2025/09/orange-pi-rv2-40-risc-v-sbc-friendly-gateway-to-iot-and-...
69•warrenm•2d ago•59 comments

Boring is good

https://jenson.org/boring/
224•zdw•2d ago•54 comments

Nvidia buys $5B in Intel stock in seismic deal

https://www.tomshardware.com/pc-components/cpus/nvidia-and-intel-announce-jointly-developed-intel...
130•stycznik•2h ago•88 comments

A postmortem of three recent issues

https://www.anthropic.com/engineering/a-postmortem-of-three-recent-issues
323•moatmoat•16h ago•103 comments

Nvidia to Invest $5B in Intel

https://www.ft.com/content/be8d4c0c-66ff-4dfd-9b43-af6c0b290ada
34•mmarian•1h ago•7 comments

60 years after Gemini, newly processed images reveal details

https://arstechnica.com/space/2025/09/60-years-after-gemini-newly-processed-images-reveal-incredi...
20•rbanffy•2d ago•1 comments

John Grisham Still Wonders: Will Texas Kill Robert Roberson?

https://www.dmagazine.com/frontburner/2025/09/author-john-grisham-still-wonders-will-texas-kill-r...
17•rossant•4h ago•0 comments

YouTube addresses lower view counts which seem to be caused by ad blockers

https://9to5google.com/2025/09/16/youtube-lower-view-counts-ad-blockers/
387•iamflimflam1•22h ago•703 comments

History of the Gem Desktop Environment

https://nemanjatrifunovic.substack.com/p/history-of-the-gem-desktop-environment
45•ibobev•6h ago•18 comments

Hypervisor 101 in Rust

https://tandasat.github.io/Hypervisor-101-in-Rust/
137•pykello•11h ago•10 comments

Ton Roosendaal to step down as Blender chairman and CEO

https://www.cgchannel.com/2025/09/ton-roosendaal-to-step-down-as-blender-chairman-and-ceo/
346•cma•20h ago•69 comments

Stepping Down as Libxml2 Maintainer

https://discourse.gnome.org/t/stepping-down-as-libxml2-maintainer/31398
125•zdw•12h ago•65 comments

Towards a Physics Foundation Model

https://arxiv.org/abs/2509.13805
84•NeoInHacker•10h ago•17 comments

Elements of C Style (1994)

https://www.teamten.com/lawrence/style/
21•signa11•2d ago•2 comments

How Container Filesystem Works: Building a Docker-Like Container from Scratch

https://labs.iximiuz.com/tutorials/container-filesystem-from-scratch
54•thunderbong•3d ago•0 comments

A QBasic Text Adventure Still Expanding in 2025

https://the-ventureweaver.itch.io/
62•ATiredGoat•10h ago•27 comments