Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef NN_INCLUDED
- #define NN_INCLUDED
- #include <stdio.h>
- #include <math.h>
- #include "jackstd.h"
- #define NN_NUMINPUTS 4
- #define NN_NUMHIDDEN 20
- #define NN_NUMOUTPUTS 4
- #define NN_NUMWEIGHTS ((NN_NUMINPUTS+1)*NN_NUMHIDDEN + (NN_NUMHIDDEN+1)*NN_NUMHIDDEN + (NN_NUMHIDDEN+1)*NN_NUMOUTPUTS)
- typedef struct {
- float input[NN_NUMINPUTS];
- float output[NN_NUMOUTPUTS];
- float weight[NN_NUMWEIGHTS];
- } nn;
- void nn_process(nn *net);
- void nn_fillrandom(nn *net);
- void nn_mutate(nn *net);
- void nn_copy(nn *dest, nn *src);
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement