Prolog - Relationship Analyze

From NAT, 6 Years ago, written in Prolog, viewed 1'031 times.
URL https://code.nat.moe/view/ae3226c2 Embed
Download Paste or View Raw
  1. couple(X,Y):-love(X,Y),love(Y,X).
  2. enemy(X,Y):-love(X,Z),not(love(Z,X)),love(Z,Y).
  3. enemy(X,Y):-loved(X,Z),not(love(Z,X)),love(Z,Y).
  4. possible_enemy(X,Y):-possiblelove(X,Z),not(love(Z,X)),love(Z,Y),not(X=Y).
  5. possible_enemy(X,Y):-loved(X,Z),not(love(Z,X)),possiblelove(Z,Y),not(X=Y).
  6. boom(X,Y):-hate(X,Y),hate(Y,X).
  7. jealousy(X,Y):-love(X,Z),not(love(Z,X)),friend(Z,Y),not(X=Y).
  8. possible_jealousy(X,Y):-possiblelove(X,Z),not(love(Z,X)),friend(Z,Y),not(X=Y).
  9. possible_jealousy(X,Y):-loved(X,Z),not(love(Z,X)),friend(Z,Y),not(X=Y).
  10. never(X,Y):-love(X,Y),hate(Y,X).
  11. uneqlove(X,Y):-love(X,Y),not(love(Y,X)).
  12. compet(X,Y):-love(X,Z),love(Y,Z).
  13. unclear(X,Y):-friend(X,Y),love(Y,X),not(couple(X,Y)).
  14. misunderstood(X,Y):-friend(Y,X),love(X,Y),not(friend(X,Y)).
  15. possible_couple(X,Y):-friend(X,Y),love(X,Y),friend(Y,X).
  16. possible_couple(X,Y):-possible_friend(X,Y),love(X,Y),possible_friend(X,Y).
  17. possible_couple(X,Y):-friend(Y,X),possiblelove(X,Y).
  18. possible_couple(X,Y):-possiblelove(X,Y),possiblelove(Y,X).
  19. play(X,Y):-love(X,Y),love(X,Z),not(Y=Z).
  20. realfriend(X,Y):-friend(X,Y),friend(Y,X).
  21. turefriend(X,Y):-friend(X,Y),friend(Y,X),not(love(X,Y)),not(love(Y,X)),not(possiblelove(X,Y)),not(possiblelove(Y,X)).
  22. uneqfriend(X,Y):-friend(X,Y),not(friend(Y,X)).
  23. fakefriend(X,Y):-friend(X,Y),hate(Y,X).
  24. dangerous_friend(X,Y):-friend(X,Y),love(X,Z),love(Z,Y),not(Y=Z).
  25. dangerous_friend(X,Y):-friend(X,Y),love(X,Z),friend(Z,Y),not(Y=Z).
  26. dangerous_friend(X,Y):-friend(X,Y),friend(X,Z),hate(Z,Y),not(Y=Z).
  27. possible_dangerous_friend(X,Y):-friend(X,Y),possiblelove(X,Z),possiblelove(Z,Y),not(Y=Z).
  28. possible_dangerous_friend(X,Y):-friend(X,Y),possiblelove(X,Z),friend(Z,Y),not(Y=Z).
  29. possible_dangerous_friend(X,Y):-friend(X,Y),possiblelove(X,Z),loved(Z,Y),not(Y=Z).
  30. possible_dangerous_friend(X,Y):-friend(X,Y),loved(X,Z),friend(Z,Y),not(Y=Z).
  31. possible_dangerous_friend(X,Y):-friend(X,Y),loved(X,Z),loved(Z,Y),not(Y=Z).
  32. possible_friend(X,Y):-friend(X,Z),friend(Z,Y),not(friend(X,Y)),not(X=Y).

Replies to Prolog - Relationship Analyze rss

Title Name Language When
Re: Prolog - Relationship Analyze NAT prolog 6 Years ago.

Reply to "Prolog - Relationship Analyze"

Here you can reply to the paste above

captcha