Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please hand-in the answer to this question on Virtual Campus during your lab session but at the latest by Friday 6:00pm! Remember, your submission will
Please hand-in the answer to this question on Virtual Campus during your lab session but at the latest by Friday 6:00pm! Remember, your submission will only count if you have signed the lab attendance sheet. Given the following database:
% Decision to go skiing % trail conditions condition( skyline, green ). condition( burma, green ). condition( fortune, green ). condition( mcclosky, red ). % no time tuesday thursday CSI2120 available( monday ). available( wednesday ). available( friday ). % high temperatures temperature( mild, monday ). temperature( mild, tuesday ). temperature( verycold, wednesday ). temperature( cold, thursday ). temperature( warm, friday ). % available wax wax( green, verycold ). wax( blueExtra, mild ). wax( red, warm ). route( Col ) :- condition( skyline, Col ), condition( burma, Col ), condition( fortune, Col ).
% hard-wired lights connected(L) :- fuse(L, F), ok(F).
% plugged in lights connected(L) :- plug(L,S), fuse(S,F), ok(F).
Write a predicate goSki that returns true for a day D that you are available and have a wax of the right colour according the above database. You must also make sure that your preferred route skyline to burma to fortune is green. You do not want to ski if it is warm or very cold.
?- goSki(D,W). D = monday, W = blueExtra ; false.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started