I wrote a small program in C++ to arrange wall tiles so that it minimised patterns. I did not want a 'random' pattern as that would have allowed 2 red tiles next to each other. I did this by defining a set of patterns and weighting each set then iterating many times over a grid of tiles moving them, re-scoring the result and keeping the best. I imagine there is a more mathematical way to achieve this but I don't know what to search for.
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.
Here's how it works:
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top