Abstract
Traditional Cartesian Genetic Programming (CGP) relies on a rigid grid structure, which often leads to disruptive effects when nodes are added or removed. This paper introduces Positional Cartesian Genetic Programming (PCGP), a novel representation that evolves programs in a continuous floating-point space. By assigning absolute coordinates to nodes, PCGP enables sophisticated genetic operators like subgraph crossover and node snapping. Experimental results across classification, regression, and reinforcement learning tasks demonstrate that PCGP, particularly when combined with optimized hyperparameters and population-wide crossover, significantly enhances evolutionary performance and structural modularity.
Introduction
Cartesian Genetic Programming (CGP) is a powerful framework for evolving directed acyclic graphs to represent programs. However, its traditional implementation uses a fixed rectangular grid where node connectivity is defined by indices. This discrete structure suffers from high sensitivity to structural changes; a single mutation can shift indices and scramble the logic of downstream components. To address this, Positional Cartesian Genetic Programming (PCGP) shifts the representation from a discrete grid to a continuous positional space, allowing for more stable and modular genetic operations.
Methods: The Positional Representation
The fundamental innovation of PCGP is the use of floating-point genes (ranging from 0.0 to 1.0) to define the entire genome, including node positions, functions, and connections.
Floating-Point Genes and Evolved Positions
In PCGP, each node $n$ is assigned an evolved position gene $p_n$. Unlike standard CGP, where a node's location is fixed by its index in a list, PCGP nodes exist at absolute coordinates within a continuous space. This spatial independence allows functional modules to be "exported" or moved between individuals without losing their internal logic.
The Snapping Mechanism
Connectivity in PCGP is determined through a "snapping" mechanism. Instead of connecting to a specific node index, a branch targets a coordinate in the evolved space. The connection then "snaps" to the nearest physical node. This approach decouples the logical structure from the underlying list index, facilitating more effective crossover.
Novel Genetic Operators
The continuous space enables several new operators:
- Subgraph Mutation/Crossover: Functional blocks can be moved between individuals based on their spatial coordinates.
- Aligned Node Crossover: Nodes from different parents are paired based on spatial proximity.
- Output Graph Crossover: Active nodes contributing to a specific output are transferred as a cohesive module.
Experimental Evaluation
The researchers evaluated PCGP against standard CGP across nine benchmark problems in classification, regression, and reinforcement learning (RL). The study compared two evolutionary strategies: the traditional $1 + \lambda$ Evolutionary Algorithm (EA) and a Genetic Algorithm (GA) utilizing the new crossover operators.
Key Results and Insights
The results indicate that PCGP's flexibility provides a significant advantage, especially in complex domains.
Performance and Optimization
Using the irace tool for hyperparameter optimization, both CGP and PCGP reached performance levels far exceeding default literature settings. PCGP using a $1 + \lambda$ EA performed best in classification tasks, while the GA with "Output Graph Crossover" excelled in high-dimensional RL tasks like the Humanoid and Ant locomotion.
Fitness Evolution
The evolution of fitness over time shows that PCGP configurations often converge to higher quality solutions compared to baseline methods. In regression tasks like Wine Quality and Forest Fire Area, the optimized PCGP variants demonstrate steady improvement and competitive final fitness.
Parallelization and Modularity
While the GA approach requires more evaluations to reach certain fitness levels, it is highly parallelizable. Evaluating a population of 200 individuals simultaneously can significantly reduce real-world training time compared to the sequential nature of $1 + \lambda$ EA. Furthermore, the maintenance of "inactive" nodes serves as a genetic reservoir, allowing the evolution to preserve potentially useful structures for future generations.
Conclusion and Future Work
PCGP represents a significant step forward in making genetic programming more modular and less sensitive to structural disruption. By moving to a continuous positional space, it unlocks the potential for sophisticated crossover operators that were previously ineffective in standard CGP. Future research will explore dynamic mutation rates and speciation based on spatial distance to maintain population diversity.
Summary updated