AI Practical Solution GTU
LIST OF PRACTICALS
Sr. | Title of Practical | ANSWER |
1 | Write a program to implement Tic-Tac-Toe game problem. | Solution |
2 | Write a program to implement BFS (for 8 puzzle problem or Water Jug problem or any AI search problem) | Solution |
3 | Write a program to implement DFS (for 8 puzzle problem or Water Jug problem or any AI search problem) | Solution |
4 | Write a program to implement Single Player Game (Using any Heuristic Function) | Solution |
5 | Write a program to Implement A* Algorithm. | Solution |
6 | Write a program to implement mini-max algorithm for any game development. | Solution |
7 | Assume given a set of facts of the form father(name1,name2) (name1 is the father of name2). | Solution |
8 | Define a predicate brother(X,Y) which holds iff X and Y are brothers.
Define a predicate cousin(X,Y) which holds iff X and Y are cousins. Define a predicate grandson(X,Y) which holds iff X is a grandson of Y. Define a predicate descendent(X,Y) which holds iff X is a descendent of Y. Consider the following genealogical tree: father(a,b). father(a,c). father(b,d). father(b,e). father(c,f). Say which answers, and in which order, are generated by your definitions for the following queries in Prolog: ?- brother(X,Y). ?- cousin(X,Y). ?- grandson(X,Y). ?- descendent(X,Y). |
Solution |
9 | Write a program to solve Tower of Hanoi problem using Prolog. | Solution |
10 | Write a program to solve N-Queens problem using Prolog. | Solution |
11 | Write a program to solve 8 puzzle problem using Prolog. | Solution |
12 | Write a program to solve travelling salesman problem using Prolog. | Solution |