Tutorials for photoshop, javascript, php, html, css, flash, and more!

tutorials for photoshop, javascript, and php
   The Machine | Search for a cog | Submit a cog

Genetic Algorithms Applied w/ Perl

The code in Listing 1 uses a single byte as DNA (value between 0 and 255, 8 bits). The fitness formula is applied once to every new individual, taking the byte value of the DNA and dividing it by 256. This means that the fitness formula will always return a number between 0 and 255/256, so it can never reach 1. What do you think the fittest DNA will be?…


Click here for this Tutorial!