latticeLattice 1

This sim first generates a random array of one of four tiles.
tiles
At each turn, each tile checks one of its four neighbors.
If they 'clash', the tile is changed to a more suitable one.
Eventually, every tile will have allowable neighbors on all sides.

Lattice 1 Stage

Play Sim     View Stage

Controls:

None.

latticeLattice 2

This generates a 'simply connected' maze. There are no loops, closed circuits or inaccessible areas. It has exactly one solution.

First, a 'shoot' moves randomly to any empty neighbor cells, creating a path. When it can no longer continue, it is removed and placed on a randomly selected part of the path, where the process begins again.

Lattice 2 Stage

Play Sim     View Stage

Controls:

None.

latticeLattice 3

This is the same as Lattice2 above, except when dead ends form, they can join (fuse) with a neighboring path.
This creates a non perfect maze, which can have loops and the possibility of more than one distinct path from point A to B.
Dead ends fuse 1 in 3 times, which seems to give a good balance between loop circuits and dead ends.

Lattice 3 Stage

Play Sim     View Stage

Controls:

None.

Sims