Darwin was onto something

AIM

Develop EA

CONDUCT:

  • Finished development of EA
  • Developed EA visualisation
  • First pass at developing preferred EA parameters

RESULTS:

The evolutionary algorithm was developed as follows:

  • Genome encoded as two integers, corresponding to FUP and SBF index
  • Initial population of 100
  • 50 pairs children created from parents in order – ie. First pair of children created from top and second ranked solutions. Second pair from 3rd and 4th etc.
    • Children have a 30% chance to be direct copies of parents
    • 70% chance to split parent genome for children (ie. Child one will have parent 1’s FUP and parent 2’s SBF, child two will be the opposite)
  • Children are then mutated; each element in the genome gets an integer added in the range of -3 to +3 (0 included)
  • The top 100 solutions (previous generation plus children) are then carried over to the next generation.

The test bed for this is a 500m x 500m terrain with the x coordinate options (Which will become the FUP options in the live problem) initialised as a 100 000 element array with random real values between 0 and 500. The y coordinate options (SBF for live problem) is the same with 10 000 elements.

The fitness function is merely the terrain height at the coordinates specified by the values at the indexes in the genome for x and y axis. The EA is visualised by marking the top 30 solutions on the terrain at each generation. This is shown below.

3D terrain with 30 cubes showing location of each of the top 30 candidate solutions on a terrain representing solution space
Visualisation showing the top 30 solutions of the EA. Processing is slowed down by sleeping the thread every generation for 0.25 seconds IOT allow reasonable visualisation.

The biggest point for improvement is to randomise parents with preference for higher ranked chosen for breeding but a finite possibility that a lower ranked solution will be selected with a higher ranked parent.

Time Spent:

5 hours  (118 hours running total)

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s