TLmaK0 / rustneat

Rust Neat - NeuroEvolution of Augmenting Topologies
MIT License
70 stars 16 forks source link

Add serde derives #48

Open analog-hors opened 4 years ago

analog-hors commented 4 years ago

Adds serde derives for Serialize and Deserialize, which can be enabled through the with_serde feature. Intended for being able to save and restore the population to pause and resume evolution, as well as saving the best genes for later use. Adds an example for this use case. Let me know if there are issues.

TLmaK0 commented 4 years ago

Thanks @KSean222. Instead of "with_serde" could it be something like "serializable"? I mean, some people not familiar with rust doesn't know what it is "serde". And the sample should be named something like serializable_sample or persistence_sample. What do you think? And we should fix the Travis CI errors https://travis-ci.org/github/TLmaK0/rustneat/jobs/705089303