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•1y ago

Comments

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

An OpenAI model has disproved a central conjecture in discrete geometry

https://openai.com/index/model-disproves-discrete-geometry-conjecture/
329•tedsanders•1h ago•211 comments

GitHub confirms breach of 3,800 repos via malicious VSCode extension

https://www.bleepingcomputer.com/news/security/github-confirms-breach-of-3-800-repos-via-maliciou...
200•Timofeibu•7h ago•61 comments

Flipper One Tech Specs

https://docs.flipper.net/one/general/tech-specs
96•gregsadetsky•2h ago•28 comments

How fast is N tokens per second really?

https://mikeveerman.github.io/tokenspeed/
202•hexagr•2d ago•52 comments

Qwen3.7-Max: The Agent Frontier

https://qwen.ai/blog?id=qwen3.7
531•kevinsimper•10h ago•209 comments

Why is Inkwell stuck in review

https://www.manton.org/2026/05/19/why-is-inkwell-stuck-in.html
54•speckx•3h ago•17 comments

Not alive, but not dead: disembodied human brains used for drug testing

https://www.science.org/content/article/not-alive-not-dead-disembodied-human-brains-used-drug-tes...
23•Timofeibu•1h ago•13 comments

SBCL: the ultimate assembly code breadboard (2014)

https://pvk.ca/Blog/2014/03/15/sbcl-the-ultimate-assembly-code-breadboard/
100•yacin•5h ago•5 comments

Qian Xuesen: The missile genius America lost and China gained (2025)

https://www.usni.org/magazines/naval-history/2025/december/missile-genius-america-lost-and-china-...
42•thnaks•3h ago•25 comments

Saying Goodbye to Asm.js

https://spidermonkey.dev/blog/2026/05/20/saying-goodbye-to-asmjs.html
263•eqrion•8h ago•116 comments

Sharla Boehm, the programmer whose code underpins the Internet

https://www.scientificamerican.com/article/the-programmer-whose-code-underpins-the-internet/
61•dxs•2d ago•19 comments

Map of Metal

https://mapofmetal.com/
357•robin_reala•10h ago•128 comments

Google's AI is being manipulated. The search giant is quietly fighting back

https://www.bbc.com/future/article/20260519-google-tackles-attempts-to-hack-its-ai-results
213•tigerlily•10h ago•157 comments

Incident Report: May 19, 2026 – GCP Account Suspension

https://blog.railway.com/p/incident-report-may-19-2026-gcp-account-outage
322•0xedb•12h ago•199 comments

LoRA and Weight Decay (2023)

https://irhum.github.io/blog/lorawd/
15•jxmorris12•1d ago•0 comments

Meta blocks human rights accounts from reaching audiences in Saudi Arabia, UAE

https://www.alqst.org/ar/posts/1190
841•giuliomagnifico•8h ago•357 comments

Node.js 26.0.0 (Now with Temporal)

https://nodejs.org/en/blog/release/v26.0.0
69•aarestad•2h ago•21 comments

Apparently Google hates us now

https://twitter.com/pokemoncentral/status/2057123807404638250
351•zeitg3ist•4h ago•176 comments

Everything in C is undefined behavior

https://blog.habets.se/2026/05/Everything-in-C-is-undefined-behavior.html
451•lycopodiopsida•14h ago•594 comments

Formal Verification Gates for AI Coding Loops

https://reubenbrooks.dev/blog/structural-backpressure-beats-smarter-agents/
74•pyrex41•5h ago•14 comments

Testing distributed systems with AI agents

https://github.com/shenli/distributed-system-testing
64•shenli3514•6h ago•10 comments

Tracking Starbucks' 'widely recyclable' cups: none ended up at recycling

https://www.beyondplastics.org/press-releases/starbucks-cups-recyclable-report
118•theanonymousone•2h ago•95 comments

Handling the great code forge fragmentation

https://www.alexselimov.com/posts/forge_fragmentation/
30•mooreds•3d ago•17 comments

Stable Audio 3

https://arxiv.org/abs/2605.17991
76•guardienaveugle•5h ago•16 comments

When Fast Fourier Transform Meets Transformer for Image Restoration (2024)

https://github.com/deng-ai-lab/SFHformer
68•teleforce•2d ago•7 comments

Tennessee man jailed 37 days for Trump meme wins settlement after lawsuit

https://www.fire.org/news/victory-tennessee-man-jailed-37-days-trump-meme-wins-835000-settlement-...
593•ceejayoz•6h ago•382 comments

Japan is gripped by mass allergies. A 1950s project is to blame

https://www.bbc.com/future/article/20260515-the-1950s-blunder-which-causes-mass-hay-fever-in-japan
325•ranit•19h ago•148 comments

Autoregressive next token prediction and KV Cache in transformers

https://medium.com/advanced-deep-learning/autoregressive-next-token-prediction-kv-cache-in-transf...
46•coarchitect•3d ago•0 comments

Show HN: Lance – image/video generation and understanding in one model

https://github.com/bytedance/Lance
40•cleardusk•5h ago•14 comments

SpaceX punts Starship launch as investigation opens into Starbase worker's death

https://www.scientificamerican.com/article/spacex-punts-starship-v3-launch-to-may-21-as-investiga...
11•mywacaday•39m ago•6 comments