Build in functions for saving / loading generations
Opened this issue · 2 comments
And set it up so you can hot-start from a given population
Interesting coincidence, was thinking the minute before checking these issues that I need a good way to save/load AI "monsters" (with arbitrary architecture). Should be easy to plug in a new AI model and let it compete to the top through a fitness function that pitches it with AIs of similar rank. Like:
ai1=database.load("deepneuralnetwork.ai")
ai2=database.load("anthivemind.ai")
result=game(ai1,ai2)
result.winner.points+=result.score
database.ranks.update()
#etc...
Is it worthwhile to bring in a JuliaDB driver package for this task?
Ah, yea, I've always meant to get around to this heh.
I'd prefer not to make GeneticAlgorithms.jl dependent on any JuliaDB drivers (so that people can do whatever kind of serialization they want) but I definitely think there could be hooks of some kind.
My initial thought was to refactor the way the run
methods work so that you can "run to completion" (like happens now) or else "step" (which would just run one cycle). Then you could easily get the population at each step and save it to a db, send it to an http endpoint, console log it, or whatever else.