Print

Print


You need to put some info in the individuals and have the operators update
it. See my post (/w code):

Date:         Mon, 26 Apr 2004 09:12:04 -0400
From:         Gabriel Catalin Balan <[log in to unmask]>
Subject:      Re: Generating the evolutionary tree
Comments: To: ECJ Evolutionary Computation Toolkit
          <[log in to unmask]>
In-Reply-To:  <[log in to unmask]>

You're only the second person to need [to look at] it (the code that is). If
more people need it, I could ask Sean Luke to allow it in the standard
release.

Gabriel


-----Original Message-----
From: ECJ Evolutionary Computation Toolkit
[mailto:[log in to unmask]] On Behalf Of Steve Butcher (Steve-O)
Sent: Monday, May 02, 2005 10:23 AM
To: [log in to unmask]
Subject: Extra Statistics and Pickling

Dear List,

I've worked with ECJ for a few GP problems but not for anything that
required me to do anything but create a Problem, some functions and do
some tuning on the parameters.

For my current project, I'd like to collect some extra statistics. I'm
not sure whether these are things I can do by subclassing or whether
they might require a fork. Pointers to the relevant classes and any
other ideas would be greatly appreciated.

1) for each new individual, I'd like to record:
        a) whether it was random (initial population), cloned (via
reproduction) or grafted (via crossover).
        b) if grafted:
                i) the indices/identity of the root and subtree parents.
                ii) the indices of the crossover points. (I assume ECJ has
some
invariant notion of the 5th node for an arbitrary tree).
        c) if cloned, the source of the clone.

2) a global breeding record that summarizes over all generations for
all individuals who their parents/clone source were in the previous
generation. Something long the lines of:

generation---->
        0       1       2       3       4
0       *       2       1       0       2
1       *       3       1       1       3
2       *       2/3     1/3     1/2     3/3
3       *       3/2     3/1     2/1     3/3

3) saving each individual in each generation individually either a) as
text or  b) serialized.

essentially there would be an output folder structure that is:

001/
        + 001.ind
        + 002.ind
        ...
        + 00n.ind
002/
        ...

I'm wondering if any could comment and whether, when it comes time to
"unpickle", whether text or serialization would be faster.

Thanks in advance,
Steve