Home > Project > Coin Genetic Algorithm

Coin Genetic Algorithm

My first genetic algorithm solves problems like ‘Make X cents given Y coins from the set Z of allowed coins’. The user can input those problem values, as well as control the population size, mutation rate, and elitism bias of the genetic algorithm solving it.

Genetic algorithms work by ‘breeding’ a solution from previously generated solutions, with the goal being to breed solutions closer to a target. This is wonderful for problems with huge solution spaces, where you know the form of the answer, but not what it is, because GA’s can ‘hill-climb’ across the fitness landscape to quickly approach a right answer.

Sometimes, though, GA’s can get stuck on a local maximum in the fitness landscape, where evolving towards the right answer costs on the fitness function. In these cases, GA’s can take much longer to find the answer.

Download the C# source code here.

Categories: Project
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: