View on
J. J. Merelo-Guervós > Algorithm-Evolutionary-0.78_2 >


Annotate this POD


Open  0
View/Report Bugs
Source   Latest Release: Algorithm-Evolutionary-0.80

NAME ^ - Find the dot maximally covered by (random) rectangles


You might have to do

  prompt% sudo cpan Tk 
  prompt% sudo cpan Algorithm::RectanglesContainingDot 

specially this last one, first, since that module is not installed by default with Algorithm::Evolutionary.

  prompt% ./ <number-of-rectangles> <arena-side> <bits-per-coordinate> <population> <number of generations> <selection rate>


  prompt% ./

And change variable values from the user interface


A script that combines the Algorithm::Evolutionary::Op::Easy module with Tk to create a visual demo of the evolutionary algorithm. It generates randomly a number of rectangles, and shows how the population evolves to find the solution. The best point is shown in darkening yellow color, the rest of the population in green.

Use "Start" to start the algorithm after setting the variables, and then Finish to stop the EA, Exit to close the window.

Default values are as follows

This program also demonstrates the use of caches in the fitness evaluation, so be careful if you use too many bits or too many generations, check out memory usage.

Console output shows the number of generations, the winning chromosome, and fitness. After finishing, it outputs time, cache ratio and some other things.


First, you should obviously check Algorithm::Evolutionary::Op::Easy, and then these other classes.

Tk is a prerrequisite for this program, as well as Algorithm::RectanglesContainingDot. Obviously, Algorithm::Evolutionary should be installed too, just in case you got this independently.


J. J. Merelo, jj (at)

Copyright ^

This file is released under the GPL. See the LICENSE file included in this distribution, or go to

  CVS Info: $Date: 2012/07/09 15:46:15 $ 
  $Header: /cvsroot/opeal/Algorithm-Evolutionary/scripts/,v 3.4 2012/07/09 15:46:15 jmerelo Exp $ 
  $Author: jmerelo $ 
  $Revision: 3.4 $
syntax highlighting: