Skip to content

In this repository, you'll find Prolog code covering a range of questions, all designed to aid your learning journey.

License

Notifications You must be signed in to change notification settings

abhyuday1212/Prolog-Programs

Repository files navigation

Prolog Programs

Welcome to the Prolog Program Repository, an exceptional compilation of powerful programs designed to harness the full potential of Prolog programming. This repository is a dedicated space where logic comes to life, offering a diverse array of Prolog programs tailored to elevate your coding experience and enable sophisticated problem-solving in the realm of artificial intelligence, knowledge representation, and more.

Installation

git clone https://github.com/abhyuday1212/Prolog-Programs.git

Platform Requirements / IDE's

  • You can simply Go to the below mentioned website and run these codes (Recommended).
https://swish.swi-prolog.org/
  • You Can Also Download the Swi-Prolog from this website.
https://www.swi-prolog.org/download/devel

Special Mentions

  • In this repository, you'll discover code contributions from the exceptional Prolog programmer and my good friend, [Shreyansh]. We express our heartfelt gratitude for his outstanding contributions. Thank you for being an invaluable part of this collaborative endeavor.

  • You can Connect him here.

  • Github

  • Linkedin

Queries for the programs to run

1.1 #1_Start.pl

related(ai,machineLearning).
related(prolog,naturalLanguageProcessing).
related(ai,naturalLanguageProcessing).

1.2 Cube.pl

Cube.

1.3 Dfs.pl

start.

1.4 Factorial.pl

fact(5,Result).
fact(6,X).
fact(10,Y).

1.5 Fibbonacci.pl

series(4).
series(6).
series(8).

1.6 List_Operations.pl

list_delete(Elem, [1, 2, 3, 4], Result).
list_insert(Elem, [1, 2, 3], Result).
list_delete(Elem, [], Result).
list_insert(Elem, [], Result).

1.7 Medical.pl

input.

1.8 Monkey_Banana.pl

go.
attempt(4, 10, 5, 2, 3).

1.9 N_Queen.pl

four_queens(Board).

1.10 Temprature_Conversion.pl

temp.

1.11 Tower_of_hanoi.pl

move(3, 'A', 'C', 'B').
move(2, 'A', 'C', 'B').
move(4, 'A', 'C', 'B').
move(5, 'A', 'B', 'C').

1.12 Water_Jug.pl

water_jug(0, 0).

  • Explore different actions with 4L jug full and 3L jug empty:
water_jug(4, 0).

  • Explore different actions with 4L jug empty and 3L jug full:
water_jug(0, 3).

  • Explore different actions with both jugs partially filled:
water_jug(2, 1).

  • Explore different actions with both jugs at their maximum capacity:
water_jug(4, 3).

You can Connect me here.

About

In this repository, you'll find Prolog code covering a range of questions, all designed to aid your learning journey.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages