cs 415 – a.i. slide set 4. yamauchi paper exploration via data about frontier space – how to...

40
CS 415 – A.I. Slide Set 4

Upload: christopher-stewart

Post on 03-Jan-2016

216 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

CS 415 – A.I.

Slide Set 4

Page 2: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Yamauchi Paper

• Exploration via data about frontier space– How to detect frontier space– How to use it to choose navigation path

Q: “Given what you know about the world, where should you move to gain as much new information as possible?”

A: “...move to the boundary between open space and uncharted territory.”

Page 3: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

• Note: all accessible (open) space is contiguous• Every path that is partially in unknown territory

will cross a frontier• Building the map:– Probability Map• All cells set to the prior probability of occupancy (tests

set to 50% all over)• Update the grid when new sensor data is available

– Question: how do changes propagate?

Page 4: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Paper's Sensor Model

• Sonar: cone shaped reading– But, can suffer from specular reflection

• Laser: 2-D plane– But, doesn't suffer from specular reflection (as

much)

• Solution: use in tandem– If laser disagrees with sonar reading, use laser

reading– Is this a perfect solution? Why?

Page 5: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Frontiers on the Map

• Frontier edges are made up of contiguous map cells– Any open cell adjacent to an unknown cell is a

frontier cell

• Frontier cells are grouped into frontier regions• Any region at least as wide as the robot is a

frontier

Page 6: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Uses DFS

• Try to navigate to nearest frontier using DFS– This is an interesting choice. Why?– Calculation is done offboard

• Movement still relies on reactive obstacle avoidance–Why do this? Could it be a problem?

• After a certain time has passed without progress toward destination, determine destination unreachable

Page 7: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Experimental Data

• See figure 2• See figure 3• How does the robot bootstrap the map?– Could something similar be done with the create?

Page 8: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

The Propositional Calculus

• Representation Language for AI– Well-defined formal semantics– Sound and complete inference rules

• Symbols– Propositional Symbols

• P,Q,R,S, …– Truth Symbols

• true, false– Connectives

• (See page 46 – top blue box)

Page 9: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Sentences

• Every propositional symbol and truth symbol are sentences– true, P, Q, R, and so forth

• Negation of a sentence is a sentence• And of two sentences is a sentence• Or of two sentences is a sentence• Implication of one sentence to another is a sentence• Equivalence of two sentences is a sentence

Page 10: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

More Prop. Calc. and Vocab.

• Conjuncts (P,Q)– P AND Q

• Disjuncts (P,Q)– P OR Q

• For P IMPLIES Q– P is the Premise or Antecedent–Q is the Conclusion or Consequent

• () and [] are used to group sentences– Identifies the order of operations

Page 11: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Semantics (meaning) of Pred. Calc. Sentences

• Proposition symbols are used as variables to represent a statement about the world– P – “it is raining”–Q – “I live in a brown house”

• Propositions can be either true or false– Be in the set {T,F}

Page 12: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Semantics

• Interpretation – assigning T or F to each proposition– true is always assigned T and false is always

assigned F• Negation, And (conjunction), Or(disjunction) all work

as you’d expect• Implication – F only when premise is T and

consequent is F, otherwise T• Equivalence – T only when both expressions have the

same truth symbol always

Page 13: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Truth Tables and Laws

• Truth tables can be used to enumerate all possible interpretations – Fig 2.1– Fig 2.2

Page 14: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Important Identities

- Use these identities to prove equivalences by transforming predicates into the form of one of the identities.

Page 15: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

The Predicate Calculus

• Propositional Calculus– Not all that flexible– End up hiding details from ourselves• P – “it rained on Tuesday”• Did it rain any other day?

– I need another proposition for that information

• Predicate Calculus–weather(tuesday,rain)–weather(X,rain)

Page 16: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Syntax of Predicates and Sentences

Page 17: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

• Well formed expressions–weather(tuesday,rain)– father(david)– plus(2,3)

• Evaluation of these expressions– true (or false, depending if it actually did rain)– george (if david’s father’s name is george)– 5 (if 2+3 is 5, which it better be)

Page 18: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

SYMBOLS and TERMS

Example of Terms:cat times(2,3)X bluemother(jane) kate

Page 19: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Atomic Sentence• The most primitive unit of the predicate

calculus language.– Predicate of arity n followed by n terms closed in

parenthesis and separated by commas• likes(george,kate)• likes(george,sarah,tuesday)• helps(X,george)• friends(fatherof(david),fatherof(andrew))

– Note: the same symbol with different arities represents different predicates (“likes” above)

Page 20: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Review (Predicates and Atomic Sentences)

Atomic Sentences -or- atomic expressions, atoms, or propositions

Combine atomic sentences using operators to make sentences inpredicate calculus (and, or, not, implies, equality)

Page 21: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Variables and the Like• Variables

– represent an unspecified object in the domain• Variable Quantifiers

– Existential Quantifiers – Universal Quantifiers

Page 22: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Example using Predicate Calculus

mother(eve,abel)mother(eve,cain)father(adam,abel)father(adam,cain)AXAY father(X,Y) OR mother(X,Y) IMP parent(X,Y)AXAYAZ parent(X,Y) AND parent(X,Z) IMP sibling(Y,Z)

Page 23: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Semantics of Predicate Calculus• Semantics – provide a formal basis for determining

the truth value of a well-formed expression

Page 24: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

What Variables Mean

• likes(george, X)– X stands in for any possible object in the domain– X could be kate or susie• likes(george, kate)• likes(george, susie)

• In predicate calculus variables must be quantified in either of two ways

1. Universally – (can lead to undecidable predicates)2. Existentially

Page 25: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

ExamplesEnglish to Pred. Calc.

• If it doesn’t rain on Monday, Tom will go to the mountains– NOT weather(rain,monday) IMP go(tom,mountains)

• Emma is a doberman and a good dog– gooddog(emma) AND isa(emma, doberman)

• All basketball players are tall– A X (bballplayer(X) IMP tall(X))

• Some people like anchovies– E X (person(X) AND likes(X,anchovies))

Page 26: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

• If wishes were horses, beggars would ride– equal(wishes,horses) IMP ride(beggars)

• Nobody likes taxes– NOT E X likes(X,taxes)

Page 27: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Example – Block World

Page 28: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

• What happens if the arm moves c off of a– on(c,a) is removed –We need a rule for determining when a block is

clearA X(NOT E Y on(Y,X) IMP clear(X))

– allows computer to determine if block is clear– provides a basis for how to clear a block

– Stacking rule:A X A Y ((hand_empty AND clear(X) AND clear(Y) AND

pick_up(X) AND put_down(X,Y) IMP stack(X,Y))

Page 29: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Using Inference Rules to Produce Expressions

• logical inference – obtaining new correct expressions from a set of true assertions– correct because they are consistent with previous

expressions

• inferenece rules – provide a computationally feasible way to determine when an expression logically follows–mechanical means for creating new expressions

from old ones

Page 30: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Luger: Artificial Intelligence, 5th edition. © Pearson Education Limited, 2005 5

Page 31: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Luger: Artificial Intelligence, 5th edition. © Pearson Education Limited, 2005 6

Page 32: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Luger: Artificial Intelligence, 5th edition. © Pearson Education Limited, 2005 7

Page 33: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Luger: Artificial Intelligence, 5th edition. © Pearson Education Limited, 2005 8

Page 34: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Example: Modus Ponens

• “All men are mortal, Socrates is a man, Socrates is mortal”– A X (man(X) IMP mortal(X))–man(socrates)

• that means…–man(socrates) IMP mortal(socrates)– “Socrates is a mortal”

Page 35: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Unification• Unification – determining when two expressions

match– Variables make this more complicated– see: the Socrates example • Socrates is inserted for the X variable

– Also, expressions can be inserted into variables• these expressions may have their own variables

• Programmatic Unification– Get rid of all existential qualifiers• substitute the real values instead

Page 36: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Unification Example

• Pg 69 – Rather Complicated Algorithm• Section 2.3.3– Somewhat less complicated example of how

unification might take place

Page 37: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

Logic-Based Financial Advisor• Invest in Savings or Stocks?• Rules:

1. Individuals with an inadequate savings account should always make increasing the amount saved their first priority, regardless of income

2. Individuals with an adequate savings account and an adequate income should consider a riskier stocks investment

3. Individuals with a lower income with a lower income and adequate savings may want to consider splitting surplus income between savings and stocks

Page 38: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

• Adequate Savings– determined by number of dependents• $5000 in bank for each

• Adequate Income– determined by number of dependents• $15,000 per year + $4000 for each dependent

Page 39: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation

savings_account(adequate)savings_account(inadequate)income(adequate)income(inadequate)

savings_account(inadequate) IMP investment(savings)

etc.

Page 40: CS 415 – A.I. Slide Set 4. Yamauchi Paper Exploration via data about frontier space – How to detect frontier space – How to use it to choose navigation