for next tuesday
play

For next Tuesday Read chapter 8 No written homework Initial posts - PowerPoint PPT Presentation

For next Tuesday Read chapter 8 No written homework Initial posts due Thursday 1pm and responses due by class time Tuesday Program 1 Any questions? Imperfect Knowledge What issues arise when we dont know everything (as in


  1. For next Tuesday • Read chapter 8 • No written homework • Initial posts due Thursday 1pm and responses due by class time Tuesday

  2. Program 1 • Any questions?

  3. Imperfect Knowledge • What issues arise when we don’t know everything (as in standard card games)?

  4. State of the Art • Chess – Deep Blue, Hydra, Rybka • Checkers – Chinook (alpha-beta search) • Othello – Logistello • Backgammon – TD-Gammon (learning) • Go • Bridge • Scrabble

  5. Games/Mainstream AI

  6. What about the games we play?

  7. Knowledge • Knowledge Base – Inference mechanism (domain-independent) – Information (domain-dependent) • Knowledge Representation Language – Sentences (which are not quite like English sentences) – The KRL determine what the agent can “know” – It also affects what kind of reasoning is possible • Tell and Ask

  8. Getting Knowledge • We can TELL the agent everything it needs to know • We can create an agent that can “learn” new information to store in its knowledge base

  9. The Wumpus World • Simple computer game • Good testbed for an agent • A world in which an agent with knowledge should be able to perform well • World has a single wumpus which cannot move, pits, and gold

  10. Wumpus Percepts • The wumpus’s square and squares adjacent to it smell bad. • Squares adjacent to a pit are breezy. • When standing in a square with gold, the agent will perceive a glitter. • The agent can hear a scream when the wumpus dies from anywhere • The agent will perceive a bump if it walks into a wall. • The agent doesn’t know where it is.

  11. Wumpus Actions • Go forward • Turn left • Turn right • Grab (picks up gold in that square) • Shoot (fires an arrow forward--only once) – If the wumpus is in front of the agent, it dies. • Climb (leave the cavern--only good at the start square)

  12. Consequences • Entering a square containing a live wumpus is deadly • Entering a square containing a pit is deadly • Getting out of the cave with the gold is worth 1,000 points. • Getting killed costs 10,000 points • Each action costs 1 point

  13. Possible Wumpus Environment Breeze Stench Pit Stench Breeze Breeze Stench Pit Wumpus Gold Stench Breeze Breeze Breeze Agent Pit

  14. Knowledge Representation • Two sets of rules: – Syntax: determines what atomic symbols exist in the language and how to combine them into sentences – Semantics: Relationship between the sentences and “the world” --needed to determine truth or falsehood of the sentences

  15. Reasoning • Entailment • Inference – May produce new sentences entailed by KB – May be used to determine which a particular sentence is entailed by the KB • We want inference procedures that are sound, or truth-preserving.

  16. What Is a Logic? • A set of language rules – Syntax – Semantics • A proof theory – A set of rules for deducing the entailments of a set of sentences

  17. Distinguishing Logics Language Ontological Epistemological Commitment (what Commitment (What exists in the world) an agent believes about facts) Propositional facts true/false/unknown Logic First-order logic facts, objects, true/false/unknown relations Temporal logic facts, objects, true/false/unknown relations, times degree of belief 0…1 Probability theory facts degree of belief 0…1 Fuzzy logic degree of truth

  18. Propositional Logic • Simple logic • Deals only in facts • Provides a stepping stone into first order logic

  19. Syntax • Logical Constants: true and false • Propositional symbols P, Q ... are sentences • If S is a sentence then (S) is a sentence. • If S is a sentence then ¬S is a sentence. • If S 1 and S 2 are sentences, then so are: – S 1  S 2 – S 1  S 2 – S 1  S 2 – S 1  S 2

  20. Semantics • true and false mean truth or falsehood in the world • P is true if its proposition is true of the world • ¬S is the negation of S • The remainder follow standard truth tables – S 1  S 2 : AND – S 1  S 2 : inclusive OR – S 1  S 2 : True unless S 1 is true and S 2 is false – S 1  S 2 : bi-conditional, or if and only if

  21. Vocabulary • An interpretation is an assignment of true or false to each atomic proposition • A sentence true under any interpretation is valid (a tautology or analytic sentence) • Validity can be checked by exhaustive checking of truth tables • A sentence that can be true is satisfiable

  22. Rules of Inference • Alternative to truth-table checking • A sequence of inference rule applications leading to a desired conclusion is a logical proof • We can check inference rules using truth tables, and then use to create sound proofs • We can treat finding a proof as a search problem

  23. Propositional Inference Rules • Modus Ponens or Implication Elimination • And Elimination • And Introduction • Unit Resolution • Resolution

  24. Building an Agent with Propositional Logic • Propositional logic has some nice properties – Easily understood – Easily computed • Can we build a viable wumpus world agent with propositional logic???

  25. The Problem • Propositional Logic only deals with facts. • We cannot easily represent general rules that apply to any square. • We cannot express information about squares and relate (we can’t easily keep track of which squares we have visited)

  26. More Precisely • In propositional logic, each possible atomic fact requires a separate unique propositional symbol. • If there are n people and m locations, representing the fact that some person moved from one location to another requires nm 2 separate symbols.

  27. First Order Logic • Predicate logic includes a richer ontology: – objects (terms) – properties (unary predicates on terms) – relations (n-ary predicates on terms) – functions (mappings from terms to other terms) • Allows more flexible and compact representation of knowledge • Move(x, y, z) for person x moved from location y to z.

  28. Syntax for First-Order Logic Sentence  AtomicSentence | Sentence Connective Sentence | Quantifier Variable Sentence | ¬Sentence | (Sentence) AtomicSentence  Predicate(Term, Term, ...) | Term=Term Term  Function(Term,Term,...) | Constant | Variable Connective   Quanitfier  $" Constant  A | John | Car1 Variable  x | y | z |... Predicate  Brother | Owns | ... Function  father-of | plus | ...

  29. Terms • Objects are represented by terms: – Constants: Block1, John – Function symbols: father-of, successor, plus • An n-ary function maps a tuple of n terms to another term: father-of(John), succesor(0), plus(plus(1,1),2) • Terms are simply names for objects. • Logical functions are not procedural as in programming languages. They do not need to be defined, and do not really return a value. • Functions allow for the representation of an infinite number of terms.

  30. Predicates • Propositions are represented by a predicate applied to a tuple of terms. A predicate represents a property of or relation between terms that can be true or false: – Brother(John, Fred), Left-of(Square1, Square2) – GreaterThan(plus(1,1), plus(0,1)) • In a given interpretation, an n-ary predicate can defined as a function from tuples of n terms to {True, False} or equivalently, a set tuples that satisfy the predicate: – {<John, Fred>, <John, Tom>, <Bill, Roger>, ...}

  31. Sentences in First-Order Logic • An atomic sentence is simply a predicate applied to a set of terms. – Owns(John,Car1) – Sold(John,Car1,Fred) • Semantics is True or False depending on the interpretation, i.e. is the predicate true of these arguments. • The standard propositional connectives (   ) can be used to construct complex sentences: – Owns(John,Car1)  Owns(Fred, Car1) – Sold(John,Car1,Fred)  ¬Owns(John, Car1) • Semantics same as in propositional logic.

  32. Quantifiers • Allow statements about entire collections of objects • Universal quantifier: " x – Asserts that a sentence is true for all values of variable x • " x Loves(x, FOPC) • " x Whale(x)  Mammal(x) • " x (" y Dog(y)  Loves(x,y))  (" z Cat(z)  Hates(x,z)) • Existential quantifier: $ – Asserts that a sentence is true for at least one value of a variable x • $ x Loves(x, FOPC) • $ x(Cat(x)  Color(x,Black)  Owns(Mary,x)) • $ x( " y Dog(y)  Loves(x,y))  ( " z Cat(z)  Hates(x,z))

  33. Use of Quantifiers • Universal quantification naturally uses implication: – " x Whale(x)  Mammal(x) • Says that everything in the universe is both a whale and a mammal. • Existential quantification naturally uses conjunction: – $ x Owns(Mary,x)  Cat(x) • Says either there is something in the universe that Mary does not own or there exists a cat in the universe. – " x Owns(Mary,x)  Cat(x) • Says all Mary owns is cats (i.e. everthing Mary owns is a cat). Also true if Mary owns nothing. – " x Cat(x)  Owns(Mary,x) • Says that Mary owns all the cats in the universe. Also true if there are no cats in the universe.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend