7. Programming. Consider the agent hunter.py that operates in a simple grid environment
foraging for food. Note the clear separation between agent and environment classes.
(i) This agent is more complex than a reactive agent that merely acts on the current
percepts on each cycle. In what environments does this agent have an advantage over
the reactive agent? Run some experiments to test your ideas.
(ii) This agent stores all previous percepts in a set, but does not update that set when
food is observed to disappear (food that should be possible to see is no longer visible).
Change the code to implement this functionality.
(iii) (Harder) Consider how to define the agent action selection function when there are
multiple agents in the world, all competing for food. Code the perception and action
selection functions to handle this scenario, and run some experiments. Note: It is
straightforward using the existing code to create any number of agents.