Modeling the space
The aim of a Monte Carlo system is to model or simulate a space and a robot’s location. In this section, we will learn how code for the robot will represent this space. We will also look at how a computer can be used to visualize our robot’s guesses. Monte Carlo-based behavior code checks sensor readings frequently against the model of the space, so we should represent the space on the robot to optimize this.
The role of the computer and the robot in this are shown in the following diagram:
Figure 13.4 – Visualizing with the computer
Figure 13.4 shows an overview of this system’s display and control architecture. The behavior code runs on the robot. The computer displays the state of the robot code, along with start and stop controls. The arena and state of the system all belong to the robot.
Let’s look at how to represent the arena on the robot.