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•10mo ago

Comments

tomfly•10mo ago
where is the entrance and exit?
Jaxan•10mo ago
Doesn’t matter, because all positions are reachable. So just pick any two positions at the border and remove a wall.
kazinator•10mo 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•10mo 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•10mo 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•10mo 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.

Google Workspace CLI

https://github.com/googleworkspace/cli
467•gonzalovargas•7h ago•172 comments

You Just Reveived

https://dylan.gr/1772520728
95•djnaraps•3h ago•29 comments

MacBook Neo

https://www.apple.com/newsroom/2026/03/say-hello-to-macbook-neo/
1737•dm•17h ago•2028 comments

Relax NG is a schema language for XML

https://relaxng.org/
13•Frotag•1h ago•2 comments

Building a new Flash

https://bill.newgrounds.com/news/post/1607118
504•TechPlasma•11h ago•136 comments

The Self-Help Trap: What 20 Years of "Optimizing" Has Taught Me

https://tim.blog/2026/03/04/the-self-help-trap/
8•bonefishgrill•45m ago•0 comments

Show HN: Poppy – a simple app to stay intentional with relationships

https://poppy-connection-keeper.netlify.app/
68•mahirhiro•3h ago•17 comments

AMD will bring its "Ryzen AI" processors to standard desktop PCs for first time

https://arstechnica.com/gadgets/2026/03/amd-ryzen-ai-400-cpus-will-bring-upgraded-graphics-to-soc...
39•Bender•2d ago•33 comments

Something is afoot in the land of Qwen

https://simonwillison.net/2026/Mar/4/qwen/
638•simonw•15h ago•283 comments

What Python's asyncio primitives get wrong about shared state

https://www.inngest.com/blog/no-lost-updates-python-asyncio
41•goodoldneon•4h ago•24 comments

Dario Amodei calls OpenAI’s messaging around military deal ‘straight up lies’

https://techcrunch.com/2026/03/04/anthropic-ceo-dario-amodei-calls-openais-messaging-around-milit...
493•SilverElfin•7h ago•271 comments

NRC issues first commercial reactor construction approval in 10 years [pdf]

https://www.nrc.gov/sites/default/files/cdn/doc-collection-news/2026/26-028.pdf
101•Anon84•9h ago•61 comments

Dulce et Decorum Est (1921)

https://www.poetryfoundation.org/poems/46560/dulce-et-decorum-est
114•bikeshaving•10h ago•65 comments

Humans 40k yrs ago developed a system of conventional signs

https://www.pnas.org/doi/10.1073/pnas.2520385123
108•bikenaga•15h ago•48 comments

Picking Up a Zillion Pieces of Litter

https://www.sixstepstobetterhealth.com/litter.html
95•colinbartlett•3d ago•39 comments

Moss is a pixel canvas where every brush is a tiny program

https://www.moss.town/
238•smusamashah•21h ago•25 comments

Malm Whale

https://www.atlasobscura.com/places/malm-whale
25•thunderbong•4d ago•11 comments

NanoGPT Slowrun: Language Modeling with Limited Data, Infinite Compute

https://qlabs.sh/slowrun
156•sdpmas•13h ago•26 comments

“It turns out” (2010)

https://jsomers.net/blog/it-turns-out
276•Munksgaard•16h ago•87 comments

Jensen Huang says Nvidia is pulling back from OpenAI and Anthropic

https://techcrunch.com/2026/03/04/jensen-huang-says-nvidia-is-pulling-back-from-openai-and-anthro...
130•jnord•5h ago•50 comments

Qwen3.5 Fine-Tuning Guide

https://unsloth.ai/docs/models/qwen3.5/fine-tune
321•bilsbie•19h ago•74 comments

The View from RSS

https://www.carolinecrampton.com/the-view-from-rss/
108•Curiositry•11h ago•29 comments

Chaos and Dystopian news for the dead internet survivors

https://www.fubardaily.com
85•anonnona8878•5h ago•28 comments

The L in "LLM" Stands for Lying

https://acko.net/blog/the-l-in-llm-stands-for-lying/
41•LorenDB•3h ago•11 comments

Libre Solar – Open Hardware for Renewable Energy

https://libre.solar
247•evolve2k•3d ago•73 comments

Glaze by Raycast

https://www.glazeapp.com/
214•romac•18h ago•130 comments

Raspberry Pi Pico as AM Radio Transmitter

https://www.pesfandiar.com/blog/2026/02/28/pico-am-radio-transmitter
92•pesfandiar•4d ago•31 comments

Was Windows 1.0's lack of overlapping windows a legal or a technical matter?

https://retrocomputing.stackexchange.com/questions/32511/was-windows-1-0s-lack-of-overlapping-win...
81•SeenNotHeard•11h ago•56 comments

An interactive map of Flock Cams

https://deflock.org/map#map=5/37.125286/-96.284180
566•anjel•12h ago•206 comments

Relicensing with AI-Assisted Rewrite

https://tuananh.net/2026/03/05/relicensing-with-ai-assisted-rewrite/
65•tuananh•2h ago•54 comments