The Environment: `VacuumCleanerWorld`
This class represents the physical world the agent operates in. Its responsibilities are:
- Maintaining State: It keeps track of which rooms are dirty or clean and where the agent is currently located.
- Providing Percepts: The
get_percept()method gives the agent its sensory information—its current location and whether that location is dirty. - Updating State: The
perform_action()method takes an action from the agent and modifies the world accordingly. For example, if the agent chooses'Vacuum', the class changes the status of the current room to'Clean'.