1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # A simple brain
from pyrobot.brain import Brain
# Define the robot's brain class
class SimpleBrain(Brain):
# Only method you have to define is the step method
def step(self):
self.robot.translate(0.3) # go forward
# Create a brain for the robot
def INIT(engine):
return SimpleBrain('SimpleBrain', engine) |
