Exemplo n.º 1
0
 public Snake(int x, int y)
 {
     direction = new Point(1, 0);
     tmp       = new Point();
     body      = new List <Point>();
     body.Add(new Point(x, y));
     body.Add(new Point(x, y + 1));
     alive  = true;
     brain  = new NN();
     length = 2;
     Way    = 0;
 }
Exemplo n.º 2
0
        public NN(NN reference)
        {
            sizes = new int[] { 11, 10, 10, 4 };

            layers = new float[sizes.Length][];
            for (int i = 0; i < sizes.Length; i++)
            {
                layers[i] = new float[sizes[i]];
            }
            weights = (float[][, ])reference.weights.Clone();
            //Mutate();
        }
Exemplo n.º 3
0
 public Snake()
 {
     direction = new Point(1, 0);
     body      = new List <Point>();
     body.Add(new Point(0, 0));
     body.Add(new Point(0, 1));
     body.Add(new Point(0, 2));
     alive  = true;
     brain  = new NN();
     tmp    = new Point();
     length = 3;
     Way    = 0;
 }