Page 167 - 49A Field Guide to Genetic Programming
P. 167
B.2 Input Data Files for TinyGP 153
• The average size of the programs in the current generation.
• The best individual in the population.
14. The random number generator can be seeded via the command line.
If this command line parameter is absent, the system uses the current
time to seed the random number generator.
15. The name of the file containing the fitness cases can be passed to
the system via the command line. If the command line parameter is
absent, the system assumes the data are stored in the current directory
in a file called “problem.dat”.
16. If the total error made by the best program goes below 10 −5 TinyGP
prints a message indicating success and stops. If the problem has
not been solved after the maximum number of generations, it prints a
message indicating failure and stops.
B.2 Input Data Files for TinyGP
The input files for TinyGP have the following plain ASCII format:
HEADER // See below
FITNESSCASE1 // The f i t n e s s cases ( one per l i n e )
FITNESSCASE2
FITNESSCASE3
. . . .
Each fitness case is of the form
X1 . . . XN TARGET
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
NVAR NRAND MINRAND MAXRAND NFITCASES
where NVAR is an integer representing the number of variables the system
should use, NRAND is an integer representing the number of random con-
stants 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 represent-
ing the number of fitness cases. NRAND can be set to 0, in which case
MINRAND and MAXRAND are ignored. For example:
1 100 -5 5 63
0.0 0