public MainWindow() { InitializeComponent(); racetrack = new RaceTrack(centerpathFilename); if (run) { timer = new DispatcherTimer(); timer.Interval = new TimeSpan(10000); timer.Tick += Timer_Tick; timer.Start(); } }
public Racecar(RaceTrack raceTrack, NeuralNet steeringnet) { this.raceTrack = raceTrack; this.position = new Vector(raceTrack.data.start.x, raceTrack.data.start.y); direction = new Vector(0.0, 1.0); direction.Normalize(); speed = 0.0; directionchangerate = 0.0; IsStopped = false; DistanceTraveled = 0.0; eyedirections = new List <double>() { 45, 20, 0.0, -20, -45 }; seenpoints = new List <Vector>(); this.steeringnet = steeringnet; }
public Racecar(RaceTrack raceTrack) : this(raceTrack, new NeuralNet(5, 1, 2)) { }