Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % these are facts
- victim(mr_boddy).
- victim(cook).
- victim(motorist).
- victim(police_officer).
- victim(yvette).
- victim(singing_telegram).
- suspect(professor_plum).
- suspect(mrs_peacock).
- suspect(mrs_white).
- suspect(miss_scarlet).
- suspect(colonel_mustard).
- suspect(mr_green).
- suspect(wadsworth).
- weapon(wrench).
- weapon(candlestick).
- weapon(lead_pipe).
- weapon(knife).
- weapon(revolver).
- weapon(rope).
- room(hall).
- room(kitchen).
- room(lounge).
- room(library).
- room(billiard_room).
- murder(mr_boddy,candlestick,hall).
- murder(cook,knife,kitchen).
- murder(motorist,wrench,lounge).
- murder(police_officer,lead_pipe,library).
- murder(singing_telegram,revolver,hall).
- murder(yvette,rope,billiard_room).
- % nomotive(mr_boddy,wadsworth).
- motive(mr_boddy,professor_plum).
- motive(mr_boddy,mrs_peacock).
- motive(mr_boddy,mrs_white).
- motive(mr_boddy,miss_scarlet).
- motive(mr_boddy,colonel_mustard).
- motive(mr_boddy,mr_green).
- motive(cook,mrs_peacock).
- motive(motorist,colonel_mustard).
- motive(yvette,miss_scarlet).
- motive(yvette,colonel_mustard).
- motive(yvette,mrs_white).
- motive(police_officer,miss_scarlet).
- motive(singing_telegram,professor_plum).
- motive(singing_telegram,wadsworth).
- didntkill(yvette,colonel_mustard).
- didntkill(singing_telegram,professor_plum).
- didntkill(mr_boddy,mrs_peacock).
- didntkill(yvette,miss_scarlet).
- didntkill(cook,professor_plum).
- didntkill(mr_boddy,colonel_mustard).
- didntkill(mr_boddy,mrs_white).
- didntkill(mr_boddy,mr_green).
- didntkill(yvette,mr_green).
- didntkill(cook,mr_green).
- didntkill(motorist,mr_green).
- didntkill(singing_telegram,mr_green).
- didntkill(police_officer,mr_green).
- didntkill(mr_boddy,miss_scarlet).
- didntkill(singing_telegram,miss_scarlet).
- % rules
- % mortal(X) :- man(X).
- % husband(Person) :- married(Person), man(Person).
- % immortal(zeus).
- % man(zeus).
- % mortal(X) :- man(X), not(immortal(X)).
- % Update accuse to solve the murders.
- % Add more facts and rules as needed.
- % accuse(V,S),weapon(W),room(R) :- murder(V,W,R), suspect(S), motive(V,S), not(didntkill(V,S)).
- accuse(V,S) :- murder(V,_W,_R), suspect(S), motive(V,S), not(didntkill(V,S)).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement