gene46 offers two fundamentally different generative art modes: Line Art and Mosaic. Both use Genetic Algorithms to evolve visual patterns — but their underlying DNA structures, rendering approaches, and evolutionary dynamics are completely different.
Understanding these differences will help you choose the right mode for your creative goals and deploy better selection strategies in each.
1. Quick Comparison
| Feature | Line Art | Mosaic |
|---|---|---|
| DNA type | Bézier curve parameters | CPPN (neural function network) |
| Rendering | Vector curves on canvas | Per-pixel mathematical function |
| Visual style | Flowing, organic, geometric lines | Fractal-like, symmetric, dense patterns |
| Evolution speed | Fast — visible change Gen 1–5 | Slower — complexity builds over Gen 10+ |
| Stagnation risk | Lower | Higher |
| Surprise potential | Moderate | High — stunning unexpected patterns |
2. Line Art Mode: Bézier Curve DNA
In Line Art mode, each individual is defined by an array of parameters describing multiple Bézier curves:
- Control points: X, Y coordinates of the start, end, and control points of each curve.
- Stroke width: The thickness of each line.
- Color: RGBA values and gradient endpoints for each stroke.
- Opacity: Blending and transparency values.
Example DNA Array (simplified)
[0.23, 0.71, 0.45, 0.89, 0.12, 0.56, // curve 1 control points
2.3, // stroke width
0.8, 0.2, 1.0, 0.6, // RGBA start color
0.1, 0.9, 0.5, 0.4, // RGBA end color
...]
Crossover mixes these parameters between parents, producing children with hybrid curve shapes and color combinations. The continuous, intuitive nature of these parameters means small mutations produce visually small changes — evolution is smooth and predictable.
3. Mosaic Mode: CPPN DNA
Mosaic mode uses a Compositional Pattern Producing Network (CPPN) — a mathematical function network that takes pixel coordinates (x, y) as input and outputs an RGBA color value. Every pixel on screen is computed by evaluating this function:
f(x, y) → (R, G, B, A)
Where f is a composition of:
sin(w₁·x + w₂·y + b₁) ·
tanh(w₃·sin(x) + w₄·cos(y) + b₂) ·
...
The DNA encodes the weights (w₁, w₂...), biases (b₁, b₂...), and the choice of activation functions (sin, cos, tanh, sigmoid) at each node in the network. The CPPN architecture is inspired by Stanley & Miikkulainen's 2007 research on Picbreeder.
Why Mosaic Patterns Are Naturally Symmetric
Many CPPN activation functions (particularly sin and cos) are symmetric or periodic. When applied to pixel coordinates, this naturally produces symmetric and tiling patterns — explaining why Mosaic art often looks crystalline or fractal.
4. Evolutionary Dynamics: Key Differences
Line Art Evolution
- Progress is visible from Generation 1.
- Each parameter change corresponds to an intuitive visual change (move a point, shift a color).
- Stagnation is less common — the parameter space is well-connected.
- Best for: flowing, minimalist, illustrative aesthetics.
Mosaic Evolution
- Early generations (1–5) often look like random noise.
- Real structure emerges around Generation 8–15.
- Mutations can have unpredictable large effects (one weight change → completely different global pattern).
- Stagnation is more common — fork aggressively.
- Best for: complex, psychedelic, deeply textured patterns.
5. Which Should You Choose?
- Choose Line Art if you want predictable, controlled evolution and elegant, minimal results. Great for beginners.
- Choose Mosaic if you want surprising, complex, deeply textured results and don't mind slower, less predictable evolution. Great for experienced players seeking novel patterns.
- Play both — they evolve toward fundamentally different aesthetic spaces and are both worth exploring deeply.
📚 References
- Stanley, K.O. & Miikkulainen, R. (2007), Compositional Pattern Producing Networks, Genetic Programming and Evolvable Machines
- Secretan, J. et al. (2011), Picbreeder: A Case Study in Collaborative Evolutionary Exploration of Design Space, Evolutionary Computation