cs 415 – a.i. slide set 4. yamauchi paper exploration via data about frontier space – how to...
TRANSCRIPT
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 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.”
• 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?
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?
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
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
Experimental Data
• See figure 2• See figure 3• How does the robot bootstrap the map?– Could something similar be done with the create?
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)
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
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
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}
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
Truth Tables and Laws
• Truth tables can be used to enumerate all possible interpretations – Fig 2.1– Fig 2.2
Important Identities
- Use these identities to prove equivalences by transforming predicates into the form of one of the identities.
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)
Syntax of Predicates and Sentences
• 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)
SYMBOLS and TERMS
Example of Terms:cat times(2,3)X bluemother(jane) kate
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)
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)
Variables and the Like• Variables
– represent an unspecified object in the domain• Variable Quantifiers
– Existential Quantifiers – Universal Quantifiers
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)
Semantics of Predicate Calculus• Semantics – provide a formal basis for determining
the truth value of a well-formed expression
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
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))
• If wishes were horses, beggars would ride– equal(wishes,horses) IMP ride(beggars)
• Nobody likes taxes– NOT E X likes(X,taxes)
Example – Block World
• 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))
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
Luger: Artificial Intelligence, 5th edition. © Pearson Education Limited, 2005 5
Luger: Artificial Intelligence, 5th edition. © Pearson Education Limited, 2005 6
Luger: Artificial Intelligence, 5th edition. © Pearson Education Limited, 2005 7
Luger: Artificial Intelligence, 5th edition. © Pearson Education Limited, 2005 8
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”
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
Unification Example
• Pg 69 – Rather Complicated Algorithm• Section 2.3.3– Somewhat less complicated example of how
unification might take place
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
• 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
savings_account(adequate)savings_account(inadequate)income(adequate)income(inadequate)
savings_account(inadequate) IMP investment(savings)
etc.