12
Lab Assignment 1 Environments Search Bayes Nets

Lab Assignment 1 Environments Search Bayes Nets. Problem 1: Peg Solitaire Is Peg Solitaire: Partially observable? Stochastic? Continuous? Adversarial?

Embed Size (px)

Citation preview

Page 1: Lab Assignment 1 Environments Search Bayes Nets. Problem 1: Peg Solitaire Is Peg Solitaire: Partially observable? Stochastic? Continuous? Adversarial?

Lab Assignment 1

EnvironmentsSearch

Bayes Nets

Page 2: Lab Assignment 1 Environments Search Bayes Nets. Problem 1: Peg Solitaire Is Peg Solitaire: Partially observable? Stochastic? Continuous? Adversarial?

Problem 1: Peg SolitaireIs Peg Solitaire:

Partially observable?

Stochastic?

Continuous?

Adversarial?Play online at: http://www.novelgames.com/flashgames/game.php?id=61http://www.gamedesign.jp/flash/peg/peg.html

Page 3: Lab Assignment 1 Environments Search Bayes Nets. Problem 1: Peg Solitaire Is Peg Solitaire: Partially observable? Stochastic? Continuous? Adversarial?

Problem 2: Loaded Coin

Is Loaded Coin:

Partially observable?

Stochastic?

Continuous?

Adversarial?

The coin above might be fair (0.5 chance of heads, 0.5 chance of tails), or it might be loaded (p chance of heads, 1-p chance of tails, p != 0.5).

The Loaded Coin problem is to determine whether the coin is fair or loaded.

You don’t need to solve Loaded Coin, but answer the questions on the right.

Page 4: Lab Assignment 1 Environments Search Bayes Nets. Problem 1: Peg Solitaire Is Peg Solitaire: Partially observable? Stochastic? Continuous? Adversarial?

Problem 3: Maze TraversalIs Maze Traversal:

Partially observable?

Stochastic?

Continuous?

Adversarial?

O

X

start

goal

Maze Traversal: get from the start position to the goal position.

Answer the questions about the maze traversal problem on the right.

Page 5: Lab Assignment 1 Environments Search Bayes Nets. Problem 1: Peg Solitaire Is Peg Solitaire: Partially observable? Stochastic? Continuous? Adversarial?

Problem 4: Search Tree

Counting the start node and goal node, how many nodes are expanded if we go1. Left-to-right

a. Breadth-first:b. Depth-first:

2. Right-to-lefta. Breadth-first:b. Depth-first:

start

goal

Page 6: Lab Assignment 1 Environments Search Bayes Nets. Problem 1: Peg Solitaire Is Peg Solitaire: Partially observable? Stochastic? Continuous? Adversarial?

Problem 5: Search Network

Counting the start node and goal node, how many nodes are expanded if we go1. Left-to-right

a. Breadth-first:b. Depth-first:

2. Right-to-lefta. Breadth-first:b. Depth-first:

start

goal

Page 7: Lab Assignment 1 Environments Search Bayes Nets. Problem 1: Peg Solitaire Is Peg Solitaire: Partially observable? Stochastic? Continuous? Adversarial?

Problem 6: A* Search

1 2 3 4 5 6

A 4 4 4 3 2 1

B 3 3 3 3 2 1

C 2 2 2 2 2 1

D 1 1 1 1 1 0

start

goal

The table above shows the state space for a search problem: grid elements A1 through D6.

The values in each cell indicate the value of a heuristic function h(x) for that cell grid.

1. Is the heuristic function admissible?

2. Which node will be expanded first: A2 or B1?

3. Which node will be expanded second: B1, C1, A2, A3, or B2?

4. Which node will be expanded third: D1, C2, B3, or A4?

Page 8: Lab Assignment 1 Environments Search Bayes Nets. Problem 1: Peg Solitaire Is Peg Solitaire: Partially observable? Stochastic? Continuous? Adversarial?

Problem 7: Bayes Rule

Assume the following are true regarding binary random variables A and B:P(A) = 0.5P(B | A) = 0.2P(B | A) = 0.8

What is P(A | B)?

Page 9: Lab Assignment 1 Environments Search Bayes Nets. Problem 1: Peg Solitaire Is Peg Solitaire: Partially observable? Stochastic? Continuous? Adversarial?

Problem 8: Simple Bayes Net

P(A) = 0.5i P(Xi | A) = 0.2

i P(Xi | A) = 0.6

1. What is P(A | X1 X2 X3)?

2. What isP(X3 | X1)?

A

X1 X2 X3

Page 10: Lab Assignment 1 Environments Search Bayes Nets. Problem 1: Peg Solitaire Is Peg Solitaire: Partially observable? Stochastic? Continuous? Adversarial?

Problem 9: Conditional Independence

BC?

BC | D?

BC | A?

BC | A, D?

A

B C

D

Page 11: Lab Assignment 1 Environments Search Bayes Nets. Problem 1: Peg Solitaire Is Peg Solitaire: Partially observable? Stochastic? Continuous? Adversarial?

Problem 10: Conditional Independence 2

CE | A?

BD | C, E?

AC | E?

AC | B?

A

B D

E

C

Page 12: Lab Assignment 1 Environments Search Bayes Nets. Problem 1: Peg Solitaire Is Peg Solitaire: Partially observable? Stochastic? Continuous? Adversarial?

Problem 11: Parameter Counting

How many parameters are needed to specify a full joint distribution over 5 binary variables?

For the Bayes Net on the left, assuming all 5 variables are binary, how many parameters are needed?

A

B D

E

C