Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Basics of Artificial intelligence ch-14

Rating
-
Sold
-
Pages
15
Uploaded on
17-04-2023
Written in
2022/2023

These AI class notes cover various subfields of artificial intelligence, including machine learning, deep learning, natural language processing, and computer vision. They provide an in-depth understanding of AI and its potential to revolutionize industries and improve our daily lives. These notes are ideal for students, professionals, and anyone interested in AI. With the increasing demand for AI skills in various industries, these notes can be valuable in enhancing your knowledge and staying ahead of the curve.

Show more Read less
Institution
Course

Content preview

LJIET 2020

Chapter 14: Introduction to prolog
14.1 Converting English to Prolog:

Here are few sentences converted into PROLOG.

English: PROLOG:

The cakes are Delicious. delicious(cakes).

The pickles are delicious. delicious(pickles).

Biryani is delicious. delicious(biryani).

The pickles are spicy. spicy(pickles).

Priya relishes Coffee. relishes(priya,coffee).

Priya likes food if they are delicious. likes(priya,Food):-delicious(Food).

Prakash likes food if they are spicy and likes(prakash,Food):-
delicious. spicy(Food),delicious(Food).



In PROLOG:
Ifs have been replaced by (:-).
Commas have been replaced by (,).
Rule and Goal is terminated by a (.).
Comments could be of any of the following forms:
%this comments only this line.
/* this comments everything in between the asterisks and the slashes. */




KINJAL PATEL[AI-Introduction to Prolog] Page 1

, LJIET 2020

14.2 Goals:
Now compile the program.

 Suppose we wish to ask the program:
“Which food items are delicious?”
 This, in PROLOG terminology, is called GOAL and is presented on the ?-
prompt as :
?-delicious(Food).
Food = cakes
Press ; to get the remaining alternatives for Food viz.
Food = pickles;
Food = biryani

 Try the goal:
?-likes (priya , Food).
Food = cakes;
Food = pickles;
Food = biryani

 You could ask other questions like:
 Who relishes coffee and also likes pickles?
 Using goal given below:
?-relishes(Who , coffee),likes(Who , pickles).
Who = priya

14.3 Prolog Terminology
1. Predicates:
A predicate name is the symbol used to define a relation.

For instance: relishes(priya , coffee) where relishes is predicate while the
contents within viz. priya and coffee comprise its arguments.

2. Clauses:
Clauses are the actual rules and facts that constitute the PROLOG program.


KINJAL PATEL[AI-Introduction to Prolog] Page 2

Written for

Course

Document information

Uploaded on
April 17, 2023
Number of pages
15
Written in
2022/2023
Type
Class notes
Professor(s)
Unknown
Contains
All classes

Subjects

$7.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
Saumilpatel

Also available in package deal

Get to know the seller

Seller avatar
Saumilpatel LJIET
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
15
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions