Python Genetic Algorithms With Artificial Intelligence
  • Reads 2
  • Votes 1
  • Parts 1
  • Time <5 mins
  • Reads 2
  • Votes 1
  • Parts 1
  • Time <5 mins
Ongoing, First published Mar 01, 2019
What are Genetic Algorithms With Python?

A Genetic Algorithm (GA) is a metaheuristic inspired by natural selection and is a part of the class of Evolutionary Algorithms (EA). We use these to generate high-quality solutions to optimization and search problems, for which, these use bio-inspired operators like mutation, crossover, and selection. In other words, using these, we hope to achieve optimal or near-optimal solutions to difficult problems. Such algorithms simulate natural selection.

For any problem, we have a pool of possible solutions. These undergo processes like recombination and mutation to bear new children over generations. The search space is the set of all possible solutions and values the inputs may take. In optimization, we try to find within this search space the point or set of points that gives us the optimal solution. Each individual is like a string of characters/integers/floats and the strings are like chromosomes.

Python Genetic Algorithms
What are Genetic Algorithms With Python

The fitness value (from a fitness function) for a candidate tells us how close it is to the optimal solution. This is on the lines of Darwin's theory of 'Survival of the Fittest' and is how we keep producing better (evolving) individuals/ solutions over generations before reaching a criterion where to stop. These algorithms work in four steps:

Individuals in population compete for resources, mate
Fittest individuals mate to create more offsprings than others
Fittest parent propagates genes through generation; parents may produce offsprings better than either parent
Each successive generation evolves to suit its ambience
Since the population size is constant, some individuals must die to make room for newer ones. We arrive at a situation of convergence when the difference between offsprings produced by the current and ancestral populations is no longer significant. Then, the algorithm converges to a set of solutions for the problem.
All Rights Reserved
Sign up to add Python Genetic Algorithms With Artificial Intelligence to your library and receive updates
or
#54genetic
Content Guidelines
You may also like
Slide 1 of 1
The Virus Within: The Unranked (Book 4) cover

The Virus Within: The Unranked (Book 4)

50 parts Complete

Season 4 of The Virus Within Trinity is familiar with zombies, being one herself, but when strange zombies start appearing, she realizes that the world she knew might be changing yet again. When a dangerous set of scientific notes are discovered, Trinity and her friends don't realize anything is wrong until a frantic radio call comes in. Unaware of the notes, they race to the south and struggle to determine where the strange zombies came from. The zombies are unlike any ranks previously seen, and they aren't as predictable. Some have new tricks hidden up sleeves, forcing any Stronghold they encounter to quickly adapt to the new challenge or risk being overrun. Secrets never remain hidden, and zombie apocalypses never make life easy.