Proposed solution: We run the algorithm described below at the creation of an organism to determine which points are connected to the zeroth point via a network of rods.
Suppose an Organism o has n PointMasses and m Rods, say in the arrays points[] and rods[], respectively. We create an n x n matrix A which has 1 in all of the diagonal entries, 1 in every entry A_{i,j} where points[i] and points[j] are connected by some Rod, and 0 in all other entries. If we apply A to the column vector (1,0,0, ... , 0) m times, the zero entries in the resulting vector correspond to the points in points[] which are not connected to point[0].
Now the design decision is the following: do we still store the disconnected points in the genes, or do we delete them from the genes?
Proposed solution: We run the algorithm described below at the creation of an organism to determine which points are connected to the zeroth point via a network of rods.
Suppose an Organism o has n PointMasses and m Rods, say in the arrays points[] and rods[], respectively. We create an n x n matrix A which has 1 in all of the diagonal entries, 1 in every entry A_{i,j} where points[i] and points[j] are connected by some Rod, and 0 in all other entries. If we apply A to the column vector (1,0,0, ... , 0) m times, the zero entries in the resulting vector correspond to the points in points[] which are not connected to point[0].
Now the design decision is the following: do we still store the disconnected points in the genes, or do we delete them from the genes?