Hacker News new | comments | show | ask | jobs | submit login

It may be somewhat interesting to analyze the properties of randomly-generated labyrinths of this type.

For instance, some spaces are clearly enclosed. i.e., there is a finite border outside which you cannot escape. Some paths seem to run on for a very long time. Are all paths enclosed? If so, given a random point on a randomly generated maze, what is the average area of an enclosure?

I don't think a "corridor" ever forks, so it's not really a labyrinth where there are decisions to be made about which way to go, it's just a bunch of disjoint long, twisty hallways.

Add a space every now an then and it becomes a 'real' maze:

    #include <stdio.h>
    main() { for(;;) {printf(rand()%2 ? "╱":"╲"); if(rand()%100<1) putchar(' ');} }

Mathematicians have given this some thought. The relevant keyword seems to be "Truchet tilings", though there's a curved variation that's more widely known. Here's a very accessible overview with some lovely generalizations of this pattern: http://mypages.iit.edu/~krawczyk/rjkisama11.pdf

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact