Replies: 0 comments 2 replies
-
Hi, I suggest looking at the Prey Capture task, here: For an example of a basic/minimal app for evolving a neural net genome for a specific problem task, see the TestApp, here: E.g. in Program.cs you can switch the call to Saving and loading of evolved neural nets for later re-use is straightforward with these handy static helper methods: Save a genome (e.g. the current best) to file, like so:
Load the saved file like so:
To convert
Hope that helps. |
Beta Was this translation helpful? Give feedback.
-
Thanks!!ב-17 בדצמ׳ 2022, בשעה 19:55, Colin Green ***@***.***> כתב/ה:
Hi,
I suggest looking at the Prey Capture task, here:
https://github.com/colgreen/sharpneat-refactor/blob/main/src/SharpNeat.Tasks/PreyCapture/PreyCaptureEvaluator.cs
For an example of a basic/minimal app for evolving a neural net genome for a specific problem task, see the TestApp, here:
https://github.com/colgreen/sharpneat-refactor/tree/main/src/Tests/TestApp1
E.g. in Program.cs you can switch the call to CreateNeatEvolutionAlgorithm_Binary11 to CreateNeatEvolutionAlgorithm_PreyCapture or your own equivalent code that is based on CreateNeatEvolutionAlgorithm_PreyCapture.
Saving and loading of evolved neural nets for later re-use is straightforward with these handy static helper methods:
Save a genome (e.g. the current best) to file, like so:
NeatGenomeSaver.Save(bestGenome, filepath);
Load the saved file like so:
NetFileModel netFileModel = NetFile.Load(filename);
To convert netFileModel to a neural net that can be used, do:
IBlackBox<double> neuralNet = NeuralNetConverter.ToNeuralNet(netFileModel);
Hope that helps.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hello, im trying to use the package but i didnt find a basic simple example
basically i built a game and i want to train the SharpNEAT on it
my inputs for the network are double[] input // around 30 different params
and the output is a simple bool[] output // only 1 key at the moment (jump)
can i get the most basic example?
another small question, lets assume that we achieved the level of training we want.
how can i serialize the model into a file inorder to load it and just use the well-train model
THANKS!!
Beta Was this translation helpful? Give feedback.
All reactions