Академический Документы
Профессиональный Документы
Культура Документы
101509014
Harshul Garg
MTX1 (Mechatronics; 4th year)
The user would like to know what his/her ideal bike would be.
CODE:
% To run, type go.
go :- hypothesize(Bike),
write('My ideal bike would be: '),
write(Bike), nl, undo.
/* hypotheses to be tested */
hypothesize(yamaha) :- yamaha, !.
hypothesize(suzuki) :- suzuki, !.
hypothesize(splendor) :- splendor, !.
hypothesize(pulsar) :- pulsar, !.
hypothesize(enfield) :- enfield, !.
hypothesize(renegade) :- renegade, !.
hypothesize(triumph) :- triumph, !.
hypothesize(unknown). /* no diagnosis */