Question: draw Search Tree for this Prolog code Codes containing facts, rules, and other required programming concepts for the implementation: Facts wet ( low ) .

draw Search Tree for this Prolog code
Codes containing facts, rules, and other required programming concepts for the implementation:
Facts
wet(low).
wet(medium).
wet(high).
temp(low).
temp(medium).
temp(high).
wind(high).
state(low, low).
state(low, medium).
state(low, high).
state(medium, low).
state(medium, medium).
state(medium, high).
state(high, low).
state(high, medium).
state(high, low, high).
weather(snow, low, low).
weather(mild, low, medium).
weather(dry, low, high).
weather(cold, medium, low).
weather(suny, medium, high).
weather(foggy, medium, medium).
weather(rainy, high, low).
weather(cloudy, high, medium).
weather(thunderStorm, high, low, high).
Rules:
weather(snow) :- wet(low), temp(low).
weather(mild) :- wet(low), temp(medium).
weather(dry) :- wet(low), temp(high).
weather(cold) :- wet(medium), temp(low).
weather(suny) :- wet(medium), temp(high).
weather(foggy) :- wet(medium), temp(medium).
weather(rainy) :- wet(high), temp(low).
weather(cloudy) :- wet(high), temp(medium).
weather(thunderStorm) :- wet(high), temp(low), wind(high).
snow :- state(low, low).
mild :- state(low, medium).
dry :- state(low, high).
cold :- state(medium, low).
suny :- state(medium, high).
foggy :- state(medium, medium).
rainy :- state(high, low).
cloudy :- state(high, medium).
thunderStorm :- state(high, low, high).
whatWeather(Wet, Temp, Weather) :- weather(Weather, Wet, Temp).
whatWeather(Wet, Temp, Wind, Weather) :- weather(Weather, Wet, Temp, Wind).
whatState(Weather, Wet, Temp) :- weather(Weather, Wet, Temp).
whatState(Weather, Wet, Temp, Wind) :- weather(Weather, Wet, Temp, Wind).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!