some question

20 views
Skip to first unread message

Lyani

unread,
May 14, 2008, 2:11:37 AM5/14/08
to Field Guide to Genetic Programming
hello,

it's written on section B.1 about characteristics of TinyGP, and point
1 said that the terminal is a user-definable number of floating point
variables (named x1 to xn).

is it mean that TinyGP only use variables (one of the terminal set
mentioned on table 3.1) as the terminal?
is it mean TinyGP can't use constant values and 0-arity functions
(also mentioned on table 3.1) as the terminal?
if it is so, is this possible to modify TinyGP so it can use all of
the terminal set mentioned on table 3.1?

thanks,
Lyani

rp...@essex.ac.uk

unread,
May 20, 2008, 5:55:27 AM5/20/08
to Field Guide to Genetic Programming
Hi Lyani,

Tiny GP can use variables and random constants. The first line of the
input data file tells the program how many variables your problem has,
then it tells it how many random constants GP can use, and then it
provides two values that represent the range (min,max) from which the
random constants are drawn. (The final element if the first line is
the number of fitness cases (examples). These follow one after the
other in the remaining lines of the file).

Of course, one could modify TinyGP so that it handles 0-arity
functions. The places where you would need to make changes are the
evaluation procedure (run), the initialisation (grow) and the printing
routing (print_indiv).

I hope this helps.

Riccardo

Lyani

unread,
Jun 4, 2008, 6:27:21 AM6/4/08
to Field Guide to Genetic Programming
hi,

algorithm 3.1 (page 25) tells about Interpreter for GP, is this
algorithm have any relation with the evaluation procedure (run)?
because it is written (by a comment) that this method is interpreter.
is this algorithm will hep me to make changes the evaluation procedure
(run)?

thank you for helping me learn more clearly,
Lyani

rp...@essex.ac.uk

unread,
Jun 5, 2008, 12:11:49 PM6/5/08
to Field Guide to Genetic Programming
Hi,

the run procedure implements a recursive interpreter. It treats every
primitive as a macro, so the primitive must itself invoke the
interpreter (run) if and when necessary. So, it is essentially the
same algorithm as the one you refer to. However, for efficiency
reasons, we keep the code that implements each primitive within the
run procedure. Also, instead of passing expressions via the stack, we
make use of an external variable which constantly points to the
expression that run needs to evaluate. The pointer is updated at the
beginning of the run procedure, so that when run is invoked again
(recursively) it knows where the expression that it needs to interpret
is located.

I hope this helps.

Riccardo

> > > Lyani- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages