You are on page 1of 2

Government Engineering College, Modasa

Computer Engineering Department


B.E. Semester 7, Academic Year: 2021-22 (Odd Term)
3170716: Artificial Intelligence
Practical List

Sr. No. Practical

1. A. Write a prolog program to put facts indicating that sachin likes cricket,
saurav likes cricket, raj likes football, karan likes basketball, indra likes chess and
add rule that parth likes whatever saurav likes. Write goal for following queries:
a. Find the name of all players who like cricket.
b. Check whether raj likes cricket or not.
c. Display the list of all players with the game they like.
d. Display the name of players who likes any game except cricket.
B. Implement prolog program that asks username and password from user and
display whether login is successful or not according to knowledge base considered
in the program.
a. Perform above program without recursion.
b. Perform above program with recursion.
2. Implement following prolog programs.
a. To find the greatest variable among the three variables.
b. To find a factorial of a given number.
c. To check whether a given number is palindrome or not.
d. To check whether a given number is prime or not.
3. Write a separate prolog programs to demonstrate the fail and cut(!) predicates.
4. Write a prolog program for Medical Diagnosis system.
5. Implement following prolog programs based on list.
a. To display first element of a list.
b. To display last element of a list.
c. To display all element of a list
d. To display elements up to specified index of a list.
e. To count number of elements in a list.
f. To count odd and even elements of a list.
6. Implement following prolog programs based on list.
a. To copy one list to another list.
b. To append one list to another list.
c. To find intersection of two lists.
d. To find union of two lists.

3170716: Artificial Intelligence


7. Write a prolog program to solve water jug problem.
8. Write a prolog program to solve Tower of Hanoi problem.
9. Write a program to Implement A* Algorithm.
10. Write a program to solve N-Queens problem.
11. Write a program to solve 8 puzzle problem.
12. Write a program to solve travelling salesman problem.

3170716: Artificial Intelligence

You might also like