+/GENN
genetically evolving neural networks
git clone https://git.julia.blue/+/GENN
a43321c
imdone-todo-updates
1#ifndef GENN_POLE_H 2#define GENN_POLE_H 3 4#include "../include/Simulation.h" 5#include "../lib/tigr.h" 6 7class Pole :public Simulation { 8private : 9Tigr * screen ; 10int width = 500 ,height = 200 ; 11double fps = 1. /30 ; 12double accumulator = 0 ; 13int cartWidth = 40 ,cartHeight = 10 ; 14double pi = 3.14159265358979323846 ; 15double length = 10 ,angle = 0 ,angleSpeed = 0 ,maxForce = 10 ,cart = 16width /2 ,speed = 0 ; 17double massCart = .9 ,massPole = .1 ,g = 9.8 ; 18 19bool step (double ); 20 21void reset (); 22 23public : 24Pole () { 25controller = new NEAT (5 ,1 ); 26 } 27 28void play (); 29 30void evaluate (Genome & g ); 31 32void view (Network n ); 33}; 34 35 36#endif //GENN_POLE_H