Question: prolog programming Implement a system that plans breakfast, lunch, and dinner for one day, based upon the user's preferences. The system first asks the user
prolog programming
Implement a system that plans breakfast, lunch, and dinner for one day, based upon the user's preferences. The system first asks the user about his or her preferences by at least 3 questions. Then it runs an expert system to derive the menu for breakfast, lunch, and dinner IN THAT ORDER. You can ask any questions that you wish. The system should plan different menus depending on the answers, though it is okay to have the same menu for some answers.
food:- user, forward.
Implement the Prolog predicate user HERE. user asks questions, reads in the answers, and asserts the user's answers as facts.
and
Put your forward chaining rules here.
example :
?- food. Are you a vegetarian? (y or n): n. Do you eat beef? (y or n): y. Do you like fish? (y or n): y. ... etc. Derived: plan_breakfast Derived: eat_egg_biscuit_for_breakfast Derived: plan_lunch Derived: eat_beef_burger_for_lunch Derived: plan_dinner Derived: eat_fish_for_dinner No more facts true
Thank you !!!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
