CS621: Artificial Intelligence - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

CS621: Artificial Intelligence

Description:

... R.H.S of. assert P. Check if P exists. Resolution Refutation ... Done through Resolution Refutation. Club example: Inferencing. member(A) member(B) member(C) ... – PowerPoint PPT presentation

Number of Views:45
Avg rating:3.0/5.0
Slides: 33
Provided by: cfd5
Category:

less

Transcript and Presenter's Notes

Title: CS621: Artificial Intelligence


1
CS621 Artificial Intelligence
  • Pushpak BhattacharyyaCSE Dept., IIT Bombay
  • Lecture 34 Predicate Calculus and Himalayan Club
    example
  • (lectures 32 and 33 were on HMMViterbi combined
    AI and NLP)

2
Resolution - Refutation
  • man(x) ? mortal(x)
  • Convert to clausal form
  • man(shakespeare) mortal(x)
  • Clauses in the knowledge base
  • man(shakespeare) mortal(x)
  • man(shakespeare)
  • mortal(shakespeare)

3
Resolution Refutation contd
  • Negate the goal
  • man(shakespeare)
  • Get a pair of resolvents

4
Resolution Tree

5
Search in resolution
  • Heuristics for Resolution Search
  • Goal Supported Strategy
  • Always start with the negated goal
  • Set of support strategy
  • Always one of the resolvents is the most recently
    produced resolute

6
Inferencing in Predicate Calculus
  • Forward chaining
  • Given P, , to infer Q
  • P, match L.H.S of
  • Assert Q from R.H.S
  • Backward chaining
  • Q, Match R.H.S of
  • assert P
  • Check if P exists
  • Resolution Refutation
  • Negate goal
  • Convert all pieces of knowledge into clausal form
    (disjunction of literals)
  • See if contradiction indicated by null clause
    can be derived

7
  • P
  • converted to
  • Draw the resolution tree (actually an inverted
    tree). Every node is a clausal form and branches
    are intermediate inference steps.

8
Terminology
  • Pair of clauses being resolved is called the
    Resolvents. The resulting clause is called the
    Resolute.
  • Choosing the correct pair of resolvents is a
    matter of search.

9
Predicate Calculus
  • Introduction through an example (Zohar Manna,
    1974)
  • Problem A, B and C belong to the Himalayan club.
    Every member in the club is either a mountain
    climber or a skier or both. A likes whatever B
    dislikes and dislikes whatever B likes. A likes
    rain and snow. No mountain climber likes rain.
    Every skier likes snow. Is there a member who is
    a mountain climber and not a skier?
  • Given knowledge has
  • Facts
  • Rules

10
Predicate Calculus Example contd.
  • Let mc denote mountain climber and sk denotes
    skier. Knowledge representation in the given
    problem is as follows
  • member(A)
  • member(B)
  • member(C)
  • ?xmember(x) ? (mc(x) ? sk(x))
  • ?xmc(x) ? like(x,rain)
  • ?xsk(x) ? like(x, snow)
  • ?xlike(B, x) ? like(A, x)
  • ?xlike(B, x) ? like(A, x)
  • like(A, rain)
  • like(A, snow)
  • Question ?xmember(x) ? mc(x) ? sk(x)
  • We have to infer the 11th expression from the
    given 10.
  • Done through Resolution Refutation.

11
Club example Inferencing
  • member(A)
  • member(B)
  • member(C)
  • Can be written as

12
  • Negate

13
  • Now standardize the variables apart which results
    in the following
  • member(A)
  • member(B)
  • member(C)

14
10
7
12
5
4
13
14
2
11
15
16
13
2
17
15
Assignment
  • Prove the inferencing in the Himalayan club
    example with different starting points, producing
    different resolution trees.
  • Think of a Prolog implementation of the problem
  • Prolog Reference (Prolog by Chockshin Melish)

16
Problem-2
  • From predicate calculus

17
A department environment
  • Dr. X is the HoD of CSE
  • Y and Z work in CSE
  • Dr. P is the HoD of ME
  • Q and R work in ME
  • Y is married to Q
  • By Institute policy staffs of the same department
    cannot marry
  • All married staff of CSE are insured by LIC
  • HoD is the boss of all staff in the department

18
Diagrammatic representation
CSE
ME
Dr. P
Dr. X
Z
Y
R
Q
married
19
Questions on department
  • Who works in CSE?
  • Is there a married person in ME?
  • Is there somebody insured by LIC?

20
Text Knowledge Representation
21
A Semantic Graph
The student bought a new computer in June.
22
UNL representation
Representation of Knowledge
Ram is reading the newspaper
23
UNL a United Nations project
Dave, Parikh and Bhattacharyya, Journal of
Machine Translation, 2002
  • Started in 1996
  • 10 year program
  • 15 research groups across continents
  • First goal generators
  • Next goal analysers (needs solving various
    ambiguity problems)
  • Current active language groups
  • UNL_French (GETA-CLIPS, IMAG)
  • UNL_Hindi (IIT Bombay with additional work on
    UNL_English)
  • UNL_Italian (Univ. of Pisa)
  • UNL_Portugese (Univ of Sao Paolo, Brazil)
  • UNL_Russian (Institute of Linguistics, Moscow)
  • UNL_Spanish (UPM, Madrid)

24
Knowledge Representation
UNL Graph - relations
read
agt
obj
Ram
newspaper
25
Knowledge Representation
UNL Graph - UWs
read(iclgtinterpret)
obj
agt
newspaper(iclgtprint_media)
Ram(iofgtperson)
26
Knowledge Representation
UNL graph - attributes
_at_entry _at_present _at_progress
read(iclgtinterpret)
obj
agt
_at_def
newspaper(iclgtprint_media)
Ram(iofgtperson)
Ram is reading the newspaper
27
The boy who works here went to school
Another Example
28
What do these examples show?
  • Logic systematizes the reasoning process
  • Helps identify what is mechanical/routine/automata
    ble
  • Brings to light the steps that only human
    intelligence can perform
  • These are especially of foundational and
    structural nature (e.g., deciding what
    propositions to start with)
  • Algorithmizing reasoning is not trivial

29
About the SA/GA assignments
30
Key points
  • 1. SA and GA are randomized search algorithms
         (a) why does one do randomized search?
         (b) To QUICKLY find a solution even if the
    the solution is not FULLY accurate2. For
    example, TSP is NP hard so any algorithm that
    purports to give the correct tour ALWAYS is going
    to take exponential amount of time.3. But it
    may be alright to get the solution certain
    percentage of time. Then one can use SA/GA.4.
    For sorting , consider getting the sorted
    sequences for any set of of numbers of any
    sequence length, say 200,000 numbers.

31
Key points cntd
  • 5. It may be OK to get an ALMOST sorted sequence
    QUICKLY so see if SA and GA can be used6. SO
    what is coming out strongly is TIME vs. ACCURACY
    TRADE-OFF7. THE ABOVE HAS TO COME OUT IN
    YOUR ASSIGNMENT8. What about 8 puzzle? Optimal
    path is not needed.

32
Key points cntd
  • 9. But you HAVE TO demonstrate randomness. That
    means Ther are times when the goal state will not
    be reached10. The above will be the case when
    randomness is INTRODUCED in the system by making
    the tempearure HIGH.11. Thus a key point of the
    assignment is the EFFECT OF HIGH TEMPERATURE on
    the system.12. Another point about the next
    state make sure you pick it up RANDOMLY and not
    deterministically.13. Think about the
    connection between BFS and random search. The
    former will guarantee finding the goal state, the
    latter not. But there may be gain in time
    complexity.
Write a Comment
User Comments (0)
About PowerShow.com