Genetic Algorithms - akilmarshall/procedural-image-generation GitHub Wiki

See the wikipedia page for background on GA. I believe that GA maybe an applicable technique for procedural image generation with TIS if images are considered individuals and fitness is an individuals conformity to a particular neighbor functions.

Some individual I, $\text{I}=\mathcal{M}_{n\times m}(\mathbb{T})$ and the fitness function $\mathcal{Fit}:\text{I}\to\mathbb{R}_{\geq0}$

\mathcal{Fit}(\text{I})=\sum_{i, j}^{n, m}{\mathbb{C}_{\mathcal{N}}(I_{i, j})}.

conformity function

$\mathbb{C}$ is the conformity function with respect to some neighbor function $\mathcal{N}$, it computes a value in $\{0, 1, 2, 4\}$ describing how much a tile is accepted by it's neighbors (larger value is better).

\begin{align*}
\mathbb{C}_\mathcal{N}(t_{i, j}) =& \{1 \text{ if } t_{i + 1, j}\in \mathcal{N}(t, 0) \text{ else } 0\} + \\
& \{1 \text{ if } t_{i, j - 1}\in \mathcal{N}(t, 1) \text{ else } 0\} + \\
& \{1 \text{ if } t_{i - 1, j} \in \mathcal{N}(t, 2) \text{ else } 0\} + \\
& \{1 \text{ if } t_{i, j + 1} \in \mathcal{N}(t, 3) \text{ else } 0\} \\
\end{align*}

"reproduction" or some kind of combinatoric operation between two or more images can take many forms and at the time of writing none of which feel natural and I expect to test many different varieties.