0

In Java's version of Encog, how do I save a NEAT network and its training? I'd like to be able to close my software and resume its training where it left off the next time I run it.

I have a NEATPopluation, CalculateScore, and EvolutionaryAlgorithm training object. Which do I save and how do I reinitialize it properly?

I've read about persistence but none of the examples seem to be for this kind of network.

Limon Monte
  • 52,539
  • 45
  • 182
  • 213
Anonymous
  • 696
  • 8
  • 21

1 Answers1

3

my understanding is that you have save your NEATPopulation using a PersistNEATPopulation instance. In fact it's the way I'm doing it, but maybe somebody with better knowledge can illustrate us.

I don't know how to do it in Java, but in .net I do something like this:

NEATNetwork network = (NEATNetwork)train.CODEC.Decode(train.BestGenome);

trainedNetworkFile = new FileStream(path, System.IO.FileMode.Create);
pnp = new PersistNEATPopulation();
pnp.Save(trainedNetworkFile, pop); //pop is your NEATPopulation object
trainedNetworkFile.Close();
Pablo
  • 31
  • 3