For me it's a BASIC one-liner which generates mazes
10 PRINT CHR$ (205.5 + RND (1)); : GOTO 10
I found this specific one via slashdot[1], but something similar, which I've never managed to find/replicate, was used to generate mazes on the Atari 800 XL at my school when I was a kid.
Oh wow this is a cool loop closure. I wrote a CHIP 8 emulator to learn stuff and my main test rom was this program. I walked through the bytecode very slowly as I learned and debugged and repeatedly wondered how the heck the program was so tiny.
1/2^n, I believe (where n is the number of lines after the first one, otherwise 1/2^n+1). So halved every time: 100% with 1 line, 50% with 2 lines, 25% with 3 lines, and so on. Width is irrelevant (you can do this in your head comparing w=1 n=2 to w=2 n=2 for example).
Also, I don't believe it doesn't depend on width. I think with constant height, the probability of completable one should increase with width, and become almost 1 for very large widths.
Wow! This is really cool. I just entered it quickly in a C64 emulator and it ran, creating a maze. Not sure, whether it would be a solvable one, but it is interesting to note, that the paths are really connected!
The paths make sense. I.e. you got uninterrupted lines, surrounded by walls, so it is a real maze and not just a lookalike or partial maze. Oh, and it's a-maze-ing! :-)
> One could argue that if the user perceives a X, then it produces a X.
This can be stretched to turn anything into anything else. For example, why can't this comment be a maze? In that case 10 REM; 20 END is my even shorter, more elegant maze program because I see a maze in it. Some constraints that are typically implied when people say "computer generated mazes": - They are solvable (have a start and end) - OR they loop endlessly with no dead ends. - Walls and spaces consume 1 element on the grid. - No space on the grid is surrounded by all 4 NWSE walls.
Everything is an illusion. \s and /s are just liquid crystal pixels on the screen, filtering some light. However it's easier to say that if something has a name and you can identify it, then it's probably that thing. I see a maze it means it's a maze :)
[1] https://developers.slashdot.org/story/12/12/01/1847244/how-d...
https://floooh.github.io/tiny8bit/c64.html?input=${wait:200}...
Expressed in terms of line width (w) and number of lines (n).
[0] Where there's a valid path from the first line to the last.
Edited for clarity and accuracy.
Continue this thread — 1 reply
What do you mean by that?
Continue this thread — 1 reply
This is the art of illusion.
Continue this thread — 5 replies
This can be stretched to turn anything into anything else. For example, why can't this comment be a maze? In that case 10 REM; 20 END is my even shorter, more elegant maze program because I see a maze in it.
Some constraints that are typically implied when people say "computer generated mazes":
- They are solvable (have a start and end)
- OR they loop endlessly with no dead ends.
- Walls and spaces consume 1 element on the grid.
- No space on the grid is surrounded by all 4 NWSE walls.
Continue this thread — 3 replies
Continue this thread — 7 replies
Continue this thread — 8 more replies