Skip to content

Commit 4bd498c

Browse files
committed
Updating docs
1 parent 9285e08 commit 4bd498c

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -223,33 +223,34 @@ var result = await OpenGARunner<int>
223223
.Initialize(initialPopulation, minPopulationPercentage: 0.4f, maxPopulationPercentage: 2.5f)
224224
.WithRandomSeed(42)
225225
.MutationRate(0.15f)
226-
226+
227227
// Multi-strategy parent selection with adaptive learning
228228
.ParentSelection(p => p.RegisterMulti(m => m
229-
.Tournament(stochasticTournament: true, customWeight: 0.4f)
230-
.RouletteWheel(customWeight: 0.3f)
229+
.Tournament(stochasticTournament: true)
230+
.RouletteWheel()
231231
.Rank(customWeight: 0.2f)
232-
.Boltzmann(temperatureDecayRate: 0.05, initialTemperature: 1.0, customWeight: 0.1f)
232+
.Boltzmann(temperatureDecayRate: 0.05, initialTemperature: 1.0)
233233
.WithPolicy(policy => policy.AdaptivePursuit(
234234
learningRate: 0.12,
235235
minimumProbability: 0.05,
236236
rewardWindowSize: 15
237237
))
238238
))
239-
240-
// Single high-performance crossover for exploitation
241-
.Crossover(c => c.RegisterSingle(s => s.KPointCrossover(3))
242-
.WithCrossoverRate(0.85f))
243-
244-
// Multi-strategy survivor selection for dynamic population management
239+
240+
// Round Robin crossover for exploration
241+
.Crossover(c => c.RegisterMulti(s => s
242+
.KPointCrossover(3)
243+
.UniformCrossover()
244+
.WithPolicy(policy => policy.RoundRobin())
245+
).WithCrossoverRate(0.85f))
246+
247+
// Multi-strategy survivor selection for dynamic population management.
248+
// Each strategy is assigned a custom probability weight.
245249
.SurvivorSelection(s => s.RegisterMulti(m => m
246250
.Elitist(elitePercentage: 0.12f, customWeight: 0.6f)
247251
.Tournament(tournamentSize: 4, stochasticTournament: true, customWeight: 0.3f)
248252
.AgeBased(customWeight: 0.1f)
249-
.WithPolicy(policy => policy.AdaptivePursuit(
250-
learningRate: 0.08,
251-
diversityWeight: 0.15
252-
))
253+
.WithPolicy(policy => policy.CustomWeights())
253254
).OverrideOffspringGenerationRate(1.3f))
254255

255256
// Multi-condition termination

0 commit comments

Comments
 (0)