Docsity

Utility and Decisions Making - Artificial Intelligence Programming | CS 662, Study notes of Computer Science

Partial preview of the text

Download Utility and Decisions Making - Artificial Intelligence Programming | CS 662 and more Study notes Computer Science in PDF only on Docsity!

Artificial Intelligence Programming^ Utility and Decision Making

Chris BrooksDepartment of Computer ScienceUniversity of San Francisco

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

22-2: Making decisions^ •^ At this point, we know how to describe the probability of eventsoccuring.^ ◦^ Or states being reached, in agent terms.^ •^ Knowing the probabilities of events is only part of the battle.^ •^ Agents are really interested in maximizing performance.^ •^ Often, performance can be captured by

utility.

-^ Utility indicates the relative value of a state.

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

22-4: Types of decision-making problems^ •^ Single-agent, deterministic, full information, episodic^ ◦^ We’ve done this with the reflex agent^ •^ Single-agent, deterministic, full information, sequential^ ◦^ We can use search here.^ •^ Single-agent, stochastic, partial information, episodic^ ◦^ We can use utility and probability here^ •^ Single-agent, stochastic, partial information, sequential^ ◦^ We can extend our knowledge of probability and utility to aMarkov decision process.^ •^ multiple-agent, deterministic, full information, episodic (orsequential)^ ◦^ This is game theory

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

22-5: Expected Utility^ •^ In episodic, stochastic worlds, we can use expected utility toselect actions.^ •^ An agent will know that an action can lead to one of a set

S^ of

states. • The agent has a utility for each of these states. • The agent also has a probability that these states will bereached. • The^ expected utility

of an action is: ∑ • s∈S^ P^ (s)U^ (s

-^ The principle of maximum expected utility says that an agentshould choose the action that maximizes expected utility.

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

22-7: Example^ •^ EU(lever 1) = 0.4 * 1 + 0.6 * -1 = -0.2^ •^ EU(lever 2) = 0.1 * 8 + 0.9 * -3 = 5.3^ •^ EU(neither) = 0^ •^ Lever 2 gives the maximum EU.

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

22-8: Example: Vegas^ •^ The typical roulette wheel has 38 numbers. (1-36, plus 0 and00).^ •^ 1-36 are either red or black.^ •^ The payoff for betting on a single number is 35:1^ ◦^ In other words, if the number you picked comes up, you win$35. Otherwise, you lose $1.^ •^ What is the expected utility of betting on a single number?

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

22-10: Example: Vegas^ •^ The typical roulette wheel has 38 numbers. (1-36, plus 0 and00).^ •^ 1-36 are either red or black.^ •^ The payoff for betting on a single number is 35:1^ ◦^ In other words, if the number you picked comes up, you win$35. Otherwise, you lose $1.^ •^ What if you decide to “spread the risk” and bet on twonumbers?

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

22-11: Example: Vegas^ •^ The typical roulette wheel has 38 numbers. (1-36, plus 0 and00).^ •^ 1-36 are either red or black.^ •^ The payoff for betting on a single number is 35:1^ ◦^ In other words, if the number you picked comes up, you win$35. Otherwise, you lose $1.^ •^ What if you decide to “spread the risk” and bet on twonumbers?^2 •^ 34 +^38

36 −^ 2 = 38

−^0.^105

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

22-13: Example: Vegas^ •^ The typical roulette wheel has 38 numbers. (1-36, plus 0 and00).^ •^ 1-36 are either red or black.^ •^ The payoff for betting on color is 1:1^ ◦^ In other words, if you bet ’red’ and a red number comes up,you win $1. Otherwise, you lose $1.^ •^ What is the expected utility of betting on ’red’?^18 •^ 1 +^38

20 −^ 1 = 38

−^0.^052

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

22-14: Regarding Preferences^ •^ In order for MEU to make sense, we need to specify some(hopefully reasonable) constraints on agent preferences.^ •^ Orderability. We must be able to say that

A^ is preferred to

B,^ B

is preferred to

A, or they are equally preferable. We cannot have the case where

A^ and^ B

are incomparable.

-^ Transitivity. If

A^ ≺^ B^ and

B^ ≺^ C, then

A^ ≺^ C.

-^ Continuity. If

A^ ≺^ B^ ≺

C, then there is a scenario where the agent is indifferent to getting

B^ and having a probability

p^ of

getting^ A

and^1 −

p^ chance of getting

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

22-16: Utility, Money, and Risk^ •^ Utility comes from economics^ ◦^ Money is often used as a substitute for utility.^ •^ Preferences for money behave oddly when dealing with smallor large amounts.^ •^ For example, you will often take more chance with smallamounts, and be very conservative with very large amounts.^ •^ This is called your

risk profile ◦^ convex - risk-seeking ◦^ concave, risk-averse • Typically, we say that we have a

quasilinear

utility function

regarding money.

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

22-17: Gathering information^ •^ When an agent has all the information it can get and just needsto select a single action, things are straightforward.^ ◦^ Find the action with the largest expected utility.^ •^ What if an agent can choose to gather more information aboutthe world?^ •^ Now we have a sequential decision problem:^ ◦^ Should we just act, or gather information first?^ ◦^ What questions should we ask?^ •

Agents should ask questions that give them usefulinformation. • “Useful” means increasing expected utility. ◦ Gathering information might be costly, either in time ormoney.

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

22-19: Example^ •^ Suppose the agent can perform a survey on a block that willindicate whether that block contains oil.^ •^ How much should the agent pay to perform that survey?^ •^ P^ (oil

−^ in^ −^ block

) = 1/n. P^ (¬oil^ −^ in^ −^ block

) = (n^ −

1)/n

◦^ If oil found, buy for

C/n. Profit =

C^ −^ C/n

= (n^ −^ 1)

C/n

◦^ If oil not found, buy a different block. ◦^ Probability of picking the oil block is now:

1 /(n^ −^ 1)

Expected Profit:

C/(n^ − 1)^ −^ C/n

=^ C/(n ∗^ (n^ −^ 1))

-^ So, the expected profit, given the information is:^ (n−1)^1 •^ n

Cn−^1 +^ n n

CC=^ n n(n−1)^

-^ So the company is willing to pay up to

C/n^ (the value of the

plot) for the test. This is the

value of that information

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

22-20: Value of Perfect Information^ •^ Let’s formalize this.^ •^ We find the best action

α^ in general with:

-^ EU^ (α

) =^ max

a∈actions

∑^ i∈outcomes

U^ (i)P^ (i |a)

-^ Let’s say we acquire some new information

E.

-^ Then we find the best action with: •^ EU^ (α

|E) =^ max

a∈actions

∑^ i∈outcomes

U^ (i)P^ (i |a, E)

-^ The value of

E^ is the difference between these two.

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