Back
README
DSC-16: Artificial Intelligence - Practicals
Welcome to the collection of practical assignments for the Artificial Intelligence course. This repository contains implementations for various logic-based problems and algorithms using Prolog.
🛠️ Environment Setup
This project uses Prolog. We recommend using SWI-Prolog for running these programs.
Quick Setup:
- Install SWI-Prolog: Download and install from swi-prolog.org.
- Load the File: Open the terminal in this directory and run:
```prolog
?- [practical].
```
(Note: Ensure you are loading the .pl file)
- Run Queries: After loading, you can start querying predicates like
father(john, X).orfactorial(5, F).
👉 Click here for detailed Documentation and Examples
📅 List of Practicals
This repository covers the following 15 practicals as implemented in Practical.pl:
- Family Tree Implementation - Define family relationships using facts and rules.
- List Concatenation - Concatenate two lists into a third list.
- List Reversal - Reverse the elements of a list.
- Sum of Two Numbers - Calculate the sum of two numerical values.
- Maximum of Two Numbers - Find the larger of two numbers.
- Factorial - Compute the factorial of a given number.
- Fibonacci Series - Generate the Nth Fibonacci number.
- Power Function - Calculate the power (Num^Pow).
- Multiplication - Implement multiplication through recursive addition.
- Membership Check - Check if an element is a member of a list.
- Sum of List - Calculate the total sum of elements in a list.
- Even/Odd Length - Determine if the length of a list is even or odd.
- Maximum in List - Find the maximum value within a list.
- Insert at Position - Insert an item at a specific index in a list.
- Delete at Position - Remove an element from a specific index in a list.
<p align="right">
<i>Developed with ❤️ by <a href="https://github.com/16ratneshkumar">16ratneshkumar</a></i>
</p>