Amazing [pun not intended, sorry] that something coherent can be generated through such absurdly simple, random code...
Originally shared by Norbert Landsteiner
I Declare Maze Day
Many amazing maze programs have been written for computers of all bread and kind, but, for some reason, there's no international Maze Day (while a few educational institutions in the US do have one of their own).
Here's one example, a quite famous BASIC one-liner for Commodore 8-bit computers generating a maze from just two characters ("\" and "/"):
10 PRINT CHR$(205.5+RND(1));: GOTO 10
Try it online: http://www.masswerk.at/pet/?run=maze
What may be a suitable date for Maze Day?
Do you remember any maze algorithms in particular?
Sister blog of Physicists of the Caribbean in which I babble about non-astronomy stuff, because everyone needs a hobby
Subscribe to:
Post Comments (Atom)
Review : Norse Myths and Tales (II)
As per usual, a single-part post just isn't going to cut it. Having ranted at considerable length against the Norse sagas (of Flame Tree...
-
I've noticed that some people care deeply about the truth, but come up with batshit crazy statements. And I've caught myself rationa...
-
Hmmm. [The comments below include a prime example of someone claiming they're interested in truth but just want higher standard, where...
-
"The price quoted by Tesla does not include installation of the unit. To this needs to be added the cost of installing solar panels to ...
Python:
ReplyDeleteimport random, sys
while True: sys.stdout.write(random.choice(u"╱╲"))
Python3:
import random
while True: print(random.choice(u"╱╲"), end='')
Other characters that work well
fileformat.info - Unicode Characters in the Box Drawing Block
The code doesn't guarantee a solution path through the maze.
ReplyDeleteThat's debatable. Generate a large enough maze and select a small enough area and you'll definitely have something with a navigable route. What it doesn't do is guarantee a solution within a fixed area.
ReplyDeletehttps://lh3.googleusercontent.com/OOocaQB0CvT6AHenEQJBFZcQdAh048RUtnTnDWBPKlbk2e07uUKiDuqPUJH_6e6bsotH_xxScnRlkv9E1DzHSoSFjqO0MQzwOqQi=s0
ReplyDeleteI thought that font looked familiar...
ReplyDeleteI guess that depends on what one takes the entrance and exit definition to be. Left to right edges?
ReplyDelete