Which of the following best describes the primary role of an agent in a real-world AI application?
Think about how a self-driving car senses and reacts to its surroundings.
Agents in real-world AI applications sense their environment and take actions to reach specific goals, making them active and interactive.
You are designing an AI agent for a delivery robot that must navigate city streets, avoid obstacles, and deliver packages on time. Which agent architecture is most suitable?
Consider the need to remember past information to make better decisions.
A model-based reflex agent keeps track of the environment state, which helps in complex navigation and decision-making tasks like delivery.
An AI agent is deployed in a warehouse to pick and place items. Which metric best measures how efficiently the agent completes its tasks over time?
Think about both speed and correctness of task completion.
Efficiency in task completion involves how fast and how successfully the agent finishes tasks, so combining time and success rate is best.
An autonomous agent in a smart home fails to reach the kitchen reliably. The code snippet below shows the decision logic. What is the most likely cause of failure?
def decide_action(sensor_data): if sensor_data['obstacle'] == True: return 'stop' elif sensor_data['destination'] == 'kitchen': return 'move_forward' else: return 'turn_left'
Consider how the agent reacts to obstacles and if it can continue moving.
The agent stops immediately on detecting any obstacle without trying to navigate around it, causing failure to reach the kitchen.
Consider two agents interacting in a simulation. Agent A shares a message, and Agent B responds based on the message content. What is the output of the following code?
class Agent: def __init__(self, name): self.name = name def send_message(self, other, message): return other.receive_message(message) def receive_message(self, message): if 'help' in message: return f'{self.name} received help request' else: return f'{self.name} received unknown message' agent_a = Agent('A') agent_b = Agent('B') output = agent_a.send_message(agent_b, 'I need help with task') print(output)
Trace which agent receives the message and how it processes it.
Agent A sends a message to Agent B. Agent B checks if 'help' is in the message and responds accordingly.