Hello and welcome to this lecture, where you are going to understand the how to select the best individuals
to create the new generation.
This part here where I am blind in the mouth, as you can see in this image, we first create the initial
population and then evaluate.
It's just a reminder that the evaluation is this some of the products prices we have already learned
how to implement the genetic or braiders crossover and mutation.
However, see, that's before we apply the operators.
We need to select the parents here who are some of the best individuals in the population, as we saw
in the implementation.
Some individuals to have this car are the total prize equal to one, which indicates that the products
exceeded.
The thought, though, is based off the truck.
So these individuals should not be selected because we would generate new bad solutions.
For this reason, we need to select some of the best in the videos to create the next generation.
As a result, the best individuals, those who have the highest prices, will be selected more often
than individuals who have a low price.
The features of the past in the individuals must predominate in the new population.
In short, we will prioritize solutions with higher values as we will dance to generate even better
individuals in the next generations.
Should select individuals?
We are going to use one of the simplest ways which scalds the rule lets methods, as you can see in
this image, to easily understand this method.
Let's consider that each slice is a solution, and let's suppose that the value of solution ASTRI three
here is 1000 and the value of solution asks.
Sure, here is five 5000 remembering that's our goal is to select the highest price.
If you spin the wheel to randomly select a solution, the probability of selecting Eschew is much greater
than select the S3, as this area here is larger than this area here.
However, there is a small probability of select the SE three, and this is very important because even
though we selected the best individuals most of the time, we also need to leave small probabilities
for the individual those that are not.
That's good because it will create some more diversity in the algorithm.
If we always use the best solutions all the time, the population will dance to be composed of increasingly
similar individuals, and we lack diversity.
If you run the algorithm many times, we will almost always have very similar results in the implementation.
We had some solutions that the value was equal to one.
Then the videos that this base occupied by the products is greater than the available space on the truck.
Those individuals will also be here.
However, this slice will be much smaller and there will hardly be selected.
And to implement this methods, we are going to use the function we implement as before where we got
this, some of the evaluations.
So then you can select the individuals and then the next the lecturer we will we implemented step by
step.
So it will be easier to understand.
So there.