News for hackers. Stuff that matters.
Re:Mazette by whoisburbansky on Monday May 03, 2021 @01:42PM (#27028189)
Popped in expecting JS code procedurally generating and solving the mazes on the fly, but it looks like the page just pulls animated GIFs of pre-generated maze solutions?

There are only two GIFs in the `/mazes/L40` directory, so now I'm lost as to how the query parameters in the `img src` determine which maze solution is used.

Re:Mazette by livre on Monday May 03, 2021 @03:02PM (#27029295)
The query parameters don't affect which solution is used. They are only used to force the browser to reload the gif from the server each time, bypassing the browser cache. The only thing that determines what maze gif you get is probably some server-side code that chooses between mazes/L40/L40-01.gif and mazes/L40/L40-02.gif with each page load.
Re:Mazette by whoisburbansky on Monday May 03, 2021 @04:21PM (#27030159)
Ahhh that makes sense, thanks. For some reason I could have sworn I saw multiple solutions for a single maze, which is why I jumped to the query parameters having something to do with the solution picked.
Re:Mazette by reflexe on Monday May 03, 2021 @02:32PM (#27028920)
I feel cheated now
Re:Mazette by cscheid on Monday May 03, 2021 @01:42PM (#27028180)
If you enjoyed that, you'll probably also enjoy the "Maze Generation" section of Mike Bostock's Visualizing Algorithms talk: https://bost.ocks.org/mike/algorithms/#maze-generation
Re:Mazette by tartoran on Monday May 03, 2021 @05:05PM (#27030637)
This is great, I've bumped into this a while ago but lost the link. The maze generated algorithm gradually transformed into a tidy tree is very insightful.
Re:Mazette by jhbadger on Monday May 03, 2021 @06:53PM (#27031948)
There's also a whole book dedicated to maze generating and solving: Jamis Buck's "Mazes for Programmers" https://pragprog.com/titles/jbmaze/mazes-for-programmers/
Re:Mazette by ashtonbaker on Monday May 03, 2021 @02:15PM (#27028681)
very nice, thank you.
Re:Mazette by skrebbel on Monday May 03, 2021 @03:01PM (#27029277)
I really wonder what brings someone to design a logo and register a domain name for a site that displays one out of two GIFs, randomly. Is it some kind of "how mesmerized can we make HN" performance art?
Re:Mazette by awame on Tuesday May 04, 2021 @01:50AM (#27034430)
Exactly!
Re:Mazette by skrebbel on Tuesday May 04, 2021 @02:19AM (#27034567)
Love it :-)
Re:Mazette by awame on Tuesday May 04, 2021 @02:26AM (#27034604)
Share it! Art is for everyone :-)
Re:Mazette by INTPenis on Monday May 03, 2021 @02:20PM (#27028764)
It actually passes the exit because it's not making the "turn" to it. So it tries a bunch of other paths first before the time comes to try the turn towards the exit.
Re:Mazette by nxpnsv on Monday May 03, 2021 @03:07PM (#27029363)
It had me pulling my hair
Re:Mazette by Pompidou on Monday May 03, 2021 @03:04PM (#27029320)
Funfact : in the south-east of France, "mazette" is an interjection used to express astonishment or incredulity. It is used alone, as a sentence : "He is a billionaire. Mazette!".
Re:Mazette by davidw on Monday May 03, 2021 @03:07PM (#27029358)
Maybe the same root as the Italian 'ammazza!' ? Which literally means 'kill', but it's not a violent expression.
Re:Mazette by Pompidou on Monday May 03, 2021 @04:17PM (#27030115)
I can find one etyomoly for "mazette" used as a noun, but it doesn't fit very well to the use of the interjection. Maybe it's linked the same root as "maze" and old english "amazian" (to confuse/perplex).
Re:Mazette by codeulike on Monday May 03, 2021 @03:18PM (#27029488)
Here's are some more interesting maze algorithms with proper live demos: http://weblog.jamisbuck.org/under-the-hood/

This one is really nice to watch: http://weblog.jamisbuck.org/2015/1/15/better-recursive-divis...

Re:Mazette by Secretmapper on Monday May 03, 2021 @02:04PM (#27028525)
I'm not sure how kosher this is as it's my own project, but this reminds me of a project I did for college back then:

https://arianv.com/post/cs-180-pathfinding/

It's a python/jupyter project though that's just rendered into html. It's over-engineered and over-explained :D

Re:Mazette by rchaud on Monday May 03, 2021 @03:19PM (#27029501)
I kept clicking on it thinking it would generate a path to where I cliked.

Did the author of the site really buy a domain, point it at a web server, and add SSL, for this? Two GIFs?

Re:Mazette by awame on Tuesday May 04, 2021 @01:49AM (#27034424)
10 now
Re:Mazette by eMGm4D0zgUAVXc7 on Monday May 03, 2021 @02:52PM (#27029159)
Re:Mazette by nsb1 on Monday May 03, 2021 @02:24PM (#27028817)
Is it just me or are there only two different mazes?
Re:Mazette by xd1936 on Monday May 03, 2021 @02:55PM (#27029207)
Seems so.

https://www.mazette.net/mazes/L40/

It's loading one of two GIFs from this directory.

Re:Mazette by feydaykyn on Monday May 03, 2021 @02:24PM (#27028809)
I just saw the line ignoring the exit and continue to search for it, that was... Unexpected!
Re:Mazette by skrebbel on Monday May 03, 2021 @02:59PM (#27029260)
it's a breadth-first search that takes every right it can. the exit was on the left, so it only tries it when all the "earlier" rights have been exhausted.
Re:Mazette by Toutouxc on Monday May 03, 2021 @03:03PM (#27029303)
This is absolutely a depth-first search, not BFS.
Re:Mazette by skrebbel on Monday May 03, 2021 @04:19PM (#27030134)
Yes, obviously (facepalms). Thanks :-)
Re:Mazette by davidw on Monday May 03, 2021 @03:05PM (#27029332)
In Italian, mazzetta is a roll of money - usually used as 'bribe'.
Re:Mazette by HKH2 on Tuesday May 04, 2021 @10:44AM (#27038130)
This reminds me of Matthias Wandel's mouse mazes.
Re:Mazette by aiibe on Monday May 03, 2021 @03:17PM (#27029482)
I feel cheated but satisfying to watch
Re:Mazette by twic on Monday May 03, 2021 @02:47PM (#27029083)
What's interesting about this?
Re:Mazette by wintorez on Monday May 03, 2021 @02:48PM (#27029099)
This was Zen to watch.
Re:Mazette by awame on Tuesday May 04, 2021 @01:48AM (#27034417)
Isn't it