Question: 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
Get step-by-step solutions from verified subject matter experts
