announcements - university of california, berkeleycs188/sp20/assets/lecture/lec-2.pdf ·...

188
Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm.

Upload: others

Post on 18-Oct-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Announcements

Project 0: Python Tutorial.Due on Monday 1/27. 11:59 pm.

Homework 0: Math Diagnostic.Due on Wednesday 1/29. 11:59 pm.

Project 1: Search.Out: longer than average. Get started.Due Friday. 2/7. 11:59 pm.

Sections.Start next week!

Office Hours: still working on rooms.Department/university issues still being dealt with.

Check: signed up for Piazza and Gradescope?

Pinned Post: AI in the news!

Page 2: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Announcements

Project 0: Python Tutorial.Due on Monday 1/27. 11:59 pm.

Homework 0: Math Diagnostic.Due on Wednesday 1/29. 11:59 pm.

Project 1: Search.Out: longer than average. Get started.Due Friday. 2/7. 11:59 pm.

Sections.Start next week!

Office Hours: still working on rooms.Department/university issues still being dealt with.

Check: signed up for Piazza and Gradescope?

Pinned Post: AI in the news!

Page 3: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Announcements

Project 0: Python Tutorial.Due on Monday 1/27. 11:59 pm.

Homework 0: Math Diagnostic.Due on Wednesday 1/29. 11:59 pm.

Project 1: Search.Out: longer than average. Get started.Due Friday. 2/7. 11:59 pm.

Sections.Start next week!

Office Hours: still working on rooms.Department/university issues still being dealt with.

Check: signed up for Piazza and Gradescope?

Pinned Post: AI in the news!

Page 4: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Announcements

Project 0: Python Tutorial.Due on Monday 1/27. 11:59 pm.

Homework 0: Math Diagnostic.Due on Wednesday 1/29. 11:59 pm.

Project 1: Search.Out: longer than average. Get started.Due Friday. 2/7. 11:59 pm.

Sections.Start next week!

Office Hours: still working on rooms.Department/university issues still being dealt with.

Check: signed up for Piazza and Gradescope?

Pinned Post: AI in the news!

Page 5: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Announcements

Project 0: Python Tutorial.Due on Monday 1/27. 11:59 pm.

Homework 0: Math Diagnostic.Due on Wednesday 1/29. 11:59 pm.

Project 1: Search.Out: longer than average. Get started.Due Friday. 2/7. 11:59 pm.

Sections.Start next week!

Office Hours: still working on rooms.Department/university issues still being dealt with.

Check: signed up for Piazza and Gradescope?

Pinned Post: AI in the news!

Page 6: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Announcements

Project 0: Python Tutorial.Due on Monday 1/27. 11:59 pm.

Homework 0: Math Diagnostic.Due on Wednesday 1/29. 11:59 pm.

Project 1: Search.Out: longer than average. Get started.Due Friday. 2/7. 11:59 pm.

Sections.Start next week!

Office Hours: still working on rooms.Department/university issues still being dealt with.

Check: signed up for Piazza and Gradescope?

Pinned Post: AI in the news!

Page 7: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Announcements

Project 0: Python Tutorial.Due on Monday 1/27. 11:59 pm.

Homework 0: Math Diagnostic.Due on Wednesday 1/29. 11:59 pm.

Project 1: Search.Out: longer than average. Get started.Due Friday. 2/7. 11:59 pm.

Sections.Start next week!

Office Hours: still working on rooms.Department/university issues still being dealt with.

Check: signed up for Piazza and Gradescope?

Pinned Post: AI in the news!

Page 8: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Lecture Attendance Link

Lecture Attendence Link: http://bit.ly/2GEMokS

Page 9: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

CS 188: Artificial Intelligence

Search.

Page 10: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Today.

Agents that Plan Ahead

Search Problems.Model world with state space.Setting up state spaces.

Maybe today.

Uninformed Search Methods:

Depth-First Search

Breadth-First Search

Uniform-Cost Search

Page 11: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Today.

Agents that Plan Ahead

Search Problems.

Model world with state space.Setting up state spaces.

Maybe today.

Uninformed Search Methods:

Depth-First Search

Breadth-First Search

Uniform-Cost Search

Page 12: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Today.

Agents that Plan Ahead

Search Problems.Model world with state space.

Setting up state spaces.

Maybe today.

Uninformed Search Methods:

Depth-First Search

Breadth-First Search

Uniform-Cost Search

Page 13: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Today.

Agents that Plan Ahead

Search Problems.Model world with state space.Setting up state spaces.

Maybe today.

Uninformed Search Methods:

Depth-First Search

Breadth-First Search

Uniform-Cost Search

Page 14: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Today.

Agents that Plan Ahead

Search Problems.Model world with state space.Setting up state spaces.

Maybe today.

Uninformed Search Methods:

Depth-First Search

Breadth-First Search

Uniform-Cost Search

Page 15: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Today.

Agents that Plan Ahead

Search Problems.Model world with state space.Setting up state spaces.

Maybe today.

Uninformed Search Methods:

Depth-First Search

Breadth-First Search

Uniform-Cost Search

Page 16: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Today.

Agents that Plan Ahead

Search Problems.Model world with state space.Setting up state spaces.

Maybe today.

Uninformed Search Methods:

Depth-First Search

Breadth-First Search

Uniform-Cost Search

Page 17: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Today.

Agents that Plan Ahead

Search Problems.Model world with state space.Setting up state spaces.

Maybe today.

Uninformed Search Methods:

Depth-First Search

Breadth-First Search

Uniform-Cost Search

Page 18: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Today.

Agents that Plan Ahead

Search Problems.Model world with state space.Setting up state spaces.

Maybe today.

Uninformed Search Methods:

Depth-First Search

Breadth-First Search

Uniform-Cost Search

Page 19: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Frame of AI

Environm

ent

Sensor

Actuator

Agent?

Percepts

Actions

An agent percieves its environment with sensors and acts onenvironment using actuators.

Car:Sensors: camera, lidar, speed gauge, ..Actuators: gas petal, , steering wheel, brake petal, ...

Website, Program, ...

Input/Output: Outputs affect environment, which affects input , whichoutputs, . . .

Page 20: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Frame of AI

Environm

ent

Sensor

Actuator

Agent?

Percepts

Actions

An agent percieves its environment with sensors and acts onenvironment using actuators.

Car:Sensors:

camera, lidar, speed gauge, ..Actuators: gas petal, , steering wheel, brake petal, ...

Website, Program, ...

Input/Output: Outputs affect environment, which affects input , whichoutputs, . . .

Page 21: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Frame of AI

Environm

ent

Sensor

Actuator

Agent?

Percepts

Actions

An agent percieves its environment with sensors and acts onenvironment using actuators.

Car:Sensors: camera,

lidar, speed gauge, ..Actuators: gas petal, , steering wheel, brake petal, ...

Website, Program, ...

Input/Output: Outputs affect environment, which affects input , whichoutputs, . . .

Page 22: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Frame of AI

Environm

ent

Sensor

Actuator

Agent?

Percepts

Actions

An agent percieves its environment with sensors and acts onenvironment using actuators.

Car:Sensors: camera, lidar,

speed gauge, ..Actuators: gas petal, , steering wheel, brake petal, ...

Website, Program, ...

Input/Output: Outputs affect environment, which affects input , whichoutputs, . . .

Page 23: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Frame of AI

Environm

ent

Sensor

Actuator

Agent?

Percepts

Actions

An agent percieves its environment with sensors and acts onenvironment using actuators.

Car:Sensors: camera, lidar, speed gauge,

..Actuators: gas petal, , steering wheel, brake petal, ...

Website, Program, ...

Input/Output: Outputs affect environment, which affects input , whichoutputs, . . .

Page 24: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Frame of AI

Environm

ent

Sensor

Actuator

Agent?

Percepts

Actions

An agent percieves its environment with sensors and acts onenvironment using actuators.

Car:Sensors: camera, lidar, speed gauge, ..Actuators:

gas petal, , steering wheel, brake petal, ...

Website, Program, ...

Input/Output: Outputs affect environment, which affects input , whichoutputs, . . .

Page 25: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Frame of AI

Environm

ent

Sensor

Actuator

Agent?

Percepts

Actions

An agent percieves its environment with sensors and acts onenvironment using actuators.

Car:Sensors: camera, lidar, speed gauge, ..Actuators: gas petal,

, steering wheel, brake petal, ...

Website, Program, ...

Input/Output: Outputs affect environment, which affects input , whichoutputs, . . .

Page 26: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Frame of AI

Environm

ent

Sensor

Actuator

Agent?

Percepts

Actions

An agent percieves its environment with sensors and acts onenvironment using actuators.

Car:Sensors: camera, lidar, speed gauge, ..Actuators: gas petal, , steering wheel, brake petal,

...

Website, Program, ...

Input/Output: Outputs affect environment, which affects input , whichoutputs, . . .

Page 27: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Frame of AI

Environm

ent

Sensor

Actuator

Agent?

Percepts

Actions

An agent percieves its environment with sensors and acts onenvironment using actuators.

Car:Sensors: camera, lidar, speed gauge, ..Actuators: gas petal, , steering wheel, brake petal, ...

Website, Program, ...

Input/Output: Outputs affect environment, which affects input , whichoutputs, . . .

Page 28: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Frame of AI

Environm

ent

Sensor

Actuator

Agent?

Percepts

Actions

An agent percieves its environment with sensors and acts onenvironment using actuators.

Car:Sensors: camera, lidar, speed gauge, ..Actuators: gas petal, , steering wheel, brake petal, ...

Website,

Program, ...

Input/Output: Outputs affect environment, which affects input , whichoutputs, . . .

Page 29: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Frame of AI

Environm

ent

Sensor

Actuator

Agent?

Percepts

Actions

An agent percieves its environment with sensors and acts onenvironment using actuators.

Car:Sensors: camera, lidar, speed gauge, ..Actuators: gas petal, , steering wheel, brake petal, ...

Website, Program,

...

Input/Output: Outputs affect environment, which affects input , whichoutputs, . . .

Page 30: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Frame of AI

Environm

ent

Sensor

Actuator

Agent?

Percepts

Actions

An agent percieves its environment with sensors and acts onenvironment using actuators.

Car:Sensors: camera, lidar, speed gauge, ..Actuators: gas petal, , steering wheel, brake petal, ...

Website, Program, ...

Input/Output: Outputs affect environment, which affects input , whichoutputs, . . .

Page 31: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Frame of AI

Environm

ent

Sensor

Actuator

Agent?

Percepts

Actions

An agent percieves its environment with sensors and acts onenvironment using actuators.

Car:Sensors: camera, lidar, speed gauge, ..Actuators: gas petal, , steering wheel, brake petal, ...

Website, Program, ...

Input/Output:

Outputs affect environment, which affects input , whichoutputs, . . .

Page 32: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Frame of AI

Environm

ent

Sensor

Actuator

Agent?

Percepts

Actions

An agent percieves its environment with sensors and acts onenvironment using actuators.

Car:Sensors: camera, lidar, speed gauge, ..Actuators: gas petal, , steering wheel, brake petal, ...

Website, Program, ...

Input/Output: Outputs affect environment, which affects input

, whichoutputs, . . .

Page 33: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Frame of AI

Environm

ent

Sensor

Actuator

Agent?

Percepts

Actions

An agent percieves its environment with sensors and acts onenvironment using actuators.

Car:Sensors: camera, lidar, speed gauge, ..Actuators: gas petal, , steering wheel, brake petal, ...

Website, Program, ...

Input/Output: Outputs affect environment, which affects input , whichoutputs,

. . .

Page 34: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Frame of AI

Environm

ent

Sensor

Actuator

Agent?

Percepts

Actions

An agent percieves its environment with sensors and acts onenvironment using actuators.

Car:Sensors: camera, lidar, speed gauge, ..Actuators: gas petal, , steering wheel, brake petal, ...

Website, Program, ...

Input/Output: Outputs affect environment, which affects input , whichoutputs, . . .

Page 35: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Rationality

A rational agent chooses actions that maximize expected utility.

Today: agents that have a goal, and a cost.E.g., reach goal with lowest cost.

Later: agents have numerical utilities, rewards, etc.E.g., takes action that maximizes total reward over time.

(Reward: largest total profit. or expected total profit.)

Page 36: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Rationality

A rational agent chooses actions that maximize expected utility.

Today: agents that have a goal, and a cost.E.g., reach goal with lowest cost.

Later: agents have numerical utilities, rewards, etc.E.g., takes action that maximizes total reward over time.

(Reward: largest total profit. or expected total profit.)

Page 37: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Rationality

A rational agent chooses actions that maximize expected utility.

Today: agents that have a goal, and a cost.E.g., reach goal with lowest cost.

Later: agents have numerical utilities, rewards, etc.E.g., takes action that maximizes total reward over time.

(Reward: largest total profit. or expected total profit.)

Page 38: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Agent Design

The environment largely determines the agent design.

Fully/partialy observable→ agent request memory (internal state)

Discrete/ continuous→ agent can/can’t enumerate all states

Stochastic/deterministic→ agent deals with contingencies

Single-agent/multi-agent→ agent may need to behave randomly.

Page 39: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Agent Design

The environment largely determines the agent design.

Fully/partialy observable→ agent request memory (internal state)

Discrete/ continuous→ agent can/can’t enumerate all states

Stochastic/deterministic→ agent deals with contingencies

Single-agent/multi-agent→ agent may need to behave randomly.

Page 40: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Agent Design

The environment largely determines the agent design.

Fully/partialy observable→ agent request memory (internal state)

Discrete/ continuous→ agent can/can’t enumerate all states

Stochastic/deterministic→ agent deals with contingencies

Single-agent/multi-agent→ agent may need to behave randomly.

Page 41: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Agent Design

The environment largely determines the agent design.

Fully/partialy observable→ agent request memory (internal state)

Discrete/ continuous→ agent can/can’t enumerate all states

Stochastic/deterministic→ agent deals with contingencies

Single-agent/multi-agent→ agent may need to behave randomly.

Page 42: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Agent Design

The environment largely determines the agent design.

Fully/partialy observable→ agent request memory (internal state)

Discrete/ continuous→ agent can/can’t enumerate all states

Stochastic/deterministic→ agent deals with contingencies

Single-agent/multi-agent→ agent may need to behave randomly.

Page 43: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Agents that Plan

Page 44: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Reflex Agents

Reflex agents:

I Choose action based on current percept(and maybe memory)

I May have memory or a model of the world’scurrent state

I Do not consider the future consequences oftheir actions.

I Consider how the world IS.

Can a reflex agent be rational?Examples:

Stove: hot, ouch!Car: deer, brake!Go to Tahoe: skid in snow, ???

[Demo: reflex (L2D1 and L2D2)]

Page 45: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Reflex Agents

Reflex agents:

I Choose action based on current percept(and maybe memory)

I May have memory or a model of the world’scurrent state

I Do not consider the future consequences oftheir actions.

I Consider how the world IS.

Can a reflex agent be rational?Examples:

Stove: hot, ouch!Car: deer, brake!Go to Tahoe: skid in snow, ???

[Demo: reflex (L2D1 and L2D2)]

Page 46: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Reflex Agents

Reflex agents:

I Choose action based on current percept(and maybe memory)

I May have memory or a model of the world’scurrent state

I Do not consider the future consequences oftheir actions.

I Consider how the world IS.

Can a reflex agent be rational?Examples:

Stove: hot, ouch!Car: deer, brake!Go to Tahoe: skid in snow, ???

[Demo: reflex (L2D1 and L2D2)]

Page 47: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Reflex Agents

Reflex agents:

I Choose action based on current percept(and maybe memory)

I May have memory or a model of the world’scurrent state

I Do not consider the future consequences oftheir actions.

I Consider how the world IS.

Can a reflex agent be rational?Examples:

Stove: hot, ouch!Car: deer, brake!Go to Tahoe: skid in snow, ???

[Demo: reflex (L2D1 and L2D2)]

Page 48: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Reflex Agents

Reflex agents:

I Choose action based on current percept(and maybe memory)

I May have memory or a model of the world’scurrent state

I Do not consider the future consequences oftheir actions.

I Consider how the world IS.

Can a reflex agent be rational?Examples:

Stove: hot, ouch!Car: deer, brake!Go to Tahoe: skid in snow, ???

[Demo: reflex (L2D1 and L2D2)]

Page 49: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Reflex Agents

Reflex agents:

I Choose action based on current percept(and maybe memory)

I May have memory or a model of the world’scurrent state

I Do not consider the future consequences oftheir actions.

I Consider how the world IS.

Can a reflex agent be rational?

Examples:Stove: hot, ouch!Car: deer, brake!Go to Tahoe: skid in snow, ???

[Demo: reflex (L2D1 and L2D2)]

Page 50: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Reflex Agents

Reflex agents:

I Choose action based on current percept(and maybe memory)

I May have memory or a model of the world’scurrent state

I Do not consider the future consequences oftheir actions.

I Consider how the world IS.

Can a reflex agent be rational?Examples:

Stove: hot, ouch!Car: deer, brake!Go to Tahoe: skid in snow, ???

[Demo: reflex (L2D1 and L2D2)]

Page 51: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Reflex Agents

Reflex agents:

I Choose action based on current percept(and maybe memory)

I May have memory or a model of the world’scurrent state

I Do not consider the future consequences oftheir actions.

I Consider how the world IS.

Can a reflex agent be rational?Examples:

Stove:

hot, ouch!Car: deer, brake!Go to Tahoe: skid in snow, ???

[Demo: reflex (L2D1 and L2D2)]

Page 52: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Reflex Agents

Reflex agents:

I Choose action based on current percept(and maybe memory)

I May have memory or a model of the world’scurrent state

I Do not consider the future consequences oftheir actions.

I Consider how the world IS.

Can a reflex agent be rational?Examples:

Stove: hot,

ouch!Car: deer, brake!Go to Tahoe: skid in snow, ???

[Demo: reflex (L2D1 and L2D2)]

Page 53: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Reflex Agents

Reflex agents:

I Choose action based on current percept(and maybe memory)

I May have memory or a model of the world’scurrent state

I Do not consider the future consequences oftheir actions.

I Consider how the world IS.

Can a reflex agent be rational?Examples:

Stove: hot, ouch!

Car: deer, brake!Go to Tahoe: skid in snow, ???

[Demo: reflex (L2D1 and L2D2)]

Page 54: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Reflex Agents

Reflex agents:

I Choose action based on current percept(and maybe memory)

I May have memory or a model of the world’scurrent state

I Do not consider the future consequences oftheir actions.

I Consider how the world IS.

Can a reflex agent be rational?Examples:

Stove: hot, ouch!Car:

deer, brake!Go to Tahoe: skid in snow, ???

[Demo: reflex (L2D1 and L2D2)]

Page 55: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Reflex Agents

Reflex agents:

I Choose action based on current percept(and maybe memory)

I May have memory or a model of the world’scurrent state

I Do not consider the future consequences oftheir actions.

I Consider how the world IS.

Can a reflex agent be rational?Examples:

Stove: hot, ouch!Car: deer,

brake!Go to Tahoe: skid in snow, ???

[Demo: reflex (L2D1 and L2D2)]

Page 56: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Reflex Agents

Reflex agents:

I Choose action based on current percept(and maybe memory)

I May have memory or a model of the world’scurrent state

I Do not consider the future consequences oftheir actions.

I Consider how the world IS.

Can a reflex agent be rational?Examples:

Stove: hot, ouch!Car: deer, brake!

Go to Tahoe: skid in snow, ???

[Demo: reflex (L2D1 and L2D2)]

Page 57: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Reflex Agents

Reflex agents:

I Choose action based on current percept(and maybe memory)

I May have memory or a model of the world’scurrent state

I Do not consider the future consequences oftheir actions.

I Consider how the world IS.

Can a reflex agent be rational?Examples:

Stove: hot, ouch!Car: deer, brake!Go to Tahoe:

skid in snow, ???

[Demo: reflex (L2D1 and L2D2)]

Page 58: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Reflex Agents

Reflex agents:

I Choose action based on current percept(and maybe memory)

I May have memory or a model of the world’scurrent state

I Do not consider the future consequences oftheir actions.

I Consider how the world IS.

Can a reflex agent be rational?Examples:

Stove: hot, ouch!Car: deer, brake!Go to Tahoe: skid in snow,

???

[Demo: reflex (L2D1 and L2D2)]

Page 59: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Reflex Agents

Reflex agents:

I Choose action based on current percept(and maybe memory)

I May have memory or a model of the world’scurrent state

I Do not consider the future consequences oftheir actions.

I Consider how the world IS.

Can a reflex agent be rational?Examples:

Stove: hot, ouch!Car: deer, brake!Go to Tahoe: skid in snow, ???

[Demo: reflex (L2D1 and L2D2)]

Page 60: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Reflex Agents

Reflex agents:

I Choose action based on current percept(and maybe memory)

I May have memory or a model of the world’scurrent state

I Do not consider the future consequences oftheir actions.

I Consider how the world IS.

Can a reflex agent be rational?Examples:

Stove: hot, ouch!Car: deer, brake!Go to Tahoe: skid in snow, ???

[Demo: reflex (L2D1 and L2D2)]

Page 61: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Reflex Agents

Reflex agents:

I Choose action based on current percept(and maybe memory)

I May have memory or a model of the world’scurrent state

I Do not consider the future consequences oftheir actions.

I Consider how the world IS.

Can a reflex agent be rational?Examples:

Stove: hot, ouch!Car: deer, brake!Go to Tahoe: skid in snow, ???

[Demo: reflex (L2D1 and L2D2)]

Page 62: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Video of Demo Reflex Optimal

Page 63: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Video of Demo Reflex Odd

Page 64: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Planning Agents

Planning agents:

Ask “what if?”Decisions based on (hypothesized)

consequences of actions.Must have a model of how the world

evolves in response to actions.Must formulate a goal (test).Consider how the world WOULD BE.

Optimal or not optimal.Complete or not.Planning vs. replanning

[Demo: nearest dot re-planning (L2D3),mastermind (L2D4)]

Page 65: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Planning Agents

Planning agents:

Ask “what if?”

Decisions based on (hypothesized)consequences of actions.

Must have a model of how the worldevolves in response to actions.

Must formulate a goal (test).Consider how the world WOULD BE.

Optimal or not optimal.Complete or not.Planning vs. replanning

[Demo: nearest dot re-planning (L2D3),mastermind (L2D4)]

Page 66: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Planning Agents

Planning agents:

Ask “what if?”Decisions based on (hypothesized)

consequences of actions.

Must have a model of how the worldevolves in response to actions.

Must formulate a goal (test).Consider how the world WOULD BE.

Optimal or not optimal.Complete or not.Planning vs. replanning

[Demo: nearest dot re-planning (L2D3),mastermind (L2D4)]

Page 67: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Planning Agents

Planning agents:

Ask “what if?”Decisions based on (hypothesized)

consequences of actions.Must have a model of how the world

evolves in response to actions.

Must formulate a goal (test).Consider how the world WOULD BE.

Optimal or not optimal.Complete or not.Planning vs. replanning

[Demo: nearest dot re-planning (L2D3),mastermind (L2D4)]

Page 68: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Planning Agents

Planning agents:

Ask “what if?”Decisions based on (hypothesized)

consequences of actions.Must have a model of how the world

evolves in response to actions.Must formulate a goal (test).

Consider how the world WOULD BE.

Optimal or not optimal.Complete or not.Planning vs. replanning

[Demo: nearest dot re-planning (L2D3),mastermind (L2D4)]

Page 69: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Planning Agents

Planning agents:

Ask “what if?”Decisions based on (hypothesized)

consequences of actions.Must have a model of how the world

evolves in response to actions.Must formulate a goal (test).Consider how the world WOULD BE.

Optimal or not optimal.Complete or not.Planning vs. replanning

[Demo: nearest dot re-planning (L2D3),mastermind (L2D4)]

Page 70: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Planning Agents

Planning agents:

Ask “what if?”Decisions based on (hypothesized)

consequences of actions.Must have a model of how the world

evolves in response to actions.Must formulate a goal (test).Consider how the world WOULD BE.

Optimal or not optimal.Complete or not.Planning vs. replanning

[Demo: nearest dot re-planning (L2D3),mastermind (L2D4)]

Page 71: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Planning Agents

Planning agents:

Ask “what if?”Decisions based on (hypothesized)

consequences of actions.Must have a model of how the world

evolves in response to actions.Must formulate a goal (test).Consider how the world WOULD BE.

Optimal or not optimal.

Complete or not.Planning vs. replanning

[Demo: nearest dot re-planning (L2D3),mastermind (L2D4)]

Page 72: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Planning Agents

Planning agents:

Ask “what if?”Decisions based on (hypothesized)

consequences of actions.Must have a model of how the world

evolves in response to actions.Must formulate a goal (test).Consider how the world WOULD BE.

Optimal or not optimal.Complete or not.

Planning vs. replanning

[Demo: nearest dot re-planning (L2D3),mastermind (L2D4)]

Page 73: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Planning Agents

Planning agents:

Ask “what if?”Decisions based on (hypothesized)

consequences of actions.Must have a model of how the world

evolves in response to actions.Must formulate a goal (test).Consider how the world WOULD BE.

Optimal or not optimal.Complete or not.Planning vs. replanning

[Demo: nearest dot re-planning (L2D3),mastermind (L2D4)]

Page 74: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Planning Agents

Planning agents:

Ask “what if?”Decisions based on (hypothesized)

consequences of actions.Must have a model of how the world

evolves in response to actions.Must formulate a goal (test).Consider how the world WOULD BE.

Optimal or not optimal.Complete or not.Planning vs. replanning

[Demo: nearest dot re-planning (L2D3),mastermind (L2D4)]

Page 75: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Video of Demo

Replanning

Page 76: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Video of Demo Mastermind

Page 77: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Search Problems

Page 78: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Search Problems

A search problem consists of:

A state space

A successor function(with actions, costs)

“E”

“N”

A start state and a goal test

A solution is a sequence of actions (a plan) which transforms the startstate to a goal state

Page 79: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Search Problems

A search problem consists of:

A state space

A successor function(with actions, costs)

“E”

“N”

A start state and a goal test

A solution is a sequence of actions (a plan) which transforms the startstate to a goal state

Page 80: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Search Problems

A search problem consists of:

A state space

A successor function(with actions, costs)

“E”

“N”

A start state and a goal test

A solution is a sequence of actions (a plan) which transforms the startstate to a goal state

Page 81: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Search Problems

A search problem consists of:

A state space

A successor function(with actions, costs)

“E”

“N”

A start state and a goal test

A solution is a sequence of actions (a plan) which transforms the startstate to a goal state

Page 82: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Search Problems

A search problem consists of:

A state space

A successor function(with actions, costs)

“E”

“N”

A start state and a goal test

A solution is a sequence of actions (a plan) which transforms the startstate to a goal state

Page 83: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Search Problems

A search problem consists of:

A state space

A successor function(with actions, costs)

“E”

“N”

A start state and a goal test

A solution is a sequence of actions (a plan) which transforms the startstate to a goal state

Page 84: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Search Problems

A search problem consists of:

A state space

A successor function(with actions, costs)

“E”

“N”

A start state and a goal test

A solution is a sequence of actions (a plan) which transforms the startstate to a goal state

Page 85: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Search Problems Are Models

Page 86: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Example: Traveling in Romania

State space:

Cities

Successor function:Roads: Neighboring city with

cost = distance

Start state:Arad

Goal test:Is state == Bucharest?

Solution?

Page 87: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Example: Traveling in Romania

State space:Cities

Successor function:Roads: Neighboring city with

cost = distance

Start state:Arad

Goal test:Is state == Bucharest?

Solution?

Page 88: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Example: Traveling in Romania

State space:Cities

Successor function:

Roads: Neighboring city withcost = distance

Start state:Arad

Goal test:Is state == Bucharest?

Solution?

Page 89: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Example: Traveling in Romania

State space:Cities

Successor function:Roads: Neighboring city with

cost = distance

Start state:Arad

Goal test:Is state == Bucharest?

Solution?

Page 90: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Example: Traveling in Romania

State space:Cities

Successor function:Roads: Neighboring city with

cost = distance

Start state:

Arad

Goal test:Is state == Bucharest?

Solution?

Page 91: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Example: Traveling in Romania

State space:Cities

Successor function:Roads: Neighboring city with

cost = distance

Start state:Arad

Goal test:Is state == Bucharest?

Solution?

Page 92: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Example: Traveling in Romania

State space:Cities

Successor function:Roads: Neighboring city with

cost = distance

Start state:Arad

Goal test:

Is state == Bucharest?Solution?

Page 93: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Example: Traveling in Romania

State space:Cities

Successor function:Roads: Neighboring city with

cost = distance

Start state:Arad

Goal test:Is state == Bucharest?

Solution?

Page 94: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Example: Traveling in Romania

State space:Cities

Successor function:Roads: Neighboring city with

cost = distance

Start state:Arad

Goal test:Is state == Bucharest?

Solution?

Page 95: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States: (x ,y) locationActions: NSEWSuccessor: update location onlyGoal test: is (x ,y) =END?

Problem: Eat-All-Dots

States: {(x ,y), dot booleans}Actions: NSEWSuccessor: update location and

possibly a dot booleanGoal test: dots all false

Page 96: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States: (x ,y) locationActions: NSEWSuccessor: update location onlyGoal test: is (x ,y) =END?

Problem: Eat-All-Dots

States: {(x ,y), dot booleans}Actions: NSEWSuccessor: update location and

possibly a dot booleanGoal test: dots all false

Page 97: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States: (x ,y) locationActions: NSEWSuccessor: update location onlyGoal test: is (x ,y) =END?

Problem: Eat-All-Dots

States: {(x ,y), dot booleans}Actions: NSEWSuccessor: update location and

possibly a dot booleanGoal test: dots all false

Page 98: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States: (x ,y) locationActions: NSEWSuccessor: update location onlyGoal test: is (x ,y) =END?

Problem: Eat-All-Dots

States: {(x ,y), dot booleans}Actions: NSEWSuccessor: update location and

possibly a dot booleanGoal test: dots all false

Page 99: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States: (x ,y) locationActions: NSEWSuccessor: update location onlyGoal test: is (x ,y) =END?

Problem: Eat-All-Dots

States: {(x ,y), dot booleans}Actions: NSEWSuccessor: update location and

possibly a dot booleanGoal test: dots all false

Page 100: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States:

(x ,y) locationActions: NSEWSuccessor: update location onlyGoal test: is (x ,y) =END?

Problem: Eat-All-Dots

States: {(x ,y), dot booleans}Actions: NSEWSuccessor: update location and

possibly a dot booleanGoal test: dots all false

Page 101: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States: (x ,y) location

Actions: NSEWSuccessor: update location onlyGoal test: is (x ,y) =END?

Problem: Eat-All-Dots

States: {(x ,y), dot booleans}Actions: NSEWSuccessor: update location and

possibly a dot booleanGoal test: dots all false

Page 102: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States: (x ,y) locationActions:

NSEWSuccessor: update location onlyGoal test: is (x ,y) =END?

Problem: Eat-All-Dots

States: {(x ,y), dot booleans}Actions: NSEWSuccessor: update location and

possibly a dot booleanGoal test: dots all false

Page 103: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States: (x ,y) locationActions: NSEW

Successor: update location onlyGoal test: is (x ,y) =END?

Problem: Eat-All-Dots

States: {(x ,y), dot booleans}Actions: NSEWSuccessor: update location and

possibly a dot booleanGoal test: dots all false

Page 104: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States: (x ,y) locationActions: NSEWSuccessor:

update location onlyGoal test: is (x ,y) =END?

Problem: Eat-All-Dots

States: {(x ,y), dot booleans}Actions: NSEWSuccessor: update location and

possibly a dot booleanGoal test: dots all false

Page 105: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States: (x ,y) locationActions: NSEWSuccessor: update location only

Goal test: is (x ,y) =END?

Problem: Eat-All-Dots

States: {(x ,y), dot booleans}Actions: NSEWSuccessor: update location and

possibly a dot booleanGoal test: dots all false

Page 106: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States: (x ,y) locationActions: NSEWSuccessor: update location onlyGoal test:

is (x ,y) =END?

Problem: Eat-All-Dots

States: {(x ,y), dot booleans}Actions: NSEWSuccessor: update location and

possibly a dot booleanGoal test: dots all false

Page 107: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States: (x ,y) locationActions: NSEWSuccessor: update location onlyGoal test: is (x ,y) =END?

Problem: Eat-All-Dots

States: {(x ,y), dot booleans}Actions: NSEWSuccessor: update location and

possibly a dot booleanGoal test: dots all false

Page 108: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States: (x ,y) locationActions: NSEWSuccessor: update location onlyGoal test: is (x ,y) =END?

Problem: Eat-All-Dots

States: {(x ,y), dot booleans}Actions: NSEWSuccessor: update location and

possibly a dot booleanGoal test: dots all false

Page 109: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States: (x ,y) locationActions: NSEWSuccessor: update location onlyGoal test: is (x ,y) =END?

Problem: Eat-All-Dots

States:

{(x ,y), dot booleans}Actions: NSEWSuccessor: update location and

possibly a dot booleanGoal test: dots all false

Page 110: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States: (x ,y) locationActions: NSEWSuccessor: update location onlyGoal test: is (x ,y) =END?

Problem: Eat-All-Dots

States: {(x ,y), dot booleans}

Actions: NSEWSuccessor: update location and

possibly a dot booleanGoal test: dots all false

Page 111: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States: (x ,y) locationActions: NSEWSuccessor: update location onlyGoal test: is (x ,y) =END?

Problem: Eat-All-Dots

States: {(x ,y), dot booleans}Actions:

NSEWSuccessor: update location and

possibly a dot booleanGoal test: dots all false

Page 112: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States: (x ,y) locationActions: NSEWSuccessor: update location onlyGoal test: is (x ,y) =END?

Problem: Eat-All-Dots

States: {(x ,y), dot booleans}Actions: NSEW

Successor: update location andpossibly a dot boolean

Goal test: dots all false

Page 113: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States: (x ,y) locationActions: NSEWSuccessor: update location onlyGoal test: is (x ,y) =END?

Problem: Eat-All-Dots

States: {(x ,y), dot booleans}Actions: NSEWSuccessor:

update location andpossibly a dot boolean

Goal test: dots all false

Page 114: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States: (x ,y) locationActions: NSEWSuccessor: update location onlyGoal test: is (x ,y) =END?

Problem: Eat-All-Dots

States: {(x ,y), dot booleans}Actions: NSEWSuccessor: update location and

possibly a dot boolean

Goal test: dots all false

Page 115: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States: (x ,y) locationActions: NSEWSuccessor: update location onlyGoal test: is (x ,y) =END?

Problem: Eat-All-Dots

States: {(x ,y), dot booleans}Actions: NSEWSuccessor: update location and

possibly a dot booleanGoal test:

dots all false

Page 116: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States: (x ,y) locationActions: NSEWSuccessor: update location onlyGoal test: is (x ,y) =END?

Problem: Eat-All-Dots

States: {(x ,y), dot booleans}Actions: NSEWSuccessor: update location and

possibly a dot booleanGoal test: dots all false

Page 117: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

What’s in a State Space?

The world state includes every last detail of the environment.

Search state keeps only details needed for planning (abstraction).

Problem: Pathing

States: (x ,y) locationActions: NSEWSuccessor: update location onlyGoal test: is (x ,y) =END?

Problem: Eat-All-Dots

States: {(x ,y), dot booleans}Actions: NSEWSuccessor: update location and

possibly a dot booleanGoal test: dots all false

Page 118: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Sizes?

World state:

Agent positions: 120

Food count: 30

Ghost positions: 12

Agent facing: NSEW

How many World states?120× (230)× (122)×4

States for pathing?120

States for eat-all-dots?120× (230)

Page 119: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Sizes?

World state:

Agent positions:

120

Food count: 30

Ghost positions: 12

Agent facing: NSEW

How many World states?120× (230)× (122)×4

States for pathing?120

States for eat-all-dots?120× (230)

Page 120: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Sizes?

World state:

Agent positions: 120

Food count: 30

Ghost positions: 12

Agent facing: NSEW

How many World states?120× (230)× (122)×4

States for pathing?120

States for eat-all-dots?120× (230)

Page 121: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Sizes?

World state:

Agent positions: 120

Food count:

30

Ghost positions: 12

Agent facing: NSEW

How many World states?120× (230)× (122)×4

States for pathing?120

States for eat-all-dots?120× (230)

Page 122: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Sizes?

World state:

Agent positions: 120

Food count: 30

Ghost positions: 12

Agent facing: NSEW

How many World states?120× (230)× (122)×4

States for pathing?120

States for eat-all-dots?120× (230)

Page 123: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Sizes?

World state:

Agent positions: 120

Food count: 30

Ghost positions:

12

Agent facing: NSEW

How many World states?120× (230)× (122)×4

States for pathing?120

States for eat-all-dots?120× (230)

Page 124: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Sizes?

World state:

Agent positions: 120

Food count: 30

Ghost positions: 12

Agent facing: NSEW

How many World states?120× (230)× (122)×4

States for pathing?120

States for eat-all-dots?120× (230)

Page 125: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Sizes?

World state:

Agent positions: 120

Food count: 30

Ghost positions: 12

Agent facing:

NSEW

How many World states?120× (230)× (122)×4

States for pathing?120

States for eat-all-dots?120× (230)

Page 126: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Sizes?

World state:

Agent positions: 120

Food count: 30

Ghost positions: 12

Agent facing: NSEW

How many World states?120× (230)× (122)×4

States for pathing?120

States for eat-all-dots?120× (230)

Page 127: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Sizes?

World state:

Agent positions: 120

Food count: 30

Ghost positions: 12

Agent facing: NSEW

How many World states?

120× (230)× (122)×4

States for pathing?120

States for eat-all-dots?120× (230)

Page 128: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Sizes?

World state:

Agent positions: 120

Food count: 30

Ghost positions: 12

Agent facing: NSEW

How many World states?120

× (230)× (122)×4

States for pathing?120

States for eat-all-dots?120× (230)

Page 129: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Sizes?

World state:

Agent positions: 120

Food count: 30

Ghost positions: 12

Agent facing: NSEW

How many World states?120× (230)× (122)×4

States for pathing?120

States for eat-all-dots?120× (230)

Page 130: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Sizes?

World state:

Agent positions: 120

Food count: 30

Ghost positions: 12

Agent facing: NSEW

How many World states?120× (230)× (122)×4

States for pathing?

120

States for eat-all-dots?120× (230)

Page 131: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Sizes?

World state:

Agent positions: 120

Food count: 30

Ghost positions: 12

Agent facing: NSEW

How many World states?120× (230)× (122)×4

States for pathing?120

States for eat-all-dots?120× (230)

Page 132: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Sizes?

World state:

Agent positions: 120

Food count: 30

Ghost positions: 12

Agent facing: NSEW

How many World states?120× (230)× (122)×4

States for pathing?120

States for eat-all-dots?

120× (230)

Page 133: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Sizes?

World state:

Agent positions: 120

Food count: 30

Ghost positions: 12

Agent facing: NSEW

How many World states?120× (230)× (122)×4

States for pathing?120

States for eat-all-dots?120

× (230)

Page 134: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Sizes?

World state:

Agent positions: 120

Food count: 30

Ghost positions: 12

Agent facing: NSEW

How many World states?120× (230)× (122)×4

States for pathing?120

States for eat-all-dots?120× (230)

Page 135: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Problem: Safe Passage

Problem: eat all dots while keeping the ghosts perma-scared?

What does the state space have to specify?

agent positiondot booleanspower pellet booleans

remaining scared time

Page 136: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Problem: Safe Passage

Problem: eat all dots while keeping the ghosts perma-scared?

What does the state space have to specify?

agent positiondot booleanspower pellet booleans

remaining scared time

Page 137: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Problem: Safe Passage

Problem: eat all dots while keeping the ghosts perma-scared?

What does the state space have to specify?

agent positiondot booleanspower pellet booleans

remaining scared time

Page 138: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Problem: Safe Passage

Problem: eat all dots while keeping the ghosts perma-scared?

What does the state space have to specify?

agent position

dot booleanspower pellet booleans

remaining scared time

Page 139: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Problem: Safe Passage

Problem: eat all dots while keeping the ghosts perma-scared?

What does the state space have to specify?

agent positiondot booleans

power pellet booleansremaining scared time

Page 140: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Problem: Safe Passage

Problem: eat all dots while keeping the ghosts perma-scared?

What does the state space have to specify?

agent positiondot booleanspower pellet booleans

remaining scared time

Page 141: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Problem: Safe Passage

Problem: eat all dots while keeping the ghosts perma-scared?

What does the state space have to specify?

agent positiondot booleanspower pellet booleans

remaining scared time

Page 142: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Agent Design

The environment largely determines the agent design.

Fully/partialy observable→ agent request memory (internal state)

Discrete/ continuous→ agent can/can’t enumerate all states

Stochastic/deterministic→ agent deals with contingencies

Single-agent/multi-agent→ agent may need to behave randomly.

Page 143: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Agent Design

The environment largely determines the agent design.

Fully/partialy observable→ agent request memory (internal state)

Discrete/ continuous→ agent can/can’t enumerate all states

Stochastic/deterministic→ agent deals with contingencies

Single-agent/multi-agent→ agent may need to behave randomly.

Page 144: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Agent Design

The environment largely determines the agent design.

Fully/partialy observable→ agent request memory (internal state)

Discrete/ continuous→ agent can/can’t enumerate all states

Stochastic/deterministic→ agent deals with contingencies

Single-agent/multi-agent→ agent may need to behave randomly.

Page 145: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Agent Design

The environment largely determines the agent design.

Fully/partialy observable→ agent request memory (internal state)

Discrete/ continuous→ agent can/can’t enumerate all states

Stochastic/deterministic→ agent deals with contingencies

Single-agent/multi-agent→ agent may need to behave randomly.

Page 146: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Agent Design

The environment largely determines the agent design.

Fully/partialy observable→ agent request memory (internal state)

Discrete/ continuous→ agent can/can’t enumerate all states

Stochastic/deterministic→ agent deals with contingencies

Single-agent/multi-agent→ agent may need to behave randomly.

Page 147: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Graphs and Search Trees

Page 148: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space GraphsState space graph: A

mathematical representation ofa search problem

I Nodes are (abstracted) worldconfigurations.

I Arcs represent successors(action results).

I The goal test is a set of goalnodes (maybe only one).

In a state space graph, eachstate occurs only once!

We can rarely build this full graphin memory (it’s too big), but it’s auseful idea.

E.g., replanning.

Page 149: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space GraphsState space graph: A

mathematical representation ofa search problem

I Nodes are (abstracted) worldconfigurations.

I Arcs represent successors(action results).

I The goal test is a set of goalnodes (maybe only one).

In a state space graph, eachstate occurs only once!

We can rarely build this full graphin memory (it’s too big), but it’s auseful idea.

E.g., replanning.

Page 150: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space GraphsState space graph: A

mathematical representation ofa search problem

I Nodes are (abstracted) worldconfigurations.

I Arcs represent successors(action results).

I The goal test is a set of goalnodes (maybe only one).

In a state space graph, eachstate occurs only once!

We can rarely build this full graphin memory (it’s too big), but it’s auseful idea.

E.g., replanning.

Page 151: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space GraphsState space graph: A

mathematical representation ofa search problem

I Nodes are (abstracted) worldconfigurations.

I Arcs represent successors(action results).

I The goal test is a set of goalnodes (maybe only one).

In a state space graph, eachstate occurs only once!

We can rarely build this full graphin memory (it’s too big), but it’s auseful idea.

E.g., replanning.

Page 152: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space GraphsState space graph: A

mathematical representation ofa search problem

I Nodes are (abstracted) worldconfigurations.

I Arcs represent successors(action results).

I The goal test is a set of goalnodes (maybe only one).

In a state space graph, eachstate occurs only once!

We can rarely build this full graphin memory (it’s too big), but it’s auseful idea.

E.g., replanning.

Page 153: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space GraphsState space graph: A

mathematical representation ofa search problem

I Nodes are (abstracted) worldconfigurations.

I Arcs represent successors(action results).

I The goal test is a set of goalnodes (maybe only one).

In a state space graph, eachstate occurs only once!

We can rarely build this full graphin memory (it’s too big),

but it’s auseful idea.

E.g., replanning.

Page 154: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space GraphsState space graph: A

mathematical representation ofa search problem

I Nodes are (abstracted) worldconfigurations.

I Arcs represent successors(action results).

I The goal test is a set of goalnodes (maybe only one).

In a state space graph, eachstate occurs only once!

We can rarely build this full graphin memory (it’s too big), but it’s auseful idea.

E.g., replanning.

Page 155: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space GraphsState space graph: A

mathematical representation ofa search problem

I Nodes are (abstracted) worldconfigurations.

I Arcs represent successors(action results).

I The goal test is a set of goalnodes (maybe only one).

In a state space graph, eachstate occurs only once!

We can rarely build this full graphin memory (it’s too big), but it’s auseful idea.

E.g., replanning.

Page 156: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Graphs

State space graph: A mathematicalrepresentation of a search problem

I Nodes are (abstracted) world configurations

I Arcs represent successors (action results)

I The goal test is a set of goal nodes (maybeonly one)

In a state space graph, each state occursonly once!

We can rarely build this full graph in memory (it’stoo big), but it’s a useful idea.

Page 157: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Graphs

State space graph: A mathematicalrepresentation of a search problem

I Nodes are (abstracted) world configurations

I Arcs represent successors (action results)

I The goal test is a set of goal nodes (maybeonly one)

In a state space graph, each state occursonly once!

We can rarely build this full graph in memory (it’stoo big), but it’s a useful idea.

Page 158: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Graphs

State space graph: A mathematicalrepresentation of a search problem

I Nodes are (abstracted) world configurations

I Arcs represent successors (action results)

I The goal test is a set of goal nodes (maybeonly one)

In a state space graph, each state occursonly once!

We can rarely build this full graph in memory (it’stoo big), but it’s a useful idea.

Page 159: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Graphs

State space graph: A mathematicalrepresentation of a search problem

I Nodes are (abstracted) world configurations

I Arcs represent successors (action results)

I The goal test is a set of goal nodes (maybeonly one)

In a state space graph, each state occursonly once!

We can rarely build this full graph in memory (it’stoo big), but it’s a useful idea.

Page 160: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Graphs

State space graph: A mathematicalrepresentation of a search problem

I Nodes are (abstracted) world configurations

I Arcs represent successors (action results)

I The goal test is a set of goal nodes (maybeonly one)

In a state space graph, each state occursonly once!

We can rarely build this full graph in memory (it’stoo big), but it’s a useful idea.

Page 161: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Graphs

State space graph: A mathematicalrepresentation of a search problem

I Nodes are (abstracted) world configurations

I Arcs represent successors (action results)

I The goal test is a set of goal nodes (maybeonly one)

In a state space graph, each state occursonly once!

We can rarely build this full graph in memory (it’stoo big),

but it’s a useful idea.

Page 162: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Graphs

State space graph: A mathematicalrepresentation of a search problem

I Nodes are (abstracted) world configurations

I Arcs represent successors (action results)

I The goal test is a set of goal nodes (maybeonly one)

In a state space graph, each state occursonly once!

We can rarely build this full graph in memory (it’stoo big), but it’s a useful idea.

Page 163: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Search Trees

This is now / start

“E”“N”

Possible futures.

A search tree:

A “what if” tree of plans and theiroutcomes

The start state is the root node

Children correspond to successors

Nodes show states, butcorrespond to PLANS that achievethose states

For most problems, we can neveractually build the whole tree

Page 164: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Search Trees

This is now / start

“E”“N”

Possible futures.

A search tree:

A “what if” tree of plans and theiroutcomes

The start state is the root node

Children correspond to successors

Nodes show states, butcorrespond to PLANS that achievethose states

For most problems, we can neveractually build the whole tree

Page 165: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Search Trees

This is now / start

“E”“N”

Possible futures.

A search tree:

A “what if” tree of plans and theiroutcomes

The start state is the root node

Children correspond to successors

Nodes show states, butcorrespond to PLANS that achievethose states

For most problems, we can neveractually build the whole tree

Page 166: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Search Trees

This is now / start

“E”“N”

Possible futures.

A search tree:

A “what if” tree of plans and theiroutcomes

The start state is the root node

Children correspond to successors

Nodes show states, butcorrespond to PLANS that achievethose states

For most problems, we can neveractually build the whole tree

Page 167: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Search Trees

This is now / start

“E”“N”

Possible futures.

A search tree:

A “what if” tree of plans and theiroutcomes

The start state is the root node

Children correspond to successors

Nodes show states, butcorrespond to PLANS that achievethose states

For most problems, we can neveractually build the whole tree

Page 168: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Search Trees

This is now / start

“E”“N”

Possible futures.

A search tree:

A “what if” tree of plans and theiroutcomes

The start state is the root node

Children correspond to successors

Nodes show states, butcorrespond to PLANS that achievethose states

For most problems, we can neveractually build the whole tree

Page 169: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Graphs vs. Search Trees

Each NODE in search tree is an entire PATH in state space graph.

We construct both on demand – and we construct as little as possible.

Page 170: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Graphs vs. Search Trees

Each NODE in search tree is an entire PATH in state space graph.

We construct both on demand – and we construct as little as possible.

Page 171: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

State Space Graphs vs. Search Trees

Each NODE in search tree is an entire PATH in state space graph.

We construct both on demand – and we construct as little as possible.

Page 172: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Quiz:State Space Graphs vs. Search Trees

Consider this 4-state graph:

S

a

b

GHow large could search tree be?

Page 173: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Quiz:State Space Graphs vs. Search Trees

Consider this 4-state graph:

S

a

b

GHow large could search tree be?

Page 174: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Quiz:State Space Graphs vs. Search Trees

Consider this 4-stategraph:

S

a

b

G

0

a b

b G a G...

...

How large couldsearch tree be?

Page 175: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Quiz:State Space Graphs vs. Search Trees

Consider this 4-stategraph:

S

a

b

G

0

a b

b G a G...

...

How large couldsearch tree be?

Page 176: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Tree Search

Page 177: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Search Example: Romania

Page 178: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Searching with a Search Tree

Search:

(1) Expand out potentialplans (tree nodes)

(2) Maintain a fringe ofpartial plans underconsideration.

(3) Try to expand as fewtree nodes as possible

Page 179: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Searching with a Search Tree

Search:(1) Expand out potential

plans (tree nodes)

(2) Maintain a fringe ofpartial plans underconsideration.

(3) Try to expand as fewtree nodes as possible

Page 180: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Searching with a Search Tree

Search:(1) Expand out potential

plans (tree nodes)(2) Maintain a fringe of

partial plans underconsideration.

(3) Try to expand as fewtree nodes as possible

Page 181: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Searching with a Search Tree

Search:(1) Expand out potential

plans (tree nodes)(2) Maintain a fringe of

partial plans underconsideration.

(3) Try to expand as fewtree nodes as possible

Page 182: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

Searching with a Search Tree

Search:(1) Expand out potential

plans (tree nodes)(2) Maintain a fringe of

partial plans underconsideration.

(3) Try to expand as fewtree nodes as possible

Page 183: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

General Tree Search

Important ideas:

FringeExpansionExploration strategy

Main question: which fringe nodes to explore?

Page 184: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

General Tree Search

Important ideas:

Fringe

ExpansionExploration strategy

Main question: which fringe nodes to explore?

Page 185: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

General Tree Search

Important ideas:

FringeExpansion

Exploration strategy

Main question: which fringe nodes to explore?

Page 186: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

General Tree Search

Important ideas:

FringeExpansionExploration strategy

Main question: which fringe nodes to explore?

Page 187: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

General Tree Search

Important ideas:

FringeExpansionExploration strategy

Main question: which fringe nodes to explore?

Page 188: Announcements - University of California, Berkeleycs188/sp20/assets/lecture/lec-2.pdf · Announcements Project 0: Python Tutorial. Due on Monday 1/27. 11:59 pm. Homework 0: Math Diagnostic

General Tree Search

Important ideas:

FringeExpansionExploration strategy

Main question: which fringe nodes to explore?