Michael T Ai assignment
Michael T Ai assignment
SECTION: B
Python code for class Vacuum CleanerAgent
def __init__(self):
# Initial location is A, but you could set it to B depending on your initial conditions
self.location = "A"
self.environment = {"A": "Dirty", "B": "Dirty"} # initial state
def sense(self):
# Sense the state of the current location
return self.environment[self.location]