NeatSelection.java

1
package net.bmahe.genetics4j.neat.spec.selection;
2
3
import java.util.function.BiPredicate;
4
5
import org.apache.commons.lang3.Validate;
6
import org.immutables.value.Value;
7
8
import net.bmahe.genetics4j.core.Individual;
9
import net.bmahe.genetics4j.core.spec.selection.SelectionPolicy;
10
import net.bmahe.genetics4j.core.spec.selection.Tournament;
11
import net.bmahe.genetics4j.neat.NeatUtils;
12
13
/**
14
 * Selection policy for NEAT (NeuroEvolution of Augmenting Topologies) species-based selection.
15
 * 
16
 * <p>NeatSelection implements the species-based selection mechanism that is fundamental to NEAT's ability to maintain
17
 * population diversity and protect structural innovations. It organizes the population into species based on genetic
18
 * compatibility, applies fitness sharing within species, and manages reproduction allocation to prevent dominant
19
 * topologies from eliminating exploration.
20
 * 
21
 * <p>Key features:
22
 * <ul>
23
 * <li><strong>Species formation</strong>: Groups genetically similar individuals using compatibility predicates</li>
24
 * <li><strong>Fitness sharing</strong>: Reduces fitness pressure within species to promote diversity</li>
25
 * <li><strong>Species preservation</strong>: Maintains minimum viable species sizes</li>
26
 * <li><strong>Reproduction allocation</strong>: Distributes offspring based on species average fitness</li>
27
 * </ul>
28
 * 
29
 * <p>NEAT species-based selection process:
30
 * <ol>
31
 * <li><strong>Compatibility testing</strong>: Apply species predicate to group similar individuals</li>
32
 * <li><strong>Species assignment</strong>: Assign individuals to species based on genetic distance</li>
33
 * <li><strong>Fitness adjustment</strong>: Apply fitness sharing within each species</li>
34
 * <li><strong>Species filtering</strong>: Remove species below minimum size threshold</li>
35
 * <li><strong>Reproduction allocation</strong>: Determine offspring count per species</li>
36
 * <li><strong>Within-species selection</strong>: Select parents using specified selection policy</li>
37
 * </ol>
38
 * 
39
 * <p>Species management parameters:
40
 * <ul>
41
 * <li><strong>Keep ratio</strong>: Proportion of each species to preserve for reproduction</li>
42
 * <li><strong>Minimum size</strong>: Smallest viable species size to prevent extinction</li>
43
 * <li><strong>Compatibility predicate</strong>: Function determining species membership</li>
44
 * <li><strong>Selection policy</strong>: Within-species selection strategy</li>
45
 * </ul>
46
 * 
47
 * <p>Common usage patterns:
48
 * 
49
 * <pre>{@code
50
 * // Default NEAT selection with standard parameters
51
 * NeatSelection<Double> defaultSelection = NeatSelection.ofDefault();
52
 * 
53
 * // Custom compatibility threshold
54
 * BiPredicate<Individual<Double>, Individual<Double>> compatibilityPredicate = (i1,
55
 * 		i2) -> NeatUtils.compatibilityDistance(i1.genotype(), i2.genotype(), 0, 2, 2, 1.0f) < 3.0; // Higher threshold
56
 * 																																	// = fewer, larger
57
 * 																																	// species
58
 * 
59
 * NeatSelection<Double> customSelection = NeatSelection.<Double>builder()
60
 * 		.perSpeciesKeepRatio(0.8f) // Keep top 80% of each species
61
 * 		.minSpeciesSize(3) // Minimum 3 individuals per species
62
 * 		.speciesPredicate(compatibilityPredicate)
63
 * 		.speciesSelection(Tournament.of(5)) // Tournament size 5 within species
64
 * 		.build();
65
 * 
66
 * // Aggressive diversity preservation
67
 * NeatSelection<Double> diverseSelection = NeatSelection.of(
68
 * 		0.95f, // Keep 95% of each species
69
 * 			compatibilityPredicate,
70
 * 			new ProportionalSelection() // Proportional selection within species
71
 * );
72
 * }</pre>
73
 * 
74
 * <p>Compatibility distance calculation:
75
 * <ul>
76
 * <li><strong>Matching genes</strong>: Genes with same innovation numbers in both individuals</li>
77
 * <li><strong>Disjoint genes</strong>: Genes in one individual within the other's innovation range</li>
78
 * <li><strong>Excess genes</strong>: Genes beyond the other individual's highest innovation number</li>
79
 * <li><strong>Weight differences</strong>: Average difference in matching gene weights</li>
80
 * </ul>
81
 * 
82
 * <p>Species preservation strategies:
83
 * <ul>
84
 * <li><strong>Keep ratio</strong>: Ensures a proportion of each species survives selection pressure</li>
85
 * <li><strong>Minimum size</strong>: Prevents viable species from going extinct due to random drift</li>
86
 * <li><strong>Fitness sharing</strong>: Reduces competition between similar individuals</li>
87
 * <li><strong>Innovation protection</strong>: Gives new topologies time to optimize</li>
88
 * </ul>
89
 * 
90
 * <p>Integration with genetic operators:
91
 * <ul>
92
 * <li><strong>Crossover compatibility</strong>: Species ensure genetic similarity for meaningful recombination</li>
93
 * <li><strong>Mutation guidance</strong>: Species composition can influence mutation rates</li>
94
 * <li><strong>Structural innovation</strong>: Protected evolution of different network topologies</li>
95
 * <li><strong>Population dynamics</strong>: Species formation and extinction drive exploration</li>
96
 * </ul>
97
 * 
98
 * <p>Performance considerations:
99
 * <ul>
100
 * <li><strong>Compatibility caching</strong>: Distance calculations cached for efficiency</li>
101
 * <li><strong>Species reuse</strong>: Species structures maintained across generations</li>
102
 * <li><strong>Parallel evaluation</strong>: Species-based organization enables concurrent processing</li>
103
 * <li><strong>Memory efficiency</strong>: Efficient species membership tracking</li>
104
 * </ul>
105
 * 
106
 * @param <T> the fitness value type (typically Double)
107
 * @see SelectionPolicy
108
 * @see NeatUtils#compatibilityDistance
109
 * @see net.bmahe.genetics4j.neat.selection.NeatSelectionPolicyHandler
110
 * @see net.bmahe.genetics4j.neat.Species
111
 */
112
@Value.Immutable
113
public abstract class NeatSelection<T extends Comparable<T>> implements SelectionPolicy {
114
115
	/**
116
	 * Returns the proportion of each species to preserve for reproduction.
117
	 * 
118
	 * <p>This ratio determines what fraction of each species will be retained after fitness-based culling. Higher values
119
	 * preserve more diversity within species but may slow convergence, while lower values increase selection pressure
120
	 * but may lose beneficial genetic variations.
121
	 * 
122
	 * <p>Typical values:
123
	 * <ul>
124
	 * <li><strong>0.9 (default)</strong>: Preserve top 90% of each species</li>
125
	 * <li><strong>0.8-0.95</strong>: Balanced diversity preservation</li>
126
	 * <li><strong>&lt; 0.8</strong>: Aggressive selection pressure</li>
127
	 * <li><strong>&gt; 0.95</strong>: Minimal selection pressure, maximum diversity</li>
128
	 * </ul>
129
	 * 
130
	 * @return keep ratio between 0.0 and 1.0 (exclusive of 0.0, inclusive of 1.0)
131
	 */
132
	@Value.Default
133
	public float perSpeciesKeepRatio() {
134 2 1. perSpeciesKeepRatio : replaced float return with 0.0f for net/bmahe/genetics4j/neat/spec/selection/NeatSelection::perSpeciesKeepRatio → KILLED
2. perSpeciesKeepRatio : Substituted 0.9 with 1.0 → KILLED
		return 0.90f;
135
	}
136
137
	/**
138
	 * Returns the minimum number of individuals required to maintain a species.
139
	 * 
140
	 * <p>Species with fewer members than this threshold will be eliminated to prevent resource waste on non-viable
141
	 * populations. This helps focus evolutionary resources on species with sufficient genetic diversity to explore their
142
	 * local fitness landscape effectively.
143
	 * 
144
	 * <p>Typical values:
145
	 * <ul>
146
	 * <li><strong>5 (default)</strong>: Balanced viability threshold</li>
147
	 * <li><strong>3-10</strong>: Reasonable range for most problems</li>
148
	 * <li><strong>&lt; 3</strong>: Very permissive, allows small species to survive</li>
149
	 * <li><strong>&gt; 10</strong>: Strict threshold, eliminates marginal species</li>
150
	 * </ul>
151
	 * 
152
	 * @return minimum species size (must be positive)
153
	 */
154
	@Value.Default
155
	public int minSpeciesSize() {
156 2 1. minSpeciesSize : Substituted 5 with 6 → SURVIVED
2. minSpeciesSize : replaced int return with 0 for net/bmahe/genetics4j/neat/spec/selection/NeatSelection::minSpeciesSize → KILLED
		return 5;
157
	}
158
159
	/**
160
	 * Returns the predicate used to determine species membership.
161
	 * 
162
	 * <p>This bi-predicate takes two individuals and returns true if they should belong to the same species based on
163
	 * their genetic compatibility. Typically implemented using NEAT compatibility distance with a threshold value.
164
	 * 
165
	 * <p>Common implementations:
166
	 * <ul>
167
	 * <li><strong>Compatibility distance</strong>: Based on matching, disjoint, excess genes and weight differences</li>
168
	 * <li><strong>Topological similarity</strong>: Based on network structure similarity</li>
169
	 * <li><strong>Behavioral similarity</strong>: Based on network output patterns</li>
170
	 * <li><strong>Custom metrics</strong>: Domain-specific similarity measures</li>
171
	 * </ul>
172
	 * 
173
	 * @return bi-predicate for determining species membership
174
	 */
175
	public abstract BiPredicate<Individual<T>, Individual<T>> speciesPredicate();
176
177
	/**
178
	 * Returns the selection policy used within each species.
179
	 * 
180
	 * <p>After individuals are organized into species, this policy determines how parents are selected within each
181
	 * species for reproduction. Common choices include tournament selection, proportional selection, or rank-based
182
	 * selection.
183
	 * 
184
	 * <p>Selection policy considerations:
185
	 * <ul>
186
	 * <li><strong>Tournament selection</strong>: Good balance of selection pressure and diversity</li>
187
	 * <li><strong>Proportional selection</strong>: Fitness-proportionate selection within species</li>
188
	 * <li><strong>Rank selection</strong>: Rank-based selection to avoid fitness scaling issues</li>
189
	 * <li><strong>Elite selection</strong>: Always select best individuals within species</li>
190
	 * </ul>
191
	 * 
192
	 * @return selection policy for within-species parent selection
193
	 */
194
	public abstract SelectionPolicy speciesSelection();
195
196
	@Value.Check
197
	public void check() {
198
		Validate.inclusiveBetween(0.0f, 1.0f, perSpeciesKeepRatio());
199
		Validate.isTrue(perSpeciesKeepRatio() > 0.0f);
200
	}
201
202
	public static class Builder<T extends Comparable<T>> extends ImmutableNeatSelection.Builder<T> {
203
	}
204
205
	public static <U extends Comparable<U>> Builder<U> builder() {
206 2 1. builder : replaced return value with null for net/bmahe/genetics4j/neat/spec/selection/NeatSelection::builder → KILLED
2. builder : removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::<init> → KILLED
		return new Builder<U>();
207
	}
208
209
	/**
210
	 * Creates a NEAT selection policy with custom keep ratio and specified parameters.
211
	 * 
212
	 * @param <U>                 the fitness value type
213
	 * @param perSpeciesKeepRatio proportion of each species to preserve (0.0 < ratio <= 1.0)
214
	 * @param speciesPredicate    predicate for determining species membership
215
	 * @param speciesSelection    selection policy for within-species parent selection
216
	 * @return a new NEAT selection policy with the specified parameters
217
	 */
218
	public static <U extends Comparable<U>> NeatSelection<U> of(final float perSpeciesKeepRatio,
219
			final BiPredicate<Individual<U>, Individual<U>> speciesPredicate, final SelectionPolicy speciesSelection) {
220 4 1. of : replaced return value with null for net/bmahe/genetics4j/neat/spec/selection/NeatSelection::of → NO_COVERAGE
2. of : removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::<init> → NO_COVERAGE
3. of : removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::perSpeciesKeepRatio → NO_COVERAGE
4. of : replaced call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::perSpeciesKeepRatio with receiver → NO_COVERAGE
		return new Builder<U>().perSpeciesKeepRatio(perSpeciesKeepRatio)
221 2 1. of : removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesPredicate → NO_COVERAGE
2. of : replaced call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesPredicate with receiver → NO_COVERAGE
				.speciesPredicate(speciesPredicate)
222 2 1. of : removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesSelection → NO_COVERAGE
2. of : replaced call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesSelection with receiver → NO_COVERAGE
				.speciesSelection(speciesSelection)
223 1 1. of : removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::build → NO_COVERAGE
				.build();
224
	}
225
226
	/**
227
	 * Creates a NEAT selection policy with default keep ratio and specified parameters.
228
	 * 
229
	 * @param <U>              the fitness value type
230
	 * @param speciesPredicate predicate for determining species membership
231
	 * @param speciesSelection selection policy for within-species parent selection
232
	 * @return a new NEAT selection policy with default keep ratio (0.9)
233
	 */
234
	public static <U extends Comparable<U>> NeatSelection<U> of(
235
			final BiPredicate<Individual<U>, Individual<U>> speciesPredicate, final SelectionPolicy speciesSelection) {
236 7 1. of : removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesSelection → KILLED
2. of : removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesPredicate → KILLED
3. of : removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::<init> → KILLED
4. of : replaced return value with null for net/bmahe/genetics4j/neat/spec/selection/NeatSelection::of → KILLED
5. of : replaced call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesSelection with receiver → KILLED
6. of : replaced call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesPredicate with receiver → KILLED
7. of : removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::build → KILLED
		return new Builder<U>().speciesPredicate(speciesPredicate).speciesSelection(speciesSelection).build();
237
	}
238
239
	/**
240
	 * Creates a NEAT selection policy with standard default parameters.
241
	 * 
242
	 * <p>Default configuration:
243
	 * <ul>
244
	 * <li><strong>Keep ratio</strong>: 0.9 (preserve top 90% of each species)</li>
245
	 * <li><strong>Minimum species size</strong>: 5 individuals</li>
246
	 * <li><strong>Compatibility distance</strong>: Threshold of 1.0 with standard coefficients</li>
247
	 * <li><strong>Species selection</strong>: Tournament selection with size 3</li>
248
	 * </ul>
249
	 * 
250
	 * <p>Compatibility distance uses:
251
	 * <ul>
252
	 * <li>Weight coefficient: 1.0</li>
253
	 * <li>Excess gene coefficient: 2.0</li>
254
	 * <li>Disjoint gene coefficient: 2.0</li>
255
	 * <li>Distance threshold: 1.0</li>
256
	 * </ul>
257
	 * 
258
	 * @param <U> the fitness value type
259
	 * @return a new NEAT selection policy with standard default parameters
260
	 */
261
	public static <U extends Comparable<U>> NeatSelection<U> ofDefault() {
262 2 1. ofDefault : removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::<init> → KILLED
2. ofDefault : replaced return value with null for net/bmahe/genetics4j/neat/spec/selection/NeatSelection::ofDefault → KILLED
		return new Builder<U>()
263 3 1. ofDefault : Substituted 3 with 4 → SURVIVED
2. ofDefault : replaced call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesPredicate with receiver → KILLED
3. ofDefault : removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesPredicate → KILLED
				.speciesPredicate(
264 16 1. lambda$ofDefault$0 : replaced call to net/bmahe/genetics4j/neat/NeatUtils::compatibilityDistance with argument → NO_COVERAGE
2. lambda$ofDefault$0 : Substituted 0 with 1 → NO_COVERAGE
3. lambda$ofDefault$0 : removed conditional - replaced comparison check with false → NO_COVERAGE
4. lambda$ofDefault$0 : Substituted 2.0 with 1.0 → NO_COVERAGE
5. lambda$ofDefault$0 : Substituted 1.0 with 2.0 → NO_COVERAGE
6. lambda$ofDefault$0 : removed call to net/bmahe/genetics4j/neat/NeatUtils::compatibilityDistance → NO_COVERAGE
7. lambda$ofDefault$0 : Substituted 2.0 with 1.0 → NO_COVERAGE
8. lambda$ofDefault$0 : Substituted 1.0 with 2.0 → NO_COVERAGE
9. lambda$ofDefault$0 : Substituted 1 with 0 → NO_COVERAGE
10. lambda$ofDefault$0 : Substituted 0 with 1 → NO_COVERAGE
11. lambda$ofDefault$0 : changed conditional boundary → NO_COVERAGE
12. lambda$ofDefault$0 : replaced boolean return with true for net/bmahe/genetics4j/neat/spec/selection/NeatSelection::lambda$ofDefault$0 → NO_COVERAGE
13. lambda$ofDefault$0 : removed conditional - replaced comparison check with true → NO_COVERAGE
14. lambda$ofDefault$0 : negated conditional → NO_COVERAGE
15. lambda$ofDefault$0 : removed call to net/bmahe/genetics4j/core/Individual::genotype → NO_COVERAGE
16. lambda$ofDefault$0 : removed call to net/bmahe/genetics4j/core/Individual::genotype → NO_COVERAGE
						(i1, i2) -> NeatUtils.compatibilityDistance(i1.genotype(), i2.genotype(), 0, 2, 2, 1f) < 1.0)
265 3 1. ofDefault : removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesSelection → KILLED
2. ofDefault : replaced call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesSelection with receiver → KILLED
3. ofDefault : removed call to net/bmahe/genetics4j/core/spec/selection/Tournament::of → KILLED
				.speciesSelection(Tournament.of(3))
266 1 1. ofDefault : removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::build → KILLED
				.build();
267
	}
268
}

Mutations

134

1.1
Location : perSpeciesKeepRatio
Killed by : net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest]/[method:constructor()]
replaced float return with 0.0f for net/bmahe/genetics4j/neat/spec/selection/NeatSelection::perSpeciesKeepRatio → KILLED

2.2
Location : perSpeciesKeepRatio
Killed by : net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest]/[method:simple()]
Substituted 0.9 with 1.0 → KILLED

156

1.1
Location : minSpeciesSize
Killed by : none
Substituted 5 with 6 → SURVIVED
Covering tests

2.2
Location : minSpeciesSize
Killed by : net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest]/[method:simple()]
replaced int return with 0 for net/bmahe/genetics4j/neat/spec/selection/NeatSelection::minSpeciesSize → KILLED

206

1.1
Location : builder
Killed by : net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest]/[method:eliminateLowestPerformers()]
replaced return value with null for net/bmahe/genetics4j/neat/spec/selection/NeatSelection::builder → KILLED

2.2
Location : builder
Killed by : net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest]/[method:eliminateLowestPerformers()]
removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::<init> → KILLED

220

1.1
Location : of
Killed by : none
replaced return value with null for net/bmahe/genetics4j/neat/spec/selection/NeatSelection::of → NO_COVERAGE

2.2
Location : of
Killed by : none
removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::<init> → NO_COVERAGE

3.3
Location : of
Killed by : none
removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::perSpeciesKeepRatio → NO_COVERAGE

4.4
Location : of
Killed by : none
replaced call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::perSpeciesKeepRatio with receiver → NO_COVERAGE

221

1.1
Location : of
Killed by : none
removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesPredicate → NO_COVERAGE

2.2
Location : of
Killed by : none
replaced call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesPredicate with receiver → NO_COVERAGE

222

1.1
Location : of
Killed by : none
removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesSelection → NO_COVERAGE

2.2
Location : of
Killed by : none
replaced call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesSelection with receiver → NO_COVERAGE

223

1.1
Location : of
Killed by : none
removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::build → NO_COVERAGE

236

1.1
Location : of
Killed by : net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest]/[method:simple()]
removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesSelection → KILLED

2.2
Location : of
Killed by : net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest]/[method:simple()]
removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesPredicate → KILLED

3.3
Location : of
Killed by : net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest]/[method:simple()]
removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::<init> → KILLED

4.4
Location : of
Killed by : net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest]/[method:simple()]
replaced return value with null for net/bmahe/genetics4j/neat/spec/selection/NeatSelection::of → KILLED

5.5
Location : of
Killed by : net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest]/[method:simple()]
replaced call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesSelection with receiver → KILLED

6.6
Location : of
Killed by : net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest]/[method:simple()]
replaced call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesPredicate with receiver → KILLED

7.7
Location : of
Killed by : net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest]/[method:simple()]
removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::build → KILLED

262

1.1
Location : ofDefault
Killed by : net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest]/[method:constructor()]
removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::<init> → KILLED

2.2
Location : ofDefault
Killed by : net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest]/[method:constructor()]
replaced return value with null for net/bmahe/genetics4j/neat/spec/selection/NeatSelection::ofDefault → KILLED

263

1.1
Location : ofDefault
Killed by : net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest]/[method:constructor()]
replaced call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesPredicate with receiver → KILLED

2.2
Location : ofDefault
Killed by : none
Substituted 3 with 4 → SURVIVED
Covering tests

3.3
Location : ofDefault
Killed by : net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest]/[method:constructor()]
removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesPredicate → KILLED

264

1.1
Location : lambda$ofDefault$0
Killed by : none
replaced call to net/bmahe/genetics4j/neat/NeatUtils::compatibilityDistance with argument → NO_COVERAGE

2.2
Location : lambda$ofDefault$0
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

3.3
Location : lambda$ofDefault$0
Killed by : none
removed conditional - replaced comparison check with false → NO_COVERAGE

4.4
Location : lambda$ofDefault$0
Killed by : none
Substituted 2.0 with 1.0 → NO_COVERAGE

5.5
Location : lambda$ofDefault$0
Killed by : none
Substituted 1.0 with 2.0 → NO_COVERAGE

6.6
Location : lambda$ofDefault$0
Killed by : none
removed call to net/bmahe/genetics4j/neat/NeatUtils::compatibilityDistance → NO_COVERAGE

7.7
Location : lambda$ofDefault$0
Killed by : none
Substituted 2.0 with 1.0 → NO_COVERAGE

8.8
Location : lambda$ofDefault$0
Killed by : none
Substituted 1.0 with 2.0 → NO_COVERAGE

9.9
Location : lambda$ofDefault$0
Killed by : none
Substituted 1 with 0 → NO_COVERAGE

10.10
Location : lambda$ofDefault$0
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

11.11
Location : lambda$ofDefault$0
Killed by : none
changed conditional boundary → NO_COVERAGE

12.12
Location : lambda$ofDefault$0
Killed by : none
replaced boolean return with true for net/bmahe/genetics4j/neat/spec/selection/NeatSelection::lambda$ofDefault$0 → NO_COVERAGE

13.13
Location : lambda$ofDefault$0
Killed by : none
removed conditional - replaced comparison check with true → NO_COVERAGE

14.14
Location : lambda$ofDefault$0
Killed by : none
negated conditional → NO_COVERAGE

15.15
Location : lambda$ofDefault$0
Killed by : none
removed call to net/bmahe/genetics4j/core/Individual::genotype → NO_COVERAGE

16.16
Location : lambda$ofDefault$0
Killed by : none
removed call to net/bmahe/genetics4j/core/Individual::genotype → NO_COVERAGE

265

1.1
Location : ofDefault
Killed by : net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest]/[method:constructor()]
removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesSelection → KILLED

2.2
Location : ofDefault
Killed by : net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest]/[method:constructor()]
replaced call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::speciesSelection with receiver → KILLED

3.3
Location : ofDefault
Killed by : net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest]/[method:constructor()]
removed call to net/bmahe/genetics4j/core/spec/selection/Tournament::of → KILLED

266

1.1
Location : ofDefault
Killed by : net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.selection.NeatSelectorImplTest]/[method:constructor()]
removed call to net/bmahe/genetics4j/neat/spec/selection/NeatSelection$Builder::build → KILLED

Active mutators

Tests examined


Report generated by PIT 1.20.3