Robot - jetstreamc/PySimbot GitHub Wiki

In PySimbot, Robot is displayed by the circle as shown in the below image. The stripe in the circle indicates the front side of the robot.

/images/robot.png

Movements

Two operations allowed for changing the robot position and turning angle.

  • turn( degree )

    To turn the robot around its center for degree degree. The negative degree means turn left. On the other hand, the positive degree means turn right.

  • move( step )

    To go forward or backward for step pixels. Use positive value to go forward and negative value to go backward.

Sensors

The PySimbot's Robot has two kinds of sensors attached. These sensors are the way to measure the environment such as wall, obstacles, and food.

  • 8 distance sensors

    Measuring the distance from the edge of the robot to the obstacle and wall. The sensor are located around the robots in 8 directions (+45 degrees for every sensor starting from the robot front edge). These sensors has operational length of 100 pixels. If there is no obstacle and wall in the operation range, the sensors will return 100.

  • 1 smell sensor

    Measuring the angle in degree (-180 to 180) from the robot center position to the specified food. If the food is on the left of robot the angle will be negative. If the food is on the right of the robot the angle will be positive.