Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i have a project it is about a restaurant system the code is written in prolog language (fact , rules , query) _______________________________________________________ what i

i have a project it is about a restaurant system the code is written in prolog language (fact , rules , query)

_______________________________________________________

what i need ?

Task 1: The report should include a brief description of the topic/problem, theoretical background, and a specific AI approach used to solve the problem. Also, show your design and explain your solution to the proposed problem.

Task 2: Write a code in Prolog based on the strategy used to solve the problem. Please form your problem as a knowledge-based system/ expert system that recommends or takes a decision or answers users questions. Write clear facts and rules Form eight to ten different queries that shows how your system works and answers users questions correctly.

Task 3: write clear comments that describe most of your code lines.

________________________________________________________

here is my code: answer the above requirements based on the below code

%Rules

choose('arrikah with milk and kleja',S,H,D,K):-S=saudi,H=healthy,D=yes,K=yes. choose('arrikah with milk and no kleja',S,H,D,K):-S=saudi,H=healthy,D=yes,K=no. choose('arrikah only',S,H,D,K):-S=saudi,H=healthy,D=no,K=no. choose('arrikah and kleja',S,H,D,K):-S=saudi,H=healthy,D=no,K=yes.

choose('maqlobah with milk and mamoual',S,H,D,K):-S=saudi,H=healthy,D=yes,K=yes. choose('maqlobah with milk',S,H,D,K):-S=saudi,H=healthy,D=yes,K=no. choose('maqlobah only',S,H,D,K):-S=saudi,H=healthy,D=no,K=no. choose('maqlobah and mamoual ',S,H,D,K):-S=saudi,H=healthy,D=no,K=yes.

choose('chicken rab with pepesi and apple pie from herfi',S,H,D,K):-S=saudi,H=fast,D=yes,K=yes. choose('chicken rab with pepesi and no apple pie from herfi',S,H,D,K):-S=saudi,H=fast,D=yes,K=no. choose('chicken rab only from herfi',S,H,D,K):-S=saudi,H=fast,D=no,K=no. choose('chicken rab with apple pie from herfi',S,H,D,K):-S=saudi,H=fast,D=no,K=yes.

choose('musahab with pepesi and souffl from al-baik',S,H,D,K):-S=saudi,H=fast,D=yes,K=yes. choose('musahab with pepesi and no souffl from al-baik',S,H,D,K):-S=saudi,H=fast,D=yes,K=no. choose('musahab only from al-baik',S,H,D,K):-S=saudi,H=fast,D=no,K=no. choose('musahab with no pepesi and with souffl from al-baik',S,H,D,K):-S=saudi,H=fast,D=no,K=yes.

choose('Lentil soup with orange juice and Tiramisu from La Pergola',S,H,D,K):-S=global,H=healthy,D=yes,K=yes. choose('Lentil soup with orange juice and no Tiramisu from La Pergola',S,H,D,K):-S=global,H=healthy,D=yes,K=no. choose('Lentil soup only from La Pergola',S,H,D,K):-S=global,H=healthy,D=no,K=no. choose('Lentil soup and Tiramisu from La Pergola',S,H,D,K):-S=global,H=healthy,D=no,K=yes.

choose('Chicken and Corn Chowder ,orange juice with Quinoa salad from veggie',S,H,D,K):-S=global,H=healthy,D=yes,K=yes. choose('Chicken and Corn Chowder ,orange juice with no Quinoa salad from veggie',S,H,D,K):-S=global,H=healthy,D=yes,K=no. choose('Chicken and Corn Chowder only from veggie',S,H,D,K):-S=global,H=healthy,D=no,K=no. choose('Chicken and Corn Chowder , Quinoa salad from veggie',S,H,D,K):-S=global,H=healthy,D=no,K=yes.

choose('chicken pizza with pepesi and cheesy sticks from pizzahut',S,H,D,K):-S=global,H=fast,D=yes,K=yes. choose('chicken pizza with pepesi from pizzahut',S,H,D,K):-S=global,H=fast,D=yes,K=no. choose('chicken pizza only from pizzahut',S,H,D,K):-S=global,H=fast,D=no,K=no. choose('chicken pizza and cheesy sticks from pizzahut',S,H,D,K):-S=global,H=fast,D=no,K=yes.

choose('classic burger with pepesi and salad from Popeyes Burger',S,H,D,K):-S=global,H=fast,D=yes,K=yes. choose('classic burger with pepesi and no salad from Popeyes Burger',S,H,D,K):-S=global,H=fast,D=yes,K=no. choose('classic burger only from Popeyes Burger',S,H,D,K):-S=global,H=fast,D=no,K=no. choose('classic burger and salad from Popeyes Burger',S,H,D,K):-S=global,H=fast,D=no,K=yes.

all(X):-write('the all Categoriese with additionals have in our resturant'),choose(X,,,,).

all_saudi(X):-choose(X,saudi,_,yes,yes). all_global(X):-choose(X,global,_,yes,yes).

all_healthy(X):-choose(X,_,healthy,no,no). all_fast(X):-choose(X,_,fast,no,no).

healthy_saudi(X):-choose(X,saudi,healthy,yes,yes). healthy_global(X):-choose(X,global,healthy,yes,yes).

fast_saudi(X):-choose(X,saudi,fast,yes,yes). fast_global(X):-choose(X,global,fast,yes,yes).

hi(X):-write('what meals do you want to show?saudi or global '),read(S),choose(X,S,,,_).

suggest(X):- write('saudi or global?'),read(S), write('healthy or fast food'),read(H), write('do you want deasert ? yes or no'),read(D),write('do you want drink?'),read(K), write('we think this will be suitable for you:'),choose(X,S,H,D,K).

_________________________________________________________________________________________

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Theory And Application Bio Science And Bio Technology International Conferences DTA And BSBT 2011 Held As Part Of The Future Generation In Computer And Information Science 258

Authors: Tai-hoon Kim ,Hojjat Adeli ,Alfredo Cuzzocrea ,Tughrul Arslan ,Yanchun Zhang ,Jianhua Ma ,Kyo-il Chung ,Siti Mariyam ,Xiaofeng Song

2011th Edition

ISBN: 3642271561, 978-3642271564

More Books

Students also viewed these Databases questions

Question

Describe the factors influencing of performance appraisal.

Answered: 1 week ago

Question

What is quality of work life ?

Answered: 1 week ago