The best way to achieve this is using the Life event handling system.
You can register your model as a listener for generation events, and
then upon the start of each generation you can trigger whatever
changes you require to the training data that are used in the fitness
function. It is often easiest to do this with an anonymous inner
class:
Life.get().addGenerationListener(new GenerationAdapter() {
public void onGenerationStart() {
changeTrainingData();
}
});
Where the changeTrainingData() method will be called at the start of
every generation.
I hope this helps!
Tom