1

Prolog question

view story
linux-howto

http://ubuntuforums.org – I need some help with a prolog question. Almost done with everything, just need help with a small pronlem. Question is to make a cooking program. I have some ingredients at home, and some recipes. Database has the following information: at_home([ingredient(rice,2), ingredient(water,10)]). recipe(boiled_rice,[ingredient(rice,4),ingredient(salt,3),ingredient(w ater,5)]). recipe(chicken,[ingredient(chicken,2),ingredient(salt,1),ingredien t(pepper,1)]). recipe(saltwater,[ingredient(salt,1),ingredient(water,3)]). recipe(noodles, [ingredient(noodles,2)|I1]) :- recipe(saltwater,I1). (Hardware)