cs621 artificial intelligence
Download
Skip this Video
Download Presentation
CS621: Artificial Intelligence

Loading in 2 Seconds...

play fullscreen
1 / 12

CS621: Artificial Intelligence - PowerPoint PPT Presentation


  • 88 Views
  • Uploaded on

CS621: Artificial Intelligence. Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 35–Himalayan Club example; introducing Prolog. Himalayan Club example. Introduction through an example (Zohar Manna, 1974):

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' CS621: Artificial Intelligence' - shaina


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
cs621 artificial intelligence

CS621: Artificial Intelligence

Pushpak BhattacharyyaCSE Dept., IIT Bombay

Lecture 35–Himalayan Club example; introducing Prolog

himalayan club example
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
example contd
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)
    • ∀x[member(x) → (mc(x) ∨ sk(x))]
    • ∀x[mc(x) → ~like(x,rain)]
    • ∀x[sk(x) → like(x, snow)]
    • ∀x[like(B, x) → ~like(A, x)]
    • ∀x[~like(B, x) → like(A, x)]
    • like(A, rain)
    • like(A, snow)
    • Question: ∃x[member(x) ∧ mc(x) ∧ ~sk(x)]
  • We have to infer the 11th expression from the given 10.
  • Done through Resolution Refutation.
club example inferencing
Club example: Inferencing
  • member(A)
  • member(B)
  • member(C)
    • Can be written as
slide6

member(A)

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

10

7

12

5

4

13

14

2

11

15

16

13

2

17

assignment
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)
introduction
Introduction
  • PROgramming in LOGic
  • Emphasis on what rather than how

Problem in Declarative Form

LogicMachine

Basic Machine

prolog s strong and weak points
Prolog’s 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
a typical prolog program
A Typical Prolog program

Compute_length ([],0).

Compute_length ([Head|Tail], Length):-

Compute_length (Tail,Tail_length),

Length is Tail_length+1.

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.

ad