frontpage.
newsnewestaskshowjobs

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.

GPT 5.6 Cyber

https://openai.com/index/expanding-daybreak-as-the-cyber-defense-window-narrows/#websocket-authen...
1•smusamashah•1m ago•0 comments

Folding Prion Protein with AI

https://blog.georeactor.com/prionbio-1
1•mapmeld•3m ago•0 comments

Microsoft Responds to Outcry After Quiet Enterprise Install of Beta 'Photos' App

https://www.neowin.net/news/windows-11-admins-unhappy-as-microsoft-found-installing-unexpected-ne...
2•m463•7m ago•0 comments

Egg: Fast and Extensible Equality Saturation

https://cacm.acm.org/research-highlights/egg-fast-and-extensible-equality-saturation/
1•t-3•10m ago•0 comments

More Young College Graduates Are Living at Home. Is That a Bad Thing?

https://www.nytimes.com/2026/08/02/business/college-graduates-living-at-home.html
2•littlexsparkee•14m ago•3 comments

27x Faster Terminal Text Effects Rust Port

https://github.com/omacom-io/ttfx
1•smusamashah•18m ago•1 comments

Muse Glimmer

https://simonwillison.net/2026/Aug/10/introducing-muse-glimmer/
3•raybb•19m ago•0 comments

HN is good for marketing other than communication or study!?

3•lilerjee•19m ago•0 comments

Demon's souls prototype presentation for gameshare iv [video]

https://www.youtube.com/watch?v=qVK_rc-tnGY
2•andrekandre•20m ago•1 comments

Updated GPG Key for Signing Firefox and Thunderbird Releases

https://blog.mozilla.org/security/2026/08/10/updated-gpg-key-for-signing-firefox-and-thunderbird-...
6•csmantle•21m ago•0 comments

Language models transmit behavioural traits through hidden signals in data

https://www.nature.com/articles/s41586-026-10319-8
3•Phithagoras•23m ago•0 comments

Teaching an Open Model to Do Science

https://www.arcee.ai/blog/teaching-an-open-model-to-do-science
2•gmays•24m ago•0 comments

VSCode-code-widgets: Interactive widgets embedded in source code

https://github.com/CZDanol/vscode-code-widgets
2•thunderbong•28m ago•0 comments

'We Did Our Best': Metaphors of Parenting and AI

https://www.nybooks.com/articles/2026/06/25/we-did-our-best-ai-meghan-ogieblyn/
3•mitchbob•32m ago•1 comments

Why My Father Is Wrong: A Defense of Guitar Hero

https://whatever.scalzi.com/2026/08/10/why-my-father-is-wrong-a-defense-of-guitar-hero/
5•Tomte•33m ago•0 comments

Don't Classify. Hallucinate

https://softwaredoug.com/blog/2026/08/10/hypothetical-classifications.html
2•Tomte•34m ago•0 comments

Show HN: Seedle, daily -dle for Minecraft seeds

https://seedle.loch.tools/
2•lwansbrough•38m ago•0 comments

Plethora – your new (social) platform for Interactive Media

https://plethora.studio/
2•zenarin•38m ago•1 comments

A Technical Framework for Bring Your Own Cloud Applications

https://byocanywhere.org/
2•aloknnikhil•46m ago•0 comments

Pretense of You

https://iamwisdom.substack.com/p/pretense-of-you
2•I_Am_Wisdom•48m ago•0 comments

Wingdings (Album) 2026

https://en.wikipedia.org/wiki/Wingdings_(album)
6•ddxv•53m ago•1 comments

Hatsune Miku

https://en.wikipedia.org/wiki/Hatsune_Miku
3•palad1n•58m ago•0 comments

Meilisearch vs. Manticore: Setting the Record Straight

https://medium.com/@s_nikolaev/meilisearch-vs-manticore-setting-the-record-straight-e7d51aa08db2
2•snikolaev•59m ago•0 comments

Call centres using AI to 'whiten' Indian accents (2025)

https://tech.yahoo.com/ai/articles/call-centres-using-ai-whiten-090000847.html
6•vismit2000•1h ago•2 comments

Kredit – Real-time Risk Intelligence for Agents

https://kredit.sh/
3•jacobrafati•1h ago•3 comments

Mindscape: Chandra Sripada on How LLMs and Humans Are Cognitive Cousins

https://preposterousuniverse.com/podcast/2026/08/10/363-chandra-sripada-on-how-llms-and-humans-ar...
3•wwarner•1h ago•1 comments

TLabel – A unified annotation format and converter for tactile robotics datasets

https://github.com/liesliy/tlabel
2•liesliy•1h ago•0 comments

US President hid in catering cart for secret flight in Turkey amid Iran threat

https://www.theguardian.com/us-news/2026/aug/10/trump-secret-flight-nato-return
40•Jimmc414•1h ago•21 comments

"Operator, can you hear me?" A Faithful Line into the UNISOC Baseband

https://arxiv.org/abs/2608.07143
3•sbulaev•1h ago•0 comments

Meghan O'Gieblyn: Against Slop

https://www.nybooks.com/online/2026/07/11/against-slop-meghan-ogieblyn/
5•mitchbob•1h ago•1 comments