Alex Sweeney @alexjs.dev · May 27

I implemented an algorithm to randomly tile a grid with dominos. Here it is on a torus where they can wrap around the edges like Pacman.

0 likes 1 replies

?

Replies

Alex Sweeney · May 27

This uses the Ford-Fulkerson max flow algorithm, and it can run on any bipartite graph, not just a grid. Including on an aztec diamond. There's a lot of research on how to count tilings, but not so much on how to randomly sample them. Ford-Fulkerson with randomized depth-first search works great.