Skip to content

Demonstrates how genetic algorithms work using bitstrings

Notifications You must be signed in to change notification settings

Hysperr/genetic-algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Genetic Algorithm Demonstration

Curteosy of Professor M. Franklin KSU

This program demonstrates the genetic algorithm to maximize our function f(x) = x2. We do this in a series of 5 steps:

1 - Randomly generate candidates

2 - Apply fitness function & sort

3 - Crossover

4 - Mutate

5 - Repeat

These steps give us the ability to find optimized solutions to difficult problems when we don’t know the exact answer. This program uses bitstrings as candidates. Of course we can know by looking that a candidate bitstring of 11111 (given a max bitstring length of 5) would maximize our fitness function f(x) = x2, because 11111 (31 in decimal) is f(31) = 961. However this program is meant to show the procedure of the GA and provide any reference necessary.

About

Demonstrates how genetic algorithms work using bitstrings

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published