Example #1
0
    def setup(self):
        super(InteractiveBrainWithSensors, self).setup()

        self.front_left_sensor = Sensor(self.car, angle=-2, x=-6, y=15)
        self.front_center_sensor = Sensor(self.car, angle=0, x=0, y=15)
        self.front_right_sensor = Sensor(self.car, angle=2, x=6, y=15)
        self.goal_sensor = GoalSensor(self.car)
Example #2
0
 def setup(self):
     #self.car.accelerate(4)
     #self.front_left_sensor = Sensor(self.car, angle=-2, x=-6, y=15)
     self.front_center_sensor = Sensor(self.car, angle=0, x=0, y=15)
     #self.front_right_sensor = Sensor(self.car, angle=2, x=6, y=15)
     self.right_sensor = Sensor(self.car, angle=70, x=6, y=15)
     self.left_sensor = Sensor(self.car, angle=-70, x=-6, y=15)
     self.goal_sensor = GoalSensor(self.car)
     self.time = time.time()
Example #3
0
 def setup(self):
     self.calcAttributes()
     self.sensor = Sensor(self.car,
                          angle=self.sensorAngle,
                          x=self.sensorX,
                          y=self.sensorY)
     self.time = time.time()
Example #4
0
    def setup(self):
        self.front_center_sensor = Sensor(self.car, angle=0, x=0, y=15)

        # start driving
        self.car.accelerate(10)
Example #5
0
 def setup(self):
     self.i = 0
     self.front_left_sensor = Sensor(self.car, angle=-90, x=-6, y=15)
     self.front_center_sensor = Sensor(self.car, angle=0, x=0, y=15)
     self.front_right_sensor = Sensor(self.car, angle=90, x=6, y=15)
     self.goal_sensor = GoalSensor(self.car)
Example #6
0
    def setup(self):
        self.action = 0

        self.front_left_sensor = Sensor(self.car, angle=-45, x=-6, y=15)
        self.front_center_sensor = Sensor(self.car, angle=0, x=0, y=15)
        self.front_right_sensor = Sensor(self.car, angle=45, x=6, y=15)