Docsity

Artificial Intelligence: Agents and Environments - University of San Francisco - Prof. Chr, Study notes of Computer Science

Partial preview of the text

Download Artificial Intelligence: Agents and Environments - University of San Francisco - Prof. Chr and more Study notes Computer Science in PDF only on Docsity!

Artificial Intelligence Programming^ Agents and Environments

Chris BrooksDepartment of Computer ScienceUniversity of San Francisco

Department of Computer Science — University of San Francisco – p. 1/

3-2:^ Overview^ •^ What makes an agent?^ •^ Defining an environment^ •^ Types of agent programs

Department of Computer Science — University of San Francisco – p. 2/

3-4:^ Intelligent Agents^ •^ The idea of developing

intelligent agents

has been a unifying

one for AI.^ ◦^ Previously, subdisciplines were fairly balkanized.^ ◦^ Learning, knowledge representation, search, vision, etc. • Agent programs that may require several of these abilities.

Department of Computer Science — University of San Francisco – p. 4/

3-5:^ What is an agent?^ •^ There are lots of potential definitions ...^ •^ R & N: An agent is anything that can be viewed as perceivingits environment through sensors and acting on thatenvironment through actuators.^ •^ Woolridge: An agent is a computer system that is

situated in an

environment

and is capable of

autonomous action

. Department of Computer Science — University of San Francisco – p. 5/

3-7:^ Autonomy^ •^ Autonomy is a quality often attributed to agents.^ •^ An autonomous agent is able to rely on its percepts and pastexperience to make decisions, rather than asking a human forhelp.^ •^ This is a thorny area - most agents will not have completeautonomy.^ ◦^ When might we not want an agent to have completeautonomy?^ •^ Challenge: Designing an agent that can reason about its ownautonomy and know when to ask for help.

Department of Computer Science — University of San Francisco – p. 7/

3-8:^ Agent-oriented Programming^ •^ We can also think of agents as a programming paradigm.^ ◦^ The next logical step after objects.^ ◦^ “Objects do it for free, agents do it for money.”^ •^ Objects are

receivers^ of actions, agents are actors.

-^ It’s less useful to think of agent as an

objective^ label than as a

subjective^ description. • Agency is a useful abstraction for us as programmers.^ ◦^ Allows us to think about a program at a higher level. • Treat something as an agent if that helps to understand,predict, or explain its behavior.^ ◦^ Thermostats as agents

Department of Computer Science — University of San Francisco – p. 8/

3-10:^ Agents and Environments^ Agent^ Sensors^ Actuators

Percepts^ Environment Actions ?

-^ One shift from other courses: we’llthink explicitly about an agent’s^ environment^

and how that affectsexecution.

-^ Percepts: Information delivered to anagent’s sensors. (light, sound, EMwaves, signals) •^ Sensors: An agent’s mechanisms forgathering data about its environment.(eyes, ears, photoelectric cells, ...) •^ Actuators: An agent’s mechanisms foraffecting its environment. (Wheels,arms, radios, lights, etc) •^ Actions: Actual changes to the environ-ment. (running, rolling)^ Department of Computer Science — University of San Francisco – p. 10/

3-11:^ Agent Programs^ •^ We can describe our agent’s behavior as a function F:^ •^ Action = F(current-percept, percept-history).^ •^ Maps a percept sequence to an action.^ •^ Actually implementing this function is the work of an

agent

program.^ ◦^ That’s what we’ll spend most of our time on.

Department of Computer Science — University of San Francisco – p. 11/

3-13:^ Example: Vacuum-cleaner World^ •^ Let’s start with a very simple approximation.^ •^ Two rooms, A and B. Each room can be either clean or dirty.^ •^ This is the agent’s

environment

A^

B

-^ Sensors: Dirt sensor,location. •^ Actuators: Vacuum, wheels. •^ Percepts: Clean, Dirty •^ Actions:^

Move^ left,^

move right, suck, do nothing.^ Department of Computer Science — University of San Francisco – p. 13/

3-14:^ Example: Vacuum-cleaner World^ •^ In this simple world, we could list all the possible perceptsequences and associated actions.^ •^ This is known as a table-based or lookup agent.^ •^ Question: How do we fill in the best action for each perceptsequence?^ •^ Great for simple worlds, but doesn’t scale.^ •^ We need a more compact representation for this table.

Department of Computer Science — University of San Francisco – p. 14/

3-16:^ Rationality^ •^ Notice that this is a specification of an

outcome , rather than

how an agent should behave. • A rational action is one that tries to maximize an agent’sperformance measure, given its percepts and actions. • R & N: Rational agents: For each possible percept sequence, arational agent should select an action that is expected tomaximize its performance measure, given the evidenceprovided by the percept sequence and whatever built-inknowledge the agent has.

Department of Computer Science — University of San Francisco – p. 16/

3-17:^ Rationality^ •^ “expected” vs. actual. We don’t require that our agent be ableto predict the future, or predict unlikely events.^ •^ Information gathering might also be a rational action.^ ◦^ Crossing the street without looking is irrational^ •^ Rational agents must be able to

learn^ (except in very simple, well-understood environments).^ ◦^ Learning is defined as improving an agent’s performance.^ ◦^ This could mean reducing uncertainty, or takingobservations into account.

Department of Computer Science — University of San Francisco – p. 17/

3-19:^ Environments^ •^ A criterion for being an agent is existing in an environment.^ •^ Not necessarily physical - could be a software environment.^ •^ R & N refer to the

task environment

-^ Consists of:^ ◦^ Performance measure^ ◦^ Environment^ ◦^ Actuators available to the agent^ ◦^ Sensors available to the agent

Department of Computer Science — University of San Francisco – p. 19/

3-20:^ Characteristics of the Environment^ •^ Observability^ •^ Deterministic/stochastic^ •^ Episodic vs sequential^ •^ Static vs Dynamic^ •^ Discrete vs continuous^ •^ Single-agent vs multi-agent

Department of Computer Science — University of San Francisco – p. 20/