code: def TableDrivenAgentProgram(table):
      
      percepts = []
      def program(percept):
          percepts.append(percept)
          action = table.get(tuple(percepts))
          return action
      return program
docs: This agent selects an action based on the percept sequence.
      It is practical only for tiny domains.
      To customize it, provide as table a dictionary of all
      {percept_sequence:action} pairs. [Fig. 2.7]