You'll need to write a statistics object which goes through and
counts the nodes (there's a function in GPNode for counting all the
nodes in the tree). But it's easy -- you don't even have to count
the nodes yourself -- just hack the existing KozaStatistics object,
which already does the counting on a per-generation basis, and build
up a sum from those counts, then print it out during finalStatistics.
On Oct 13, 2006, at 11:55 AM, John Woodward wrote:
> At the end of a GP run, I am told the number of individuals evaluated.
> Final Statistics
> Total Individuals Evaluated: 120
> For example in this case I set the population size to 12 and ran it
> for 10 generations.
> (i.e. 12*10 = 120).
> I would like to perform a finer measure.
> In the first case I would like to take into account the number of test
> cases used when evaluating an individual.
> For example if we used 5 test cases, the this would be
> 5*120 = 600.
> In the second case I would actually like to count the number of nodes
> used in the whole run
> (There is of cours no simple formula for this as the number of nodes
> in each tree will vary).
> Thank you in advance for your help.
> John Woodward.