GMUEClab / ecj

ECJ Evolutionary Computation Toolkit
http://cs.gmu.edu/~eclab/projects/ecj/
123 stars 42 forks source link

UUIDs on Individuals #66

Closed SigmaX closed 3 years ago

SigmaX commented 3 years ago

We have an application where we need to save byproducts of fitness evaluation (like simulation results) to a file, and later be able to associate those files with the Individual that they came from.

So we'd like to have UUIDs to uniquely identify an individual. AFAIK, ECJ uses innovation numbers for NEAT, and some hand-specificied unique identifiers for GP subtrees---but there is no general Individual-identifier mechanism.

There are a couple ways to do this (ex. we could add a breeder Pipeline that "stamps" individuals with a UUID as they go by), but the simplest seems to be to just add a uuid attribute to Individual and have it initialized by the clone() operator (since we use clone() to create new individuals).

This shouldn't introduce any significant overhead, since the whole point of UUIDs is that they have low "minting" cost.

SigmaX commented 3 years ago

OBE.