GA stimulates the method of natural selection. It means the species that can adapt to the changes happening in the environment can reproduce and survive and go to the subsequent generation. They simulate the survival of the fittest among the individuals of subsequent generations to solve a problem. Every generation comprises individuals and every individual represents a search space as well as a solution. Every individual is represented as integer/character/bits/float.
Phases in Genetic Algorithms
There are five phases in Genetic Algorithms that are discussed in our Genetic Algorithms assignment help online as follows:
Initial Population: This process starts with individuals called a population. Every individual is a solution to a problem that you want to solve. Individuals are characterized by variables called genes. They are joined to a string and form a chromosome. In GA, the genes are represented using strings. Generally, the binary values are used.
Fitness Function: The fitness function decides how fit is an individual. It is the ability of a person to compete with other people. It provides a fitness score for every individual. The chances that an individual shall be chosen for reproduction is dependent on the fitness score.
Selection: The selection phase is selecting the fittest individuals and allowing them to pass the genes to the subsequent generation. Parents are chosen dependent on their fitness scores. The individuals who have higher fitness have greater chances of selection for reproduction.
Crossover: It is a significant phase in GA. For every pair of parents, crossover points are selected at random within the genes. The offsprings are created through the exchange of parents’ genes among themselves till you reach a crossover point.
Mutation: If a new offspring is formed, some genes might be subject to mutation having a low random probability. It implies that some bits in a bit string may be flipped. Mutation happens for maintaining diversity in the population and for preventing premature convergence.
When new generations are created, individuals who have the least fitness die and provides space for new offsprings. The phases are repeated for producing individuals in every new generation that is better compared to the earlier ones.