I have an assignment where I'm supposed to implement a simple vacuum cleaner agent with a randomized agent function. Basically there's a world with 36 rooms in a 6 x 6 grid. The vacuum cleaner determines which square is it in and whether there is dirt in the square. It can choose to move left, move right, suck up the dirt, or do nothing.
I'm new to python and I'm having really hard time to figure out what to do and how to do this. This is all I've done so far and I kind of have a mental block on what do do next. Specifically how would I implement the simulations of sucking dirt or perform the movements left, right, up, or down.
If anyone can push me in the right direction I'd appreciate it.
# vacuum cleaner
DIRTY = '*'
CLEAN = '#'
NUM_ROOMS = 36
room = ['*', '*', '#', '#', '*', '#',
'#', '#', '*', '*', '#', '#',
'*', '#', '#', '*', '*', '*',
'*', '*', '#', '#', '#', '#',
'#', '#', '*', '*', '*', '#',
'*', '*', '#', '#', '#', '*']