Skip to content

Prolog code for path in maze, list search and predicate relations

Notifications You must be signed in to change notification settings

paritoshmittal12/prolog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Prolog

Prolog is a logic programming language, that has immense scope particularly in the field of Artificial Intelligence. The project has three main sections to familiarize ourselvers with Prolog:

  • Task 1: It contains two simple prolog code to find halfsister and uncle relationships in given facts. Half-sister is a rule that depends upon certain relationships between siblings. This logic is coded in Prolog and user gets as input the logical outputs, yes or no. If query contains variable then it returns the matching fact satisfying the query.
  • Task 2: It contains a search application. Given two lists of student data, the prolog application searches for roll number or name provided as query. It retrives and displays the record from the database.
  • Task 3: The maze solving problem uses backtracking approach to find the path out of maze. It also has code to find the optimal path among all possible paths.

I used SWI-Prolog to compile and execute the codes. Install it using:

$ sudo add-apt-repository ppa:swi-prolog/stable
$ sudo apt-get update
$ sudo apt-get install swi-prolog

For the entire scope of this project, database is the hardcoded facts in the program.

About

Prolog code for path in maze, list search and predicate relations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages