CS621: Artificial Intelligence - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

CS621: Artificial Intelligence

Description:

CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 35 Himalayan Club example; introducing Prolog * * * * * Himalayan Club example ... – PowerPoint PPT presentation

Number of Views:95
Avg rating:3.0/5.0
Slides: 13
Provided by: cfd5
Category:

less

Transcript and Presenter's Notes

Title: CS621: Artificial Intelligence


1
CS621 Artificial Intelligence
  • Pushpak BhattacharyyaCSE Dept., IIT Bombay
  • Lecture 35Himalayan Club example introducing
    Prolog

2
Himalayan Club example
  • 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

3
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.

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

5
  • Negate

6
  • Now standardize the variables apart which results
    in the following
  1. member(A)
  2. member(B)
  3. member(C)

7
10
7
12
5
4
13
14
2
11
15
16
13
2
17
8
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)

9
Prolog
10
Introduction
  • PROgramming in LOGic
  • Emphasis on what rather than how

Problem in Declarative Form
Logic Machine
Basic Machine
11
Prologs strong and weak points
  • Assists thinking in terms of objects and entities
  • Not good for number crunching
  • Useful applications of Prolog in
  • Expert Systems (Knowledge Representation and
    Inferencing)
  • Natural Language Processing
  • Relational Databases

12
A Typical Prolog program
  • Compute_length (,0).
  • Compute_length (HeadTail, Length)-
  • Compute_length (Tail,Tail_length),
  • Length is Tail_length1.
  • High level explanation
  • The length of a list is 1 plus the length of the
    tail of the list, obtained by removing the first
    element of the list.
  • This is a declarative description of the
    computation.
Write a Comment
User Comments (0)
About PowerShow.com