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

Comments

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

AI researchers want AI to fake "thinking"

https://www.machinesociety.ai/p/ai-researchers-want-ai-to-fake-thinking-247
1•mikelgan•1m ago•1 comments

Initial tests find lead in children's fast-fashion clothing

https://www.acs.org/pressroom/presspacs/2026/march/initial-tests-find-lead-in-childrens-fast-fash...
1•_DeadFred_•2m ago•0 comments

I build my LLM a Brain

1•Kevintbt•2m ago•0 comments

I ran retrieval-auditor against LangChain's RAG quickstart, 5/6 flagged

https://github.com/kevin-luddy39/contrarianAI/tree/main/tools/retrieval-auditor/examples/langchai...
1•kevinluddy39•2m ago•0 comments

A Disappearing JSX Framework

https://twitter.com/dashersw/status/2048719900013732232
1•arbayi•2m ago•0 comments

Show HN: Need Human Lawyer – when AI for legal work isn't enough

1•fcpguru•5m ago•0 comments

Claude Pro: Opus model will only be available if extra usage is enabled

https://support.claude.com/en/articles/11940350-claude-code-model-configuration
3•yrds96•7m ago•1 comments

Show HN: Memory Guardian – open-source memory governance for AI agents

https://github.com/rishipratap10/memory-guardian
1•rishipratap10•8m ago•1 comments

Notes on structured concurrency, or: Go statement considered harmful (2018)

https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/
1•shadow28•10m ago•0 comments

muted.io

https://muted.io/
1•bookofjoe•11m ago•0 comments

Fashion for a Hot Planet

https://faculty.engineering.asu.edu/konrad/research/cool-future-fashion-for-a-hot-planet/
1•dreadsword•13m ago•0 comments

Thunderbird Pro April 2026 Update

https://blog.thunderbird.net/2026/04/thunderbird-pro-april-2026-update/
1•raybb•14m ago•0 comments

Xiaomi MiMo-v2.5 is open-sourced

https://twitter.com/XiaomiMiMo/status/2048821516079661561
1•bsgada•16m ago•1 comments

Show HN: macOS screensaver that displays Google Trends as fish in a deep-ocean

https://apoorvkulkarni.com/trending-screensaver/
1•ak009•17m ago•0 comments

Ask HN: What Is the "Lore" of HN?

2•Cider9986•18m ago•0 comments

Show HN: CoPilot for Project Management

https://quickapproveai.com/
1•xvok•18m ago•0 comments

Compu-Global-Hyper-Mega-Net: A Retro Internet for Retro Computers (LFNW 2026) [video]

https://www.youtube.com/watch?v=cSJsGNIDjtc
1•CursedSilicon•20m ago•0 comments

A man who decides when and where your next flight will be going

https://www.cnn.com/travel/airline-planning-officer-aviation-decisions
1•charrington•20m ago•0 comments

Event Clash of Prompts: A Real-Time Prompt Battle Royale

https://builder.aws.com
1•symbiotic_sec•21m ago•1 comments

Another supply-chain attack: elementary-data Python package compromised

https://arstechnica.com/security/2026/04/open-source-package-with-1-million-monthly-downloads-sto...
3•mil22•21m ago•1 comments

Live coverage: ULA to launch 29 Amazon Leo satellites on Atlas 5 LIVE in ~2hrs

https://spaceflightnow.com/2026/04/27/live-coverage-ula-to-launch-29-amazon-leo-satellites-on-atl...
1•bookmtn•23m ago•0 comments

Immigrants' Recent Effects on Government Budgets: 1994–2023

https://www.cato.org/white-paper/immigrants-recent-effects-government-budgets-1994-2023
3•Anon84•23m ago•0 comments

Talkie: a 13B vintage language model from 1930

https://talkie-lm.com/introducing-talkie
1•jekude•25m ago•0 comments

Ask HN: Will hardware ever be cheap again?

2•bjourne•25m ago•0 comments

Talkie: An LM from 1930

https://talkie-lm.com/chat
1•yusufozkan•25m ago•0 comments

ChatGPT Images 2.0 Still Can't Draw the Seven-Legged Spider I Want

https://will-keleher.com/posts/chatgpt-image-2-still-cant-draw-a-seven-legged-spider/
2•bsgada•30m ago•0 comments

AMD used AI to reimplement slurm in Rust

https://github.com/ROCm/spur
1•latchkey•30m ago•0 comments

Trump Administration Will Pay More Energy Firms to Cancel Wind Farms

https://www.nytimes.com/2026/04/27/climate/trump-administration-wind-farms.html
5•duxup•30m ago•1 comments

OlmoEarth: Custom embedding exports for downstream analysis

https://allenai.org/blog/olmoearth-embeddings
1•gmays•30m ago•0 comments

Using Rust to Build a $1 Handheld Gaming Console

https://chrisdell.info/using-rust-to-build-a-1-dollar-handheld-gaming-console/
2•kianryan•32m ago•0 comments