frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

A quantitative, multimodal wearable bioelectronic device for stress assessment

https://www.nature.com/articles/s41467-025-67747-9
1•PaulHoule•54s ago•0 comments

Why Big Tech Is Throwing Cash into India in Quest for AI Supremacy

https://www.wsj.com/world/india/why-big-tech-is-throwing-cash-into-india-in-quest-for-ai-supremac...
1•saikatsg•57s ago•0 comments

How to shoot yourself in the foot – 2026 edition

https://github.com/aweussom/HowToShootYourselfInTheFoot
1•aweussom•1m ago•0 comments

Eight More Months of Agents

https://crawshaw.io/blog/eight-more-months-of-agents
1•archb•3m ago•0 comments

From Human Thought to Machine Coordination

https://www.psychologytoday.com/us/blog/the-digital-self/202602/from-human-thought-to-machine-coo...
1•walterbell•3m ago•0 comments

The new X API pricing must be a joke

https://developer.x.com/
1•danver0•4m ago•0 comments

Show HN: RMA Dashboard fast SAST results for monorepos (SARIF and triage)

https://rma-dashboard.bukhari-kibuka7.workers.dev/
1•bumahkib7•4m ago•0 comments

Show HN: Source code graphRAG for Java/Kotlin development based on jQAssistant

https://github.com/2015xli/jqassistant-graph-rag
1•artigent•10m ago•0 comments

Python Only Has One Real Competitor

https://mccue.dev/pages/2-6-26-python-competitor
2•dragandj•11m ago•0 comments

Tmux to Zellij (and Back)

https://www.mauriciopoppe.com/notes/tmux-to-zellij/
1•maurizzzio•12m ago•1 comments

Ask HN: How are you using specialized agents to accelerate your work?

1•otterley•13m ago•0 comments

Passing user_id through 6 services? OTel Baggage fixes this

https://signoz.io/blog/otel-baggage/
1•pranay01•14m ago•0 comments

DavMail Pop/IMAP/SMTP/Caldav/Carddav/LDAP Exchange Gateway

https://davmail.sourceforge.net/
1•todsacerdoti•14m ago•0 comments

Visual data modelling in the browser (open source)

https://github.com/sqlmodel/sqlmodel
1•Sean766•16m ago•0 comments

Show HN: Tharos – CLI to find and autofix security bugs using local LLMs

https://github.com/chinonsochikelue/tharos
1•fluantix•17m ago•0 comments

Oddly Simple GUI Programs

https://simonsafar.com/2024/win32_lights/
1•MaximilianEmel•17m ago•0 comments

The New Playbook for Leaders [pdf]

https://www.ibli.com/IBLI%20OnePagers%20The%20Plays%20Summarized.pdf
1•mooreds•18m ago•0 comments

Interactive Unboxing of J Dilla's Donuts

https://donuts20.vercel.app
1•sngahane•19m ago•0 comments

OneCourt helps blind and low-vision fans to track Super Bowl live

https://www.dezeen.com/2026/02/06/onecourt-tactile-device-super-bowl-blind-low-vision-fans/
1•gaws•21m ago•0 comments

Rudolf Vrba

https://en.wikipedia.org/wiki/Rudolf_Vrba
1•mooreds•21m ago•0 comments

Autism Incidence in Girls and Boys May Be Nearly Equal, Study Suggests

https://www.medpagetoday.com/neurology/autism/119747
1•paulpauper•22m ago•0 comments

Wellness Hotels Discovery Application

https://aurio.place/
1•cherrylinedev•23m ago•1 comments

NASA delays moon rocket launch by a month after fuel leaks during test

https://www.theguardian.com/science/2026/feb/03/nasa-delays-moon-rocket-launch-month-fuel-leaks-a...
1•mooreds•24m ago•0 comments

Sebastian Galiani on the Marginal Revolution

https://marginalrevolution.com/marginalrevolution/2026/02/sebastian-galiani-on-the-marginal-revol...
2•paulpauper•27m ago•0 comments

Ask HN: Are we at the point where software can improve itself?

1•ManuelKiessling•27m ago•1 comments

Binance Gives Trump Family's Crypto Firm a Leg Up

https://www.nytimes.com/2026/02/07/business/binance-trump-crypto.html
1•paulpauper•27m ago•1 comments

Reverse engineering Chinese 'shit-program' for absolute glory: R/ClaudeCode

https://old.reddit.com/r/ClaudeCode/comments/1qy5l0n/reverse_engineering_chinese_shitprogram_for/
1•edward•27m ago•0 comments

Indian Culture

https://indianculture.gov.in/
1•saikatsg•30m ago•0 comments

Show HN: Maravel-Framework 10.61 prevents circular dependency

https://marius-ciclistu.medium.com/maravel-framework-10-61-0-prevents-circular-dependency-cdb5d25...
1•marius-ciclistu•30m ago•0 comments

The age of a treacherous, falling dollar

https://www.economist.com/leaders/2026/02/05/the-age-of-a-treacherous-falling-dollar
2•stopbulying•31m ago•0 comments
Open in hackernews

Maze Algorithms (2017)

http://www.jamisbuck.org/mazes/
183•surprisetalk•2w ago

Comments

tromp•2w ago
A maze generator in the shape of a maze whose corridors spell a 4-letter word:

    char*M,A,Z,E=40,J[40],T[40];main(C){for(*J=A=scanf(M="%d",&C);
    --            E;             J[              E]             =T
    [E   ]=  E)   printf("._");  for(;(A-=Z=!Z)  ||  (printf("\n|"
    )    ,   A    =              39              ,C             --
    )    ;   Z    ||    printf   (M   ))M[Z]=Z[A-(E   =A[J-Z])&&!C
    &    A   ==             T[                                  A]
    |6<<27<rand()||!C&!Z?J[T[E]=T[A]]=E,J[T[A]=A-Z]=A,"_.":" |"];}
Generates a maze on the fly after entering the desired height of the maze. This compiled fine back in 1988 when I submitted it to the IOCCC (having rediscovered Eller's algorithm). Modern C compilers don't allow constant strings to be overwritten, which can be avoided by changing the first line to

    char M[3],A,Z,E=40,J[40],T[40];main(C){for(*J=A=scanf("%d",&C);
The code is explained in detail at https://tromp.github.io/maze.html
binaryturtle•2w ago
If I squeeze the eyes I can read the "MAZE". :)

Sadly neither version works here with an older clang on OS X. Both variants build fine with 9 warnings each. But the old variant dies with a "Bus Error: 10", and the new variant with "Segmentation fault: 11". Same with gcc (albeit only 8 warnings.)

/edit

OK, just wrong user input. You gotta feed it a number, and not a "foobar" or another random string.

MaskRay•2w ago
Amazing! I read you article in 2012 when the link was https://homepages.cwi.nl/~tromp/maze.html I was learning Haskell and Ocaml and wrote my own article in Chinese then https://maskray.me/blog/2012-11-02-perfect-maze-generation

Now I should fix the link.

munificent•1w ago
Neat!

Related: Here's a C program that draws random dungeons sort of like you use in a roguelike dungeon crawler:

    #include <time.h> //  Robert Nystrom
    #include <stdio.h> // @munificentbob
    #include <stdlib.h> //     for Ginny
    #define  r return    //    2008-2019
    #define  l(a, b, c, d) for (i y=a;y\
    <b; y++) for (int x = c; x < d; x++)
    typedef int i;const i H=40;const i W
    =80;i m[40][80];i g(i x){r rand()%x;
    }void cave(i s){i w=g(10)+5;i h=g(6)
    +3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
    -1,u+h+2,t-1            ,t+w+2)if(m[
    y][x]=='.'                  )r;i d=0
    ;i e,f        ;if(!s){l(      u-1,u+
    h+2,t-    1,t+w+2){i s=x<t     ||x>t
    +w;i    t=y<u||           y>    u+h;
    if(s    ^t&&              m[      y]
    [x    ]=='#'    ){d++;    if(g    (d
    )     ==0)    e=x,f=y;    }}if    (d
    ==    0)r;    }l(u-1,u    +h+2    ,t
    -1    ,t+w    +2){i s=    x< t    ||
    x>    t+w;    i t= y<u    ||y>    u+
    h;    m[y]      [x]= s    &&t?   '!'
    :s^t    ?'#'                    :'.'
    ;}if    (d>0)m                  [f][
    e]=g(2    )?'\'':'+';for(i j=0;j<(s?
    1:g(6)        +1);j++)m[g(h)+u][g(w)
    +t]=s?'@'                 :g(4) ==0?
    '$':65+g(62)              ;}i main(i
    argc, const char* argv[]) {srand((i)
    time(NULL));l(0, H, 0,W)m[y][x]=' ';
    for(i j=0;j<1000;j++)cave(j==0);l(0,
    H,0,W) {i c=m[y][x]; putchar(c=='!'?
    '#':c);if(x==W-1)printf("\n");}r 0;}
dfajgljsldkjag•2w ago
I've always known about algorithms that solve mazes, but never about actually making them. It's interesting seeing all these algorithms and how the mazes they generate look different.
amelius•1w ago
The main insight in many of these algorithms is that if you have a tree, there's exactly one path between any two leaves (assuming you don't pass over a branch twice). So if you just draw a random tree-like structure and make the entry and exit points of the maze leaves in the tree, then you have a valid maze with exactly one solution.
bonsai_spool•2w ago
Mike Bostock had several very lovely visualizations back on the D3.js site which I can't find. Here's a cool blogpost he wrote: https://bost.ocks.org/mike/algorithms/#maze-generation
dang•2w ago
Related? https://news.ycombinator.com/item?id=7632092 (April 2014)
OscarCunningham•2w ago
Is it known which algorithms produce 'difficult' mazes? I'm imagining you could run all the maze solving algorithms against all the maze generating algorithms many times, and then calculate what the Nash equilibrium would be if the solver is trying to minimise expected time and the generator is trying to maximise it.
1313ed01•2w ago
There is another old site ("since September 23, 1996"), my second favorite maze site, that has some articles about things like that. Like on the page below ("Tips on how to create difficult and fun Mazes, and how to solve and analyze them").

https://www.astrolog.org/labyrnth/psych.htm

I think there is a difference if you want to make it only expensive to solve using popular maze solver algorithms, vs to make it difficult for a human to solve. Many of the recommendations on that page are for how to do things that can make a maze more difficult for humans to solve, but will not always matter to an algorithm that just mechanically tries solutions in some order.

nickevante•2w ago
For anyone interested in this, Jamis Buck's book 'Mazes for Programmers' is a masterpiece of the genre.

My personal favorite distinction is between the Recursive Backtracker (which creates long, winding corridors with few dead ends which is great for tower defense games) vs. Prim's Algorithm (which creates lots of short cul-de-sacs which is better for roguelikes). The bias of the algorithm dictates the feel of the game more than the graphics do.

jaberjaber23•2w ago
seconding the jamis buck book, its one of the few programming books i actually finished. the way he explains each algorithm with visualizations makes it stick
ginko•2w ago
It feels like many of the more complicated algorithms produce worse mazes (long horizontal/vertical walls, many 1-2 square dead ends next to another) than basic recursive backtracking.
dang•2w ago
Related:

Maze Generation: Recursive Division (2011) - https://news.ycombinator.com/item?id=42703816 - Jan 2025 (12 comments)

Maze Algorithms (2011) - https://news.ycombinator.com/item?id=23429368 - June 2020 (22 comments)

Representing a Toroidal Grid - https://news.ycombinator.com/item?id=10608476 - Nov 2015 (2 comments)

Maze Generation: Recursive Backtracking - https://news.ycombinator.com/item?id=4058525 - June 2012 (1 comment)

Maze Generation: Weave mazes - https://news.ycombinator.com/item?id=4052856 - June 2012 (3 comments)

Maze-generation algorithms, with JS demos - https://news.ycombinator.com/item?id=2190017 - Feb 2011 (9 comments)

Generating random mazes with the Growing Tree algorithm (w/ Javascript demo) - https://news.ycombinator.com/item?id=2148348 - Jan 2011 (6 comments)

Maze Generation: Wilson's algorithm - https://news.ycombinator.com/item?id=2123695 - Jan 2011 (11 comments)

Maze Generation: Kruskal's Algorithm - https://news.ycombinator.com/item?id=2062999 - Jan 2011 (9 comments)

Maze Generation: Eller's Algorithm - https://news.ycombinator.com/item?id=2048752 - Dec 2010 (9 comments)

Also:

Wilson's Algorithm - https://news.ycombinator.com/item?id=45549017 - Oct 2025 (9 comments)

Maze Tree - https://news.ycombinator.com/item?id=7746822 - May 2014 (38 comments)

Solving a Maze with D3.js - https://news.ycombinator.com/item?id=7631864 - April 2014 (19 comments)

Think Labyrinth: Maze Algorithms - https://news.ycombinator.com/item?id=10101728 - Aug 2015 (10 comments)

Practical algorithms and code optimization: maze generation - https://news.ycombinator.com/item?id=5431561 - March 2013 (10 comments)

Maze Algorithms - https://news.ycombinator.com/item?id=157266 - April 2008 (1 comment)

Others?

y42•2w ago
of course! :D (how to approach the development of a maze algorithm)

https://news.ycombinator.com/item?id=23131983

dang•2w ago
That's not a good link for a list of past threads since the idea for the latter is to include only the ones with interesting comments.

However, it looks like a good article that could use a repost! Just not soon, since we want to give enough time for the hivemind caches to clear :) - if you want to repost it in (say) a month or two, email us at hn@ycombinator.com and we'll put it in the SCP (https://news.ycombinator.com/item?id=26998308).

y42•1w ago
Sure will do, thanks! (first time I am hearing about the "SCP")
indigoabstract•2w ago
I especially like this one:

https://news.ycombinator.com/item?id=45549017

Wilson’s Algorithm gives the most pleasing visual results for me.

dang•2w ago
Added above - thanks!
richard_chase•2w ago
This is the kind of stuff I come here for.
kamens•2w ago
I used Jamis' book extensively to build this AI tool for generating custom mazes of any shape! https://kamens.com/blog/generating-custom-mazes-with-ai
kamens•2w ago
The main difference between the above tool and most custom shaped maze generators out there is breaking the assumption that the maze's outer shape must be defined by adding or removing regularly-shaped cells along the edge.

To have mazes look more human drawn, cells need to be irregular and the inner walls need naturally follow the contours of the outer shape.

jcynix•2w ago
You show an impressive variation of mazes, cool!
kamens•1w ago
thank you! we've generated ~600 crazy unique mazes for kids so far, kinda want to make a gallery
ogogmad•1w ago
Have you considered finding a conformal transformation† that maps a square to any other possible shape, as long as the shape doesn't have any holes? Such a transformation always exists by the Riemann Mapping Theorem, and is unique as long as you specify in addition (1.) which point the square's centre maps to, and (2.) the angle of rotation around that point. Not sure if anyone's ever tried that.

If you actually want more aesthetic freedom, you can compose with an arbitrary diffeomorphism of the square to itself. But I think that might usually look worse.

† - That is, preserving all angles, including right angles. The terminology stems from the output angles conforming (???) to the input angles.

ogogmad•1w ago
P.S. This suggestion would eliminate your pinch points.
kamens•1w ago
i'm torn between my stupidity re:your first comment and my love of eliminating pinch points (now you're speaking my language). i need to read up a lot to better understand your suggestion!

(most pinch points are gone these days, it just required a lot of edge case hunting)

jtolmar•2w ago
Lovely page. Reminds me of the venerable Think Labyrinth (https://www.astrolog.org/labyrnth/algrithm.htm) page, but the live demos add a lot.

My favorite maze algorithm is a variant of the growing tree algorithm - each time you carve a cell, add it to a random one of N lists. When choosing a cell to visit, pop the last cell off the first non-empty list. It's considerably faster than the standard tree algorithm, but more importantly, changing N has a dramatic impact on the texture of the maze (compare 1 2 4 8 etc on a decently large maze).

89netraM•1w ago
I've built a few maze generators based on Jamis' book. The one I'm most proud of is this one https://xn--sberg-lra.net/maze/irregular?size=5&entryCount=1 that generates SVG mazes with sort of irregular lines.
racecar789•1w ago
Pretty good! It would be nice to have a little icon showing at the preferred ending location.
89netraM•1w ago
Thanks! Yeah, you're right, the point is to get to the center, and it's a lot easier to know where that is on my original "Polar" maze https://xn--sberg-lra.net/maze/polar?size=5&entryCount=1 I should update them to have a goal icon like you say, maybe antoher time.
snorbleck•1w ago
Awesome resource. I recently (in the past week) created a maze game. I used Claude (sonnet 4.5) for the most part, but some things, like images, were created with ChatGPT. I may do a blog about it if anyone is interested in the inner-workings and my thought process from concept to vibecoded. I am by no means a game dev, was just curious about what it would take to create unique single solution mazes with some game-like components thrown in, and trying it with the assistance of AI. It turned out somewhat retro. Now go get lost!

https://lorelabyrinth.entropicsystems.net/weekly

PacificSpecific•1w ago
Hey thanks for sharing. I gave it a try but ran into some issues.

Is this intended to be able to be used on a phone? I saw the instructions about guiding a yellow ball but what I experienced was about 10 seconds of chiptune music with a maze that had some icons I couldn't interact with.

After the 10 seconds a series of green spheres and vertical lines washed across the screen but I wasn't able to control them.

I'm using the duck duck go browser on Android if that helps.

snorbleck•1w ago
Hi there; NOT compatible or designed with mobile in mind unfortunately. Built more for desktop browser and keyboard (WASD-style movement controls) or trackpad. That, and the maze image generator in its current form requires static dimensions so the pieces can be placed within their chosen coordinates, meaning it displays better on full-sized browser :(
PacificSpecific•1w ago
Ah fair enough! Will give it another go from my desktop tomorrow.
bricks96•1w ago
Here's a Google Sheets Maze Generator that's pure formula and no script. This post has got me thinking how I might format the formula to be shaped like a maze. https://tinyurl.com/SheetsMazeGenerator
rawxtl•1w ago
I still remember the days when I started out programming.. I used simply copy and write code from TheCodingTrain's challenge videos. And the recursive backtracking algorithm was the first project I took on by myself coding it in java while only looking at how it works from his explanation.
ZuzuDuck•1w ago
This makes me nostalgic, when i started to programming i tried to create ultimate generating maze algorithm and use it in some game. But my solutions was really naive.