labs/Lab_W1_Solution.py
def execute_action(self, agent, action):
        """Change agent's location and/or location's status; track performance.
        Score 10 for each dirt cleaned; -1 for each move."""
               
        """      
        moveChicken
        move
        moveFox
        moveFeed
        moveChicken
        SUCCESS
       """ 
        if action == 'move':
            self.move(agent)
        elif action == 'moveChicken':
            self.moveChicken(agent)
            agent.performance -= 1
        elif action == 'moveFox':
            self.moveFox(agent)
            agent.performance -= 1
        elif action == 'moveFeed':
            self.moveFeed(agent)
            agent.performance -= 1
        elif action == 'SUCCESS':
            print('<<<<Successfully completed:', agent.performance)
Change agent's location and/or location's status; track performance.
        Score 10 for each dirt cleaned; -1 for each move.
Change agent's location and/or location's status; track performance.
Score 10 for each dirt cleaned; -1 for each move.
Change agent ' s location and / or location ' s status ; track performance . Score 10 for each dirt cleaned ; - 1 for each move .
def execute_action(self, agent, action):
        if action == 'move':
            self.move(agent)
        elif action == 'moveChicken':
            self.moveChicken(agent)
            agent.performance -= 1
        elif action == 'moveFox':
            self.moveFox(agent)
            agent.performance -= 1
        elif action == 'moveFeed':
            self.moveFeed(agent)
            agent.performance -= 1
        elif action == 'SUCCESS':
            print('<<<<Successfully completed:', agent.performance)
def execute_action ( self , agent , action ) : """      
        moveChicken
        move
        moveFox
        moveFeed
        moveChicken
        SUCCESS
       """ if action == 'move' : self . move ( agent ) elif action == 'moveChicken' : self . moveChicken ( agent ) agent . performance -= 1 elif action == 'moveFox' : self . moveFox ( agent ) agent . performance -= 1 elif action == 'moveFeed' : self . moveFeed ( agent ) agent . performance -= 1 elif action == 'SUCCESS' : print ( '<<<<Successfully completed:' , agent . performance )
Change agent's location and/or location's status; track performance.
Change agent ' s location and / or location ' s status ; track performance .
"""Change agent's location and/or location's status; track performance.
        Score 10 for each dirt cleaned; -1 for each move.""" """      
        moveChicken
        move
        moveFox
        moveFeed
        moveChicken
        SUCCESS
       """
self
agent
action