www.gp-field-guide.org.uk
Contents Top Previous Next

B.2 Input Data Files for TinyGP

The input files for TinyGP have the following plain ASCII format:

HEADER
       //Seebelow
FITNESSCASE1
//Thef i t n e s scases(oneperl i n e )
FITNESSCASE2 FITNESSCASE3 . . . . Each fitness case is of the form
X1 . . . XNTARGET
where X1 to XN represent a set of input values for a program, while TARGET represents the desired output for the given inputs.

The header has the following entries

NVARNRANDMINRANDMAXRANDNFITCASES
where NVAR is an integer representing the number of variables the system should use, NRAND is an integer representing the number of random constants to be provided in the primitive set, MINRAND is a float representing the lower limit of the range used to generate random constants, MAXRAND is the corresponding upper limit, and NFITCASES is an integer representing the number of fitness cases. NRAND can be set to 0, in which case MINRAND and MAXRAND are ignored. For example:
1100-5563
0.00
0.10.0998334166468282
0.20.198669330795061
0.30.29552020666134
....
55LINESOMITTED
....
5.9-0.373876664830236
6.0-0.279415498198926
6.1-0.182162504272095
6.2-0.0830894028174964
These fitness cases are sin(x) for x {0 .0,0 .1,0 .2,...6.2 }


www.gp-field-guide.org.uk
Contents Top Previous Next