AIMA - Intelligent Agents


In which we discuss the nature of agents, perfect or otherwise, the diversity of environments, and the resulting menagerie of agent types.

This chapter provides more concrete definitions for what it means to be “intelligent” and for an agent to be “rational”.

Flashcards

How does an agent perceive an environment?


Through sensors.

How does an agent act on its environment?


Through actuators.

What is meant by a “percept”?


The perceptual inputs to an agent at any given moment.

What is meant by the “percept sequence” of an agent?


A history of everything the agent has ever perceived.

What is the one thing that determines an agents action in a given moment?


The percept sequence.

What maps an agent’s percept sequence to an action?


The agent function.

What implements an agent’s agent function?


An agent program.

What does a rational agent do for any possible percept sequence?


Selects an ation that is expected to maximize its performance measure.

What four things determine whether an agent is rational in a given moment?


  1. The performance measure
  2. The prior knowledge of the environment
  3. The actions that it can perform
  4. The agent’s percept sequence

Conceptually speaking, what would be true about a rational agent’s percept sequence-action table?


Every entry would be filled correctly.

What is a performance measure?


A way of evaluating a sequence of states.

Why are performance measures based on environment states rather than agent states?


Because otherwise the agent could convince itself it was doing perfectly.

How should you design performance measures?


According to what one wants in the environment.

Why is rationality based on expected performance rather than actual performance?


Because considering potential actual performance requires omniscience.

Why is information gathering rational?


Because it could modify future percepts in a way that maximises expected performance.

What does it mean for agent to lack autonomy?


It relies on the knowledge of its designer rather than its own percepts.

Since an agent could be rational in different ways depending on the desired outcome, what do you have to specify in order for “rationality” to be meaningful?


A task environment.

What is the acronoym for specifying a task environment?


PEAS

What does PEAS stand for?


  1. The __P__erformance measure
  2. The __E__nvironment
  3. The __A__ctuators
  4. The __S__ensors

What does it mean for an environment to be fully observable?


The agents sensors provide it with the complete state of the environemtn.

When do you consider an environment to be multiagent?


When there’s another entity whose behavior can be described as maximising a performance measure that depends on the agents behavior.

What’s a “stochastic” environment?


One where uncertainty about outcomes is quantified in terms of probabilities.

What’s a “nondeterministic” environment?


One where uncertainty about outcomes in quantified in terms of possible outcomes.

What does it mean for an environment to be “uncertain”?


A partially observable or stochastic environment.

What does it mean for an environment to be “sequential”?


Where the current action could affect all future actions.

What does it mean for an environment to be “dynamic”?


The environment can change while the agent is deliberating.

What does it mean for an environment to be “semidynamic”?


The performance measure can change while the agent is deliberating.

What does it mean for an environment to be “known”?


You know what the outcomes will be for certain actions.

How do table-driven agents work?


They look up the current percept sequence in a table containing the correct action.

What is a simple reflex agent?


An agent that uses condition-action rules to select an action based only on the current percept.

Where do simple reflex agents work best?


In fully observable environments.

What is a model-based reflex agent?


An agent that uses condition-action rules to select an action based on a model of the environment.

What is goal-based agent?


An agent that chooses actions which work towards a certain goal.

What is a utility-based agent?


An agent that chooses actions which maximise expected utility.

If programming a model-based, utility-based agent is enormously complex for difficult environments, how could you still create an intelligent machine?


Build learning machines and teach them.

How do agents know if they are doing well?


They have some internal critic.

What is a problem generator in a learning-based agent?


A component that suggest actions that could lead to informative experiences.

What are the three ways of representing the world state?


  • An atomic representation
  • A factored representation
  • A structured representation

4th Edition

What is Consequentialism?


The theory that suggests an action is good or bad depending on its outcome.

Exercises

Q2.3

  1. False – it can still take actions that it believes will have the best expected outcome in comparison to a performance measure. For example, a solitaire playing AI could still make the best choices that depend on the cards its seen so far and the cards that it thinks are likely to come up soon.
  2. True – driving would be an example. You might argue that you would be able to use a table-based approach for anything and encode all knowledge as a set of rules, but continious inputs would mean that it would have to infinite in size, which is impossible.
  3. True – this would be true for any environment where the performance measure is unaffected by the actions that an agent could take. Maybe. I don’t know.
  4. False – “this agent takes in pieces of paper with programs on them, and outputs whether they loop forever for a given input”.
  5. True – A random walk through a maze in 2D will always find a solution eventually.
  6. True – An example would be where a new performance measure is chosen where optimising the previous one is a consequence of optimising for the new one.
  7. False – An agent with prior knowledge about the environment could use a model to determine what sort of behavior would be optimal.
  8. False – It could just be really unlucky.

Q2.4

Part A

Performing a gymnastics floor routine.

  • Performance Measure: judge responses.
  • Environment: A gym
  • Actuators: Muscles that can be moved, limbs, that sort of thing.
  • Sensors: Eyesight, feeling

Part B

Exploring the subsurface oceans of Titan.

  • Performance Measure: the amount of new information acquired, areas explored…
  • Environment: The subsurface oceans of Titan.
  • Actuators: Motors, fins, boat sort of things (?)
  • Sensors: Scientific instruments, cameras, microphones, scales…

Part C

Playing soccer.

  • Performance Measure: The amount of goals scored.
  • Environment: A football field.
  • Actuators: Legs, muscles, limbs (same thing).
  • Sensors: Eyesight, hearing, accelerometer, feeling

Part D

Shopping for used AI books on the Internet.

  • Performance Measure: Volume of unique books for the lowest price.
  • Environment: The web…
  • Actuators: The ability to make HTTP requests (or mouse, keyboard, etc…)
  • Sensors: Rendering engine for webpages, camera

Part E

Practicing tennis against a wall.

  • Performance Measure: Time gone in a rally.
  • Environment: A court and a wall.
  • Actuators: Arm and bat that can be moved.
  • Sensors: Vision, sound.

Part F

Performing a high jump.

  • Performance Measure: Vertical distance travelled.
  • Environment: A high jump set-up (bar, …)
  • Actuators: Legs (assuming a human-like agent)
  • Sensors: Accelerometer, vision, speedometer.

Part G

Bidding on an item at an auction.

  • Performance Measure: A value that combines the desireability of the item with the price that you’re willing to pay for it.
  • Environment: An auction house.
  • Actuators: Numerical display for showing amount prepared to bid
  • Sensors: Microphone for hearing other bidders, vision for determining what the item is.

Q2.5

  • Agent: An entity that acts in a system.
  • Agent function: A function which takes in a percept sequence and returns an action.
  • Agent program: An implementation of an agent function.
  • Rationality: The process of making the best decisions/taking the actions which you expect to maximise a given performance measure.
  • Autonomy: The ability for an agent to respond to novel stimuli and learn on its own.
  • Reflex agent: An agent which uses a series of condition-action rules in order to determine what to do.
  • Model-based agent: An agent that deals with partial observability by creating an internal model of the environment.
  • Goal-based agent: An agent which picks actions that it expects to work towards a given goal.
  • Utiltiy-based agent: An agent which picks actions that maximize expected utility.
  • Learning agent: An agent which improves its own decision making by tweaking its components in a way that means it’s better at optimising for a given performance measure.

Q2.6

Part A

Yes; If an agent function required a search through a graph then the same function could be implemented using a depth-first or breadth-first search.

Part B

Yes; “This agent function determines if the program entered halts or not”.

Part C

Yes; Even for a learning agent which tweaks its own internal components, the overall agent function is the one that maps a percept sequence to an action. For any given agent program, this will be consistent.

Part D

\[2^N\]

Part E

No.

Q2.7

Goal-Based Agent

def goal_based_agent(percept):
	state = state.update(percept) # state itself contains the goals, actions and model.
	actions = state.possible_actions()
	actions.sort(key=lamba x: goal_achivement(x))
	return actions[0]

Utility-Based Agent

Skipped

Q2.8

The thermostat is just a simple reflex-based agent since its behavior can be described as a set of conditions and actions pairs. The knowledge that it takes some time to heat up or cool down is not present in the agent itself as some internal model of the furnace, but is instead placed there by the designer.

Q2.9

Skipped

Q2.10

Part A

No, because the agent needs to remember if it’s already looked at a certain square.

Part B

Yes… skipped.

Part C

A will change since a set of rules can be used to make it move to all the squares with dirt and clean them. B will not change, since it was possible already.

Q2.11

Part A

No, because it could end up taking a non-optimal route through all the different squares.

Part B

Yes, it could in some cases.

Part C

Skipped

Part D

Yes it could, by keeping track of the squares it’s already been to.

Q2.12

Part A

No, it could still take a non-optimal route.

Part B

Yes, in some cases. There’s always the chance that it takes the optimal route.

Part C

Skipped

Part D

Yes it could, again by keeping track of the squares it’s already been to.

Q2.13

Part A

It could check multiple times, though maybe the rational thing to do would just be to leave it be since the chance is only 10% and you’d be better off using each time-step to try and clean a new square rather than make sure a new one is clean.

Part B

It could find the boundaries on the environment and then move through in an ordered way forever in order to check every square over and over again.




Related posts