×
☰ Menu

Experiment No. 1

 

Study of Prolog Programming language and its Functions.

PROLOG-PROGRAMMING IN LOGIC PROLOG stands for Programming, In Logic - an idea that emerged in the early 1970's to use logic as the programming language. The early developers of this idea included Robert Kowalski at Edinburgh (on the theoretical side), Marrten van Emden at Edinburgh (experimental demonstration), and Alian Colmerauer at Marseilles (implementation). David D.H. Warren's efficient implementation at Edinburgh in the mid -1970s greatly contributed to the popularity of

PROLOG. PROLOG is a programming language centered around a small set of basic mechanisms Including pattern matching, tree-based data structuring, and automatic backtracking. This Small set constitutes a surprisingly powerful and flexible programming framework. PROLOG is especially well suited for problems that involve objects- in particular, structured objects- and relations between them. SYMBOLIC LANGUAGE PROLOG is a programming language for symbolic, non-numeric computation. It is especially well suited for solving problems that involve objects and relations between objects. For example, it is an easy exercise in prolog to express the spatial relationships between objects, such as the blue sphere is behind the green one. It is also easy to state a more general rule: if object X is closer to the observer than object Y. and object Y is closer than Z, then X must be closer than Z. PROLOG can reason about the spatial relationships and their consistency with respect to the general rule. Features like this make PROLOG a powerful language for Artificial Language Al,) and non-numerical programming. There are well-known examples of symbolic computation whose implementation in other standard languages took tens of pages of indigestible code, when the same algorithms were implemented in PROLOG, the result was a crystal-clear program easily fitting on one page. FACTS, RULES, AND QUERIES programming in PROLOG is accomplished by creating a database of facts and rules about objects, their properties, and their relationships to other objects. Queries then can be posed about the objects and valid conclusions will be determined and returned by the program Responses to user queries are determined through a form of inference control known as resolution.

FOR EXAMPLE:

a) FACTS: Some facts about family relationships could be written as: sister( sue, bill) parent( ann. sam) male(o) female( riya)

b) RULES: To represent the general rule for grandfather, we write: grand f.gher( X2) parent(X, Y) parent( Y,Z) male(X) c) QUERIES: Given a database of facts and rules such as that above, we may make queries by typing after a query a symbol'?' statements such as: ?-parent(X,sam) Xann ? grandfather(X, Y) X=jo, Y=sam

OUTCOME: Students will get the basic idea of how to program in prolog and its working environment

 

 


 

To Download Complete Artificial Intelligence Lab Manual Click Here

 

 Download Now 

 


Artificial Intelligence Lab, AKTU manual, 4th year, Computer Science and Engineering, Information Technology, Prolog, programming

Artificial Intelligence Lab (RCS752)

Artificial Intelligence Lab Manual AKTU

Artificial Intelligence Lab Manual using Prolog PDF

Artificial Intelligence Lab Notes Download