0% found this document useful (0 votes)
10 views3 pages

T1 04 Exp8

The document discusses the use of PROLOG as an AI programming language, highlighting its declarative nature and key features such as unification, backtracking, and recursion. It outlines the advantages and disadvantages of PROLOG, along with its applications in various fields like natural language understanding and expert systems. The document also includes sample code demonstrating simple PROLOG programs and concludes with the successful implementation of these programs.

Uploaded by

stashbox45
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

T1 04 Exp8

The document discusses the use of PROLOG as an AI programming language, highlighting its declarative nature and key features such as unification, backtracking, and recursion. It outlines the advantages and disadvantages of PROLOG, along with its applications in various fields like natural language understanding and expert systems. The document also includes sample code demonstrating simple PROLOG programs and concludes with the successful implementation of these programs.

Uploaded by

stashbox45
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

EXPERIMENT 8 NAME: SANNIT AREKAR

ROLL NO: 4

BATCH: T11

AIM: Write simple programs using PROLOG as an AI


programming language

THEORY:
1. What is PROLOG:
● Prolog stands for programming in logic. In the logic programming
paradigm, prolog language is most widely available. Prolog is a
declarative language, which means that a program consists of data based
on the facts and rules (Logical relationship) rather than computing how
to find a solution. A logical relationship describes the relationships
which hold for the given application.
● To obtain the solution, the user asks a question rather than running a
program. When a user asks a question, then to determine the answer, the
run time system searches through the database of facts and rules.
● The first Prolog was 'Marseille Prolog', which is based on work by
Colmerauer. The major example of fourth-generation programming
language was prolog. It supports the declarative programming
paradigm.
● Prolog is a declarative language that means we can specify what

problem we want to solve rather than how to solve it.

● In artificial intelligence applications, prolog is used. The artificial

intelligence applications can be automated reasoning systems, natural


language interfaces, and expert systems. The expert system consists of
an interface engine and a database of facts. The prolog's run time system
provides the service of an interface engine.
Key Features :
1. Unification : The basic idea is, can the given terms be made to
represent the same structure.
2. Backtracking : When a task fails, prolog traces backwards and
tries to satisfy the previous task.
3. Recursion : Recursion is the basis for any search in a program.
Advantages : akes it easier to play with any algorithm
involving lists.

Disadvantages :
1.LISP (another logic programming language) dominates over
prolog with respect to I/O features.
2. Sometimes input and output is not easy.

Applications :

○ Specification Language

○ Robot Planning

○ Natural language understanding

○ Machine Learning

○ Problem Solving

○ Intelligent Database retrieval

○ Expert System

○ Automated Reasoning

CODE:
happy(lili) :- dances(lili). hungry(tom) :-
search_for_food(tom). friends(jack, bili) :-
lovesCricket(jack), lovesCricket(bili).
goToPlay(ryan) :- isClosed(school), free(ryan).
cat(tom). loves_to_eat(kunal,pasta).
of_color(hair,black).
loves_to_play_games(nawaz). lazy(pratyusha).

OUTPUT:

CONCLUSION: Hence we have implemented simple


programs using PROLOG as an AI programming language.

You might also like