Department of Computer Science and Engineering Al-Falah School of Engineering and Technology Dhauj Faridabad Haryana-121001
INDEX
1. Syllabus 2. Hardware/Software Requirements 3. Practicals to be conducted in the lab 4. Programs
CSE-308 F Intelligent System L - T - P 2 Work Lab. Exam : 25 Marks Class 25 Marks Total 50 Marks Duration Exam 3 Hrs.
1. Study of PROLOG.
2. Write a program to solve 8 queens problem.
3. Solve any problem using depth first search.
4. Solve any problem using best first search.
5. Solve 8-puzzle problem using best first search
6. Solve Robot (traversal) problem using means End Analysis.
7. Solve traveling salesman problem.
HARDWARE REQUIRED
P-IV/III PROCESSOR HDD 40GB RAM 128MB or above
SOFTWARE REQUIRED
Window 98/2000/ME/XP Prolog
Practicals to be conducted in the lab
S. No. Title of experiment
1 Program to find the route distance between two cities 2 Program to implement tower of Hanoi 3 Program to calculate the factorial of a number. 4 Program to implement family relationships 5 Program To Logon Example With Recursion And No Repeat Predicate 6 Program to print the list of customers having different coloured cars with price and model available 7 Program to implement water jug problem 8 Program to implement breadth first search 9 Recursion In PROLOG 10 Queries
PROGRAM NO. 1
AIM: TO FIND THE ROUTE DISTANCE BETWEEN TWO CITIES DOMAINS Town = symbol Distance = integer
Clauses cust_names([jitander,preeti,veena,avinash,jyeshtha],green). cust_names([arvind,poonam,abhijeet],white). cust_names([daya,bhanu,anuradha,anju],red). model(red,[hyundai_accent,ford_monedo,indgo]). model(white,[maruti_esteem,maruti_baleno]). model(green,[toyota_avalon,lotus_elise]). model(green,[toyta_avalon,lotus_elise]). price(red,450000). price(white,350000). price(green,430000). cost(green):- cust_names(A,green),nl, write(A),nl, price(green,X),nl, write("the price of green color car is ",X),nl, model(green,Y),nl, write("the model available in green color ",Y),nl. cost(white):- cust_names(A,white),nl, write(A),nl, price (white,X),nl, write("the price of white color car is ",X),nl, model(blue,Y),nl, write(" the models available in white color ",Y),nl.
goal: write(" name list of customers who own green color car :-"),nl, cost(green). /*write("name list of customers who own red color car :-"),nl, cost(red). write("name list of customer who own white color car :-"),nl, cost(white). */
Output: name list of customers who own green color car :-
4l jug empty & 3l jug empty 4l jug empty & 3ljug 3l water 4l jug 3l water & 3l jug empty 4l jug 3l water& 3l jug 3l water 4l jug 3l water& 3l jug 3l water 4l jug 3l water& 3l jug 3l water 4l jug empty & 3l jug 2l water 4l jug 3l water& 3l jug 3l water 4l jug empty & 3l jug 2l water 4l jug 3l water& 3l jug 3l water Goal Achievedyes
PROGRAM NO. 8
AIM: TO IMPLEMENT BREADTH FIRST SEARCH
Domains W=Integer* Value=Integer
Predicates pop(W,W,Value) append(W,W,W) go checkbfs(W) test(Value,W,W)
Learn Python Programming for Beginners: Best Step-by-Step Guide for Coding with Python, Great for Kids and Adults. Includes Practical Exercises on Data Analysis, Machine Learning and More.
ChatGPT Side Hustles 2024 - Unlock the Digital Goldmine and Get AI Working for You Fast with More Than 85 Side Hustle Ideas to Boost Passive Income, Create New Cash Flow, and Get Ahead of the Curve
ChatGPT Money Machine 2024 - The Ultimate Chatbot Cheat Sheet to Go From Clueless Noob to Prompt Prodigy Fast! Complete AI Beginner’s Course to Catch the GPT Gold Rush Before It Leaves You Behind