You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quick question, is it possible to get the current population after calling Simulator::step()?
It seems step() returns an EvaluatedPopulation, which you can query using EvaluatedPopulation::individuals(), but this is the population before applying selection. I want to get the population after applying selection (so after selecting the best parents and cross-breeding them). Is this possible at all?
(Basically I'm looking for a way to access GeneticAlgorithm.population directly, which is not possible at the moment since it's private)
The text was updated successfully, but these errors were encountered:
Isn't that a question of where the loop starts? The EvaluatedPopulation is the one where the fitness score has been determined. The population in GeneticAlgorithm.population is the "next generation", which has not been evaluated yet. When calling step() the next time the GeneticAlgorithm.population from the previous loop is returned as EvaluatedPopulation with its fitness score. I could also change the order of the steps in the algorithm so that the last step is the evaluation of the fitness, but then the initial population never gets evaluated.
Quick question, is it possible to get the current population after calling
Simulator::step()
?It seems
step()
returns anEvaluatedPopulation
, which you can query usingEvaluatedPopulation::individuals()
, but this is the population before applying selection. I want to get the population after applying selection (so after selecting the best parents and cross-breeding them). Is this possible at all?(Basically I'm looking for a way to access
GeneticAlgorithm.population
directly, which is not possible at the moment since it's private)The text was updated successfully, but these errors were encountered: