To run: open index.html.
The simulator does a random walk around a board, at each step populating all 6 adjacent tiles. If you click "Random Terrains" it will create a single randomized array of all terrain tiles and use them at random. If you click "Stack-based Terrains" it will build five random stacks, one for terrain type, and when filling adjacent tile slots will pull from the stack corresponding to the current tile. The idea is to give some clustering of terrain types.
You can edit the grid of inputs to change the stack distributions.