Homepage



  » Welcome
  » About
  » Hosting

  General AI



  » Introductions
  » Finite State Machines
  » Ameliorated Future
  » Miscellaneous

  Neural Networks



  » Introductions
  » Backpropagation
  » Optimization
  » Simulators
  » Applied NNs
  » Sample Code
  » Image Recognition
  » Image Compression

  Artificial Life



  » Tutorials
  » Sample Code

  Genetic Algorithms



  » Libraries
  » Sample Code

  Fuzzy Logic



  » FAQ

  Games



  » Sample Code

  Reinforcement Learning



  » Tutorials
  » FAQ

You are in: Genetic Algorithms  /  Sample Code  /  Circle GA demo
Circle GA demo

A Genetic Algorithms Demo

Here is a quick demo applet that Robert wrote. It tries to evolve circles. Click on it to restart the evolution.

This applet tries to draw ten generations in a second. The best individual is drawn in green, the worst in red, and the median individual is drawn in yellow.

The GA has a population of 50. Selection is rank based. The worst 10 are replaced each generation. Each chromosome is given a single bit mutation every generation. The chromosome is a bit string of 256 bits. Each byte in the chromosome is a coordinate (16 pairs of coordinates). The coordinate data is Gray coded for easier evolution. These settings are NOT optimal - they are just the first thing that I thought of.

Download source code + applet (17 Kb)


This applet was made by Robert Thomson.






Download Article
Printer Friendly
Back


All content copyrighted by Avaye.com