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.

Localsend: An open-source cross-platform alternative to AirDrop

https://github.com/localsend/localsend
342•bilsbie•3h ago•140 comments

Microsoft VibeVoice: Open-Source Frontier Voice AI

https://github.com/microsoft/VibeVoice
145•tosh•3h ago•95 comments

Show HN: Live Sun and Moon Dashboard with NASA Footage

https://www.lumara-space.app/
43•beeswaxpat•1h ago•9 comments

OpenAI CEO's Identity Verification Company Announced Fake Bruno Mars Partnership

https://www.vice.com/en/article/openai-ceo-identity-verification-company-fake-bruno-mars-partners...
144•BoggleOhYeah•1h ago•58 comments

Deep under Antarctic ice, a long-predicted cosmic whisper breaks through

https://phys.org/news/2026-04-deep-antarctic-ice-cosmic-strange.html
29•rbanffy•1d ago•8 comments

Talkie: a 13B vintage language model from 1930

https://talkie-lm.com/introducing-talkie
515•jekude•17h ago•212 comments

UAE Leaves OPEC and OPEC+

https://www.reuters.com/markets/commodities/uae-says-it-quits-opec-opec-statement-2026-04-28/
150•TechTechTech•2h ago•42 comments

I Spent My Sabbatical Building a Power Meter for Sledgehammers

https://leblancfg.com/intensity-pad-founder-story.html
33•alin23•1d ago•29 comments

The predictable failure of the QDay Prize

https://algassert.com/post/2601
36•firefly284•1d ago•3 comments

Period tracking app has been yapping about your flow to Meta

https://femtechdesigndesk.substack.com/p/your-period-tracking-app-has-been
156•campuscodi•3h ago•117 comments

The World's Most Complex Machine

https://worksinprogress.co/issue/the-worlds-most-complex-machine/
207•mellosouls•3d ago•122 comments

Is my blue your blue? (2024)

https://ismy.blue/
647•theogravity•18h ago•427 comments

UAE to leave OPEC in blow to oil cartel

https://www.ft.com/content/8c354f2d-3e66-47f1-aad4-9b4aa30e386d
164•bazzmt•2h ago•134 comments

WASM is not quite a stack machine

https://purplesyringa.moe/blog/wasm-is-not-quite-a-stack-machine/
111•signa11•10h ago•37 comments

Voice Modems

https://computer.rip/2026-04-26-voice-modems.html
26•K7PJP•1d ago•1 comments

GitHub Copilot code review will start consuming GitHub Actions minutes

https://github.blog/changelog/2026-04-27-github-copilot-code-review-will-start-consuming-github-a...
78•whtsky•6h ago•81 comments

GTFOBins

https://gtfobins.org/
311•StefanBatory•8h ago•77 comments

An Update on GitHub Availability

https://github.blog/news-insights/company-news/an-update-on-github-availability/
212•salkahfi•5h ago•173 comments

Pgrx: Build Postgres Extensions with Rust

https://github.com/pgcentralfoundation/pgrx
151•luu•3d ago•14 comments

Mo RAM, Mo Problems (2025)

https://fabiensanglard.net/curse/
180•blfr•2d ago•33 comments

Tiled Words 6 Month Update

https://paulmakeswebsites.com/writing/six-months-of-tiled-words/
49•paulhebert•1d ago•21 comments

In Kannauj, perfumers have been making monsoon-infused mitti attar for centuries

https://www.atlasobscura.com/articles/smell-of-rain-kannauj-perfume-mitti-attar-india
41•bcaulfield•1d ago•6 comments

Can You Find the Comet?

https://apod.nasa.gov/apod/ap260427.html
102•ColinWright•1d ago•62 comments

Meetings are forcing functions

https://www.mooreds.com/wordpress/archives/3734
161•zdw•2d ago•100 comments

Microsoft and OpenAI end their exclusive and revenue-sharing deal

https://www.bloomberg.com/news/articles/2026-04-27/microsoft-to-stop-sharing-revenue-with-main-ai...
943•helsinkiandrew•1d ago•804 comments

Easyduino: Open Source PCB Devboards for KiCad

https://github.com/Hanqaqa/Easyduino
238•Hanqaqa•21h ago•40 comments

High Performance Git

https://gitperf.com/
197•gnabgib•14h ago•70 comments

Networking changes coming in macOS 27

https://eclecticlight.co/2026/04/23/networking-changes-coming-in-macos-27/
250•pvtmert•23h ago•219 comments

How I leared what a decoupling capacitor is for, the hard way

https://nbelakovski.substack.com/p/how-i-learned-what-a-decoupling-capacitor
131•actinium226•2d ago•70 comments

The quiet resurgence of RF engineering

https://atempleton.bearblog.dev/quiet-resurgence-of-rf-engineering/
224•merlinq•2d ago•128 comments