This talk presents a systematic approach to understand and implement Genetic Algorithms, with a hands-on experience of solving a real-world problem. The inspiration and methods behind GA will also be included with all the fundamental topics like fitness algorithms, mutation, crossover etc, with limitations and advantages of using it.
Genetics has been the root behind the life today, it all started with a single cell making an error when dividing themselves. It was discovered by Charles Darwin & Alfred Russel Wallace in their book "On the Origin of Species", which highlighted 2 important points:
This later inspired John Henry Holland to create Genetic Algorithms and write about it in his book "Adaptation in Natural and Artificial Systems"
In computer science, Genetic algorithms are commonly used to generate high-quality solutions to optimization and search problems. To understand this better we will start with an example by creating a tiny world of cars(solution), and along the way discuss the definitions.
N = 10
{
"id": "0-n",
"length": "Length of car",
"width": "Width of car",
"height": "Height of car",
"step-size": "Speed",
"angle": "Angle at which car is driven",
"step-taken": "Steps taken before termination; set after solution is implemented",
"fitness": "will be between 0-1; set after the solution is implemented"
}
{
"id": "0",
"length": "60",
"width": "40",
"height": "50",
"step-size": "10",
"angle": "30",
"step-taken": "0",
"fitness": "-1"
}
...
"""
Both angel and step-taken can be used for fitness, but angle won't be a good
criteria cause it is only applicable if there are no other cars on the road.
However, but for our case we will use it.
"""
def calculateFitness(carN):
fitness = angleNearZero(carN.angle)
Genetic_Algo ()
initialize_population ()
for(Population size)
{
gene1: value,
gene2: value
}
while (Termination) do
Solve the problem
Fitness()
parents selection()
crossover()
{
gene1: value of parent 1,
gene2: value of parent 2
}
mutation()
return best
Here I will live code the above example from scratch, it will most likely be in Jupiter notebook with graphics to help the audience understand better.
This talk will give enough information and methods to the audience that they will be able to program their simple Genetic Algorithm, plus they will also be able to research the topic further with little or no help.
Without mutation(error) life is just Permutation and Combination problem, its this error which open infinite possibilities.