1 / 24

Limitations of Propositional Logic

Limitations of Propositional Logic. 1. It is too weak, i.e., has very limited expressiveness: Each rule has to be represented for each situation: e.g., “don’t go forward if the wumpus is in front of you” takes 64 rules 2. It cannot keep track of changes:

snow
Télécharger la présentation

Limitations of Propositional Logic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Limitations of Propositional Logic 1. It is too weak, i.e., has very limited expressiveness: • Each rule has to be represented for each situation:e.g., “don’t go forward if the wumpus is in front of you” takes 64 rules 2. It cannot keep track of changes: • If one needs to track changes, e.g., where the agent has been before then we need a timed-version of each rule. To track 100 steps we’ll then need 6400 rules for the previous example. Its hard to write and maintain such a huge rule-base Inference becomes intractable

  2. 5.3 Predicate Logic - Introduction • Greater expressive power than propositional logic • Predicate logic expression consists of a predicate name followed by a list of arguments • The number of elements in the list of arguments is the predicate’s arity • Two quantifiers can be applied to predicate variables

  3. Predicate logic Predicate Logic is more expressive, because it allows us to represent : • Objects • Predicates (facts) • Variables

  4. Assume we have the following assertions (facts) • Comet is a horse • Prancer is a horse • Comet is parent of Dasher • Comet is a parent of Prancer • Prancer is fast • Dasher is a parent of Thunder • Thunder is fast • Thunder is a horse • Dasher is a horse

  5. Write predicate logic sentences for these facts : To do so, we need to understand the concepts of: • Objects • Comet, Prancer, Dasher, etc • Predicates (facts) • horse [horse(Comet)] • parent-of [parent-of(Comet,Dasher)] • Variables • horse(x)

  6. Comet is a horse Prancer is a horse Comet is parent of Dasher Comet is a parent of Prancer Prancer is fast Dasher is a parent of Thunder Thunder is fast Thunder is a horse Dasher is a horse horse(Comet) horse(Prancer) parent-of(Comet,Dasher) parent-of(Comet,Prancer) fast(Prancer) parent-of(Dasher,Thunder) fast(Thunder) horse(Thunder) horse(Dasher) Thus, we can write

  7. We also can write compound statements such as: • not( horse(Schafer) ) • horse(Comet) and parent-of(Comet,Dasher) • winner(Prancer) implies fast(Prancer)

  8. Suppose we have the following rule (relation) R1:if   x is-a horse             x is-parent-of y             y is-fast then  x is valuable

  9. Bindings In general, there will be variables in the rules which stand for arbitrary objects. We need to find bindings for them so that the rule is applicable.

  10. Bindings R1:if   x is-a horse             x is-parent-of y             y is-fast then  x is valuable

  11. Bindings From these we can deduce that there are two possible bindings applicable to the rule: x = Comet and y = Prancer x = Dasher and y = Thunder Since x is valuable, Comet is valuable and Dasher is valuable

  12. Forward Chaining • Forward Chaining or data-driven inference works by repeatedly: starting from the current state, matching the premises of the rules (the IF parts), and performing the corresponding actions (the then parts) that usually update the knowledge base or working memory. • The process continues until no more rules can be applied, or some cycle limit is met.

  13. Forward Chaining

  14. Forward Chaining • In this example there are no more rules, so we can draw the inference chain: • This seems simple enough, but this had few initial facts and few rules.

  15. Disadvantages of Forward Chaining • Many rules may be applicable at each stage – so how should we choose which one to apply next at each stage? • The whole process is not directed towards a goal, so how do we know when to stop applying the rules?

  16. Backward Chaining • Backward chaining or goal-driven inference works towards a final state by looking at the working memory to see if the sub-goal states already exist there. If not, the actions (the THEN parts) of the rules that will establish the sub-goals are identified and new sub-goals are set up for achieving the premises of those rules (the IF parts).

  17. Backward Chaining • The previous example now becomes:

  18. Backward Chaining • The first part of the chain works back from the goal until only the initial facts are required, at which point we know how to traverse the chain to achieve the goal state.

  19. Backward Chaining • Advantage • The search is goal directed, so we only apply the rules that are necessary to achieve the goal. • Disadvantage • The goal has to be known. • Fortunately, many AI systems can be formulated in a goal based fashion.

  20. Predicate logic Predicate Logic is more expressive, because it allows us to represent : • Objects • Predicates (facts) • Variables • Quantifiers

  21. Quantifiers • A key to predicate logic we have been ignoring is the inclusion of quantifiers • You should recall from discrete that you can also write statements such as •  x  fast(x) implies horse(x) •  y  fast(y) implies valuable(y)

  22. Quantifiers • Existential quantifier (∃) • ∃x– “there exists an x” • One or more values of x are guaranteed to exist • Universal quantifier (∀) • ∀x – “for all x” • The expression is stating something is true for all values that x can assume

  23. Examples of Predicate Logic • (~Win(you) ⇒ Lose(you)) /\ (Lose(you) ⇒ Win(me)) • If you don’t win, then you lose and if you lose then I win • (∃x)[Natural_number(x) /\ Divisible_by_2(x)] • Some natural numbers are even • (∀x){[Animal(x) /\ Has_Hair(x) /\ Warm_Blooded(x)] ⇒ Mammal(x)} • If x is a warm-blooded animal with hair then x is a mammal

  24. Represent the following sentences in predicate logic • Schafer is a Hoosier • Hoosiers like basketball. • Children of basketball fans are basketball fans. • Basketball fans like the month of March. • Margaret is Schafer's daughter

More Related