示例#1
0
 public Player(int x, int y)
 {
     checkpoints = new List <int>();
     Loc         = new Point(x, y);
     Rot         = 0;
     ForwardVel  = 0;
     TurnVel     = 0;
     sensors     = new double[8];
     Net         = new NeuralNet(new int[] { sensors.Length, 16, 16, 4 });
     startLoc    = Loc;
     PrevLoc     = Loc;
 }
示例#2
0
        public int CompareTo(object obj)
        {
            if (obj == null)
            {
                return(1);
            }
            NeuralNet other = obj as NeuralNet;

            if (Fitness < other.Fitness)
            {
                return(1);
            }
            else if (Fitness > other.Fitness)
            {
                return(-1);
            }
            else
            {
                return(0);
            }
        }