[jrgp -- Tutorial ]

Tutorial - Automatic Ant Problem.

  1. invoke 'gool' from the main 'jrgp' directory, specifying the project 'examples/ant' as option at command line;
  2. open the 'prj directory' subtree and select in the 'ant.AntFSet' node [corresponding to AntFSet.class whose source file is AntFSet.java in the same dir] all the methods; use the context popup option 'to gp-function' to extract them as GPFunction subclasses;
  3. select the newly created java classes and copy them in the 'function pool' node, via the popup options [copy&paste] or the key shortcuts;
  4. open the 'parameters factory' and copy the functions nodes from the 'function pool' into the 'function set';
  5. set the 'evaluator' node with the 'set...' popup option to the file 'AntEvaluator.class' [source file AntEvaluator.java in the same dir];
  6. create a population of 1000 individuals by selecting 'create population' from the 'parameters factory' popup;
  7. you can now modify the population parameters from the '_population0/parameters' node. Turn for example the overselection option 'ON'; parameters changes become effective through 'force changes' popup option or at next generation run;
  8. run the population for one or more generations with the corresponding options in the population node; at each generation the best individual's behaviour is shown in a window.

Note: you can easily edit the ant track by editing the file 'map1.txt' in the 'examples/ant' directory. Warning: the lines must all have the same size.

Note: you can quit gool using the 'exit' popup option of 'gap' node.