Professional Documents
Culture Documents
– Very much needed when we have large amount of data that is very
hard (or sometimes impossible) to model with trying to write
algorithms directly.
The Rest of the slides show more details and are from “Artificial
Intelligence by David Poole et al”, the 2nd Text Book.
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.1, Page 14
Learning
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.1, Page 1
Components of a learning problem
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.1, Page 2
Learning task
Experiences/
Problem/
Data
Task
Model(s)
Learner Reasoner
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.1, Page 3
Learning architecture
Experiences/
Problem/
Data
Task
Model(s)
Learner Reasoner
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.1, Page 4
Choosing a representation
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.1, Page 5
Common Learning Tasks
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.1, Page 6
Example Classification Data
Training Examples:
Action Author Thread Length Where
e1 skips known new long home
e2 reads unknown new short work
e3 skips unknown old long work
e4 skips known old long home
e5 reads known new short home
e6 skips known old long work
New Examples:
e7 ??? known new short work
e8 ??? unknown new short work
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.1, Page 8
Measuring Success
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.1, Page 9
Bias
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.1, Page 10
Learning as search
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.1, Page 11
Noise
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.1, Page 12
Errors in learning
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.1, Page 13
Characterizations of Learning
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.1, Page 14
Supervised Learning
Given:
a set of inputs features X1 , . . . , Xn
a set of target features Y1 , . . . , Yk
a set of training examples where the values for the input
features and the target features are given for each
example
a new example, where only the values for the input
features are given
predict the values for the target features for the new example.
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 1
Supervised Learning
Given:
a set of inputs features X1 , . . . , Xn
a set of target features Y1 , . . . , Yk
a set of training examples where the values for the input
features and the target features are given for each
example
a new example, where only the values for the input
features are given
predict the values for the target features for the new example.
classification when the Yi are discrete
regression when the Yi are continuous
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 2
Example Data Representations
A travel agent wants to predict the preferred length of a trip,
which can be from 1 to 6 days. (No input features).
Two representations of the same data:
— Y is the length of trip chosen.
— Each Yi is an indicator variable that has value 1 if the
chosen length is i, and is 0 otherwise.
Example Y Example Y1 Y2 Y3 Y4 Y5 Y6
e1 1 e1 1 0 0 0 0 0
e2 6 e2 0 0 0 0 0 1
e3 6 e3 0 0 0 0 0 1
e4 2 e4 0 1 0 0 0 0
e5 1 e5 1 0 0 0 0 0
What is a prediction?
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 3
Evaluating Predictions
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 4
Measures of error
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 5
Measures of error
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 6
Measures of error
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 7
Measures of error
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 8
Measures of error
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 9
Measures of error (cont.)
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 10
Measures of error (cont.)
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 11
Information theory overview
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 12
Information and Probability
Let’s design a code to distinguish elements of {a, b, c, d} with
1 1 1 1
P(a) = , P(b) = , P(c) = , P(d) =
2 4 8 8
Consider the code:
a 0 b 10 c 110 d 111
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 14
Information Gain
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 15
Linear Predictions
8
7 L∞
6
5
4
3
2
1
0
0 1 2 3 4 5
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 16
Linear Predictions
8
7 L∞
6 L22
5
4
3 L1
2
1
0
0 1 2 3 4 5
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 17
Point Estimates
To make a single prediction for feature Y , with examples E .
The prediction that minimizes the sum of squares error on
E is
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 18
Point Estimates
To make a single prediction for feature Y , with examples E .
The prediction that minimizes the sum of squares error on
E is the mean (average) value of Y .
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 19
Point Estimates
To make a single prediction for feature Y , with examples E .
The prediction that minimizes the sum of squares error on
E is the mean (average) value of Y .
The prediction that minimizes the absolute error on E is
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 20
Point Estimates
To make a single prediction for feature Y , with examples E .
The prediction that minimizes the sum of squares error on
E is the mean (average) value of Y .
The prediction that minimizes the absolute error on E is
the median value of Y .
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 21
Point Estimates
To make a single prediction for feature Y , with examples E .
The prediction that minimizes the sum of squares error on
E is the mean (average) value of Y .
The prediction that minimizes the absolute error on E is
the median value of Y .
The prediction that minimizes the number wrong on E is
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 22
Point Estimates
To make a single prediction for feature Y , with examples E .
The prediction that minimizes the sum of squares error on
E is the mean (average) value of Y .
The prediction that minimizes the absolute error on E is
the median value of Y .
The prediction that minimizes the number wrong on E is
the mode of Y .
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 23
Point Estimates
To make a single prediction for feature Y , with examples E .
The prediction that minimizes the sum of squares error on
E is the mean (average) value of Y .
The prediction that minimizes the absolute error on E is
the median value of Y .
The prediction that minimizes the number wrong on E is
the mode of Y .
The prediction that minimizes the worst-case error on E
is
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 24
Point Estimates
To make a single prediction for feature Y , with examples E .
The prediction that minimizes the sum of squares error on
E is the mean (average) value of Y .
The prediction that minimizes the absolute error on E is
the median value of Y .
The prediction that minimizes the number wrong on E is
the mode of Y .
The prediction that minimizes the worst-case error on E
is (maximum + minimum)/2
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 25
Point Estimates
To make a single prediction for feature Y , with examples E .
The prediction that minimizes the sum of squares error on
E is the mean (average) value of Y .
The prediction that minimizes the absolute error on E is
the median value of Y .
The prediction that minimizes the number wrong on E is
the mode of Y .
The prediction that minimizes the worst-case error on E
is (maximum + minimum)/2
When Y has domain {0, 1}, the prediction that
maximizes the likelihood on E is
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 26
Point Estimates
To make a single prediction for feature Y , with examples E .
The prediction that minimizes the sum of squares error on
E is the mean (average) value of Y .
The prediction that minimizes the absolute error on E is
the median value of Y .
The prediction that minimizes the number wrong on E is
the mode of Y .
The prediction that minimizes the worst-case error on E
is (maximum + minimum)/2
When Y has domain {0, 1}, the prediction that
maximizes the likelihood on E is the empirical probability.
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 27
Point Estimates
To make a single prediction for feature Y , with examples E .
The prediction that minimizes the sum of squares error on
E is the mean (average) value of Y .
The prediction that minimizes the absolute error on E is
the median value of Y .
The prediction that minimizes the number wrong on E is
the mode of Y .
The prediction that minimizes the worst-case error on E
is (maximum + minimum)/2
When Y has domain {0, 1}, the prediction that
maximizes the likelihood on E is the empirical probability.
When Y has domain {0, 1}, the prediction that minimizes
the entropy on E is
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 28
Point Estimates
To make a single prediction for feature Y , with examples E .
The prediction that minimizes the sum of squares error on
E is the mean (average) value of Y .
The prediction that minimizes the absolute error on E is
the median value of Y .
The prediction that minimizes the number wrong on E is
the mode of Y .
The prediction that minimizes the worst-case error on E
is (maximum + minimum)/2
When Y has domain {0, 1}, the prediction that
maximizes the likelihood on E is the empirical probability.
When Y has domain {0, 1}, the prediction that minimizes
the entropy on E is the empirical probability.
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 29
Point Estimates
To make a single prediction for feature Y , with examples E .
The prediction that minimizes the sum of squares error on
E is the mean (average) value of Y .
The prediction that minimizes the absolute error on E is
the median value of Y .
The prediction that minimizes the number wrong on E is
the mode of Y .
The prediction that minimizes the worst-case error on E
is (maximum + minimum)/2
When Y has domain {0, 1}, the prediction that
maximizes the likelihood on E is the empirical probability.
When Y has domain {0, 1}, the prediction that minimizes
the entropy on E is the empirical probability.
But that doesn’t mean that these predictions minimize the
error for future predictions....
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 30
Training and Test Sets
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 31
Learning Probabilities
Empirical probabilities do not make good predictors when
evaluated by likelihood or entropy.
Why?
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 32
Learning Probabilities
Empirical probabilities do not make good predictors when
evaluated by likelihood or entropy.
Why? A probability of zero means “impossible” and has
infinite cost if there is one true case in test set.
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.2, Page 33
Learning Probabilities
Empirical probabilities do not make good predictors when
evaluated by likelihood or entropy.
Why? A probability of zero means “impossible” and has
infinite cost if there is one true case in test set.
Solution: (Laplace smoothing) add (non-negative)
pseudo-counts to the data.
Suppose ni is the number of examples with X = vi , and
ci is the pseudo-count:
ci + n i
P(X = vi ) = P
i ′ ci ′ + n i ′
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 1
Learning Decision Trees
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 2
Decision trees
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 3
Example Decision Trees
Length Length
reads Author
unknown known
skips reads
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 4
Equivalent Logic Program
skips ← long .
reads ← short ∧ new .
reads ← short ∧ follow up ∧ known.
skips ← short ∧ follow up ∧ unknown.
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 5
Issues in decision-tree learning
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 6
Searching for a Good Decision Tree
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 7
Choices in implementing the algorithm
When to stop:
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 8
Choices in implementing the algorithm
When to stop:
◮ no more input features
◮ all examples are classified the same
◮ too few examples to make an informative split
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 9
Choices in implementing the algorithm
When to stop:
◮ no more input features
◮ all examples are classified the same
◮ too few examples to make an informative split
Which feature to select to split on isn’t defined. Often we
use myopic split: which single split gives smallest error.
With multi-valued features, we can split on all values or
split values into half.
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 10
Example: possible splits
skips 9
length reads 9
long short
skips 7 skips 2
reads 0 reads 9 skips 9
thread reads 9
new old
skips 3 skips 6
reads 7 reads 2
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 11
Handling Overfitting
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 12
Linear Function
f w (X1 , . . . , Xn ) = w0 + w1 X1 + · · · + wn Xn
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 13
Linear Regression
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 14
Linear Regression
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 15
Finding weights that minimize ErrorE (w )
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 16
Finding weights that minimize ErrorE (w )
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 17
Gradient Descent for Linear Regression
1: procedure LinearLearner (X , Y , E , η)
2: Inputs
3: X : set of input features, X = {X1 , . . . , Xn }
4: Y : output feature
5: E : set of examples from which to learn
6: η: learning rate
7: initialize w0 , . . . , wn randomly
8: repeat
9: for each example e in E do
10: δ ← val(e, Y ) − pval w (e, Y )
11: for each i ∈ [0, n] do
12: wi ← wi + ηδval(e, Xi )
13: until some stopping criterion is true
14: return w0 , . . . , wn
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 18
Linear Classifier
f w (X1 , . . . , Xn ) = f (w0 + w1 X1 + · · · + wn Xn )
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 19
Gradient Descent for Linear Classifiers
If the activation is differentiable, we can use gradient descent
to update the weights. The sum of squares error is:
X X
ErrorE (w ) = (val(e, Y ) − f ( wi × val(e, Xi )))2
e∈E i
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 20
The sigmoid or logistic activation function
1
0.9 1
0.8
1 + e- x
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
-10 -5 0 5 10
1
f (x) =
1 + e −x
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 21
The sigmoid or logistic activation function
1
0.9 1
0.8
1 + e- x
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
-10 -5 0 5 10
1
f (x) =
1 + e −x
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 22
Gradient Descent for Logistic Regression
1: procedure LinearLearner (X , Y , E , η)
2: Inputs
3: X : set of input features, X = {X1 , . . . , Xn }
4: Y : output feature
5: E : set of examples from which to learn
6: η: learning rate
7: initialize w0 , . . . , wn randomly
8: repeat
9: for each example P e in E do
10: p ← f ( i wi × val(e, Xi ))
11: δ ← val(e, Y ) − p
12: for each i ∈ [0, n] do
13: wi ← wi + ηδp(1 − p)val(e, Xi )
14: until some stopping criterion is true
15: return w0 , . . . , wn
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 23
Simple Example
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 24
Simple Example
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 25
Linearly Separable
0 - + 0 - - 0 - +
0 1 0 1 0 1
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 26
Bayesian classifiers
Idea: if you knew the classification you could predict the
values of features.
P(Class|X1 . . . Xn ) ∝ P(X1 , . . . , Xn |Class)P(Class)
Naive Bayesian classifier: Xi are independent of each
other given the class.
Requires: P(Class) and P(Xi |Class) for each Xi .
Y
P(Class|X1 . . . Xn ) ∝ P(Xi |Class)P(Class)
i
UserAction
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 27
Learning Probabilities
C
X1 X2 X3 X4 C Count
.. .. .. .. .. ..
. . . . . .
t f t t 1 40 X1 X2 X3 X4
−→
t f t t 2 10
t f t t 3 50
.. .. .. .. .. ..
. . . . . .
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 28
Learning Probabilities
C
X1 X2 X3 X4 C Count
.. .. .. .. .. ..
. . . . . .
t f t t 1 40 X1 X2 X3 X4
−→
t f t t 2 10
t f t t 3 50
.. .. .. .. .. ..
. . . . . .
P
t|=C =vi Count(t)
P(C =vi ) = P
t Count(t)
P
t|=C =vi ∧Xk =vj Count(t)
P(Xk = vj |C =vi ) = P
t|=C =vi Count(t)
...perhaps including pseudo-counts
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 7.3, Page 29
Help System
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 8.1, Page 1
Actions
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 8.1, Page 2
Delivery Robot Example
Coffee
Shop
Sam's
Office
Mail
Lab
Room
Actions:
Features:
mc – move clockwise
RLoc – Rob’s location
mcc – move counterclockwise
RHC – Rob has coffee
puc – pickup coffee
SWC – Sam wants coffee
dc – deliver coffee
MW – Mail is waiting
pum – pickup mail
RHM – Rob has mail
dm – deliver mail
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 8.1, Page 3
Explicit State-space Representation
State
Action Resulting
State
lab, rhc, swc, mw , rhm mc
mr , rhc, swc, mw , rhm
lab, rhc, swc, mw , rhm mcc
off , rhc, swc, mw , rhm
off , rhc, swc, mw , rhm dm
off , rhc, swc, mw , rhm
off , rhc, swc, mw , rhm mcc
cs, rhc, swc, mw , rhm
off , rhc, swc, mw , rhm mc lab, rhc, swc, mw , rhm
... ... ...
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 8.1, Page 4
Feature-based representation of actions
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 8.1, Page 5
Example feature-based representation
Precondition of pick-up coffee (puc):
RLoc = cs ∧ rhc
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 8.1, Page 6
STRIPS Representation
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 8.1, Page 7
Example STRIPS representation
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 8.1, Page 8
Planning
Given:
A description of the effects and preconditions of the
actions
A description of the initial state
A goal to achieve
find a sequence of actions that is possible and will result in a
state satisfying the goal.
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 8.2, Page 1
Forward Planning
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 8.2, Page 2
Example state-space graph
Actions
mc: move clockwise
mac: move anticlockwise 〈cs,rhc,swc,mw,rhm〉
nm: no move puc
mac
puc: pick up coffee mc
dc: deliver coffee
pum: pick up mail 〈cs,rhc,swc,mw,rhm〉 〈off,rhc,swc,mw,rhm〉 〈mr,rhc,swc,mw,rhm〉
dm: deliver mail mc
mc mac
〈off,rhc,swc,mw,rhm〉 mac 〈lab,rhc,swc,mw,rhm〉
〈cs,rhc,swc,mw,rhm〉
〈mr,rhc,swc,mw,rhm〉 Locations:
dc
cs: coffee shop Feature values
mc
〈off,rhc,swc,mw,rhm〉 mac off: office rhc: robot has coffee
lab: laboratory swc: Sam wants coffee
mac mr: mail room
〈lab,rhc,swc,mw,rhm〉 mw: mail waiting
rhm: robot has mail
〈mr,rhc,swc,mw,rhm〉
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 8.2, Page 3
What are the errors?
Actions
mc: move clockwise
1 〈
mac: move anticlockwise mr,rhc,swc,mw,rhm〉
nm: no move pum
puc
puc: pick up coffee 2 3 mc 4
dc: deliver coffee
pum: pick up mail 〈mr,rhc,swc,mw,rhm〉 〈cs,rhc,swc,mw,rhm〉 〈mr,rhc,swc,mw,rhm〉
dm: deliver mail
mac mc puc
〈lab,rhc,swc,mw,rhm〉 5 mc 〈off,rhc,swc,mw,rhm〉
〈cs,rhc,swc,mw,rhm〉
6
7
mc 〈cs,rhc,swc,mw,rhm〉 Locations:
cs: coffee shop Feature values
〈mr,rhc,swc,mw,rhm〉 mac 10
off: office rhc: robot has coffee
8 lab: laboratory swc: Sam wants coffee
puc
〈off,rhc,swc,mw,rhm〉 mr: mail room mw: mail waiting
rhm: robot has mail
9
11
〈cs,rhc,swc,mw,rhm〉
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 8.2, Page 4
Forward planning representation
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 8.2, Page 5
Improving Search Efficiency
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 8.2, Page 6
Regression Planning
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 8.3, Page 1
Defining nodes and arcs
[X1 = v1 , . . . , Xn = vn ]
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 8.3, Page 2
Formalizing arcs using STRIPS notation
hG , A, Ni
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 8.3, Page 3
Regression example
Actions Locations:
mc: move clockwise [swc] cs: coffee shop Feature values
mac: move anticlockwise off: office rhc: robot has coffee
puc: pick up coffee dc lab: laboratory swc: Sam wants coffee
dc: deliver coffee mr: mail room mw: mail waiting
pum: pick up mail [off,rhc] rhm: robot has mail
dm: deliver mail
mc mac
[cs,rhc] [lab,rhc]
mc mac mac
puc mc
[mr,rhc] [off,rhc] [mr,rhc]
[cs] [off,rhc]
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 8.3, Page 4
Find the errors
①
[swc,rhc,mw]
pum dc puc
④
② ③
[swc,rhc,off] [off,rhc,mw] [swc,cs,mw]
mc dm
mc ⑤ ⑥
puc
[cs,rhc, mw] [off,rhc, rhm,mw]
[swc,rhc,cs] [swc,cs,mw]
⑧ Actions
⑦
mc: move clockwise
Locations: Feature values mac: move anticlockwise
cs: coffee shop rhc: robot has coffee puc: pick up coffee
off: office swc: Sam wants coffee dc: deliver coffee
lab: laboratory mw: mail waiting pum: pick up mail
mr: mail room rhm: robot has mail dm: deliver mail
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 8.3, Page 5
Loop detection and multiple-path pruning
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 8.3, Page 6
Improving Efficiency
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 8.3, Page 7
Comparing forward and regression planners
c
D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 8.3, Page 8