Re: Re: Prolog - Relationship Analyze

From NAT, 6 Years ago, written in Prolog, viewed 813 times. This paste is a reply to Re: Prolog - Relationship Analyze from NAT - view diff
URL https://code.nat.moe/view/bd698e88 Embed
Download Paste or View Raw
  1. couple(X,Y):-love(X,Y),love(Y,X).
  2. dangerous_couple(X,Y):-love(X,Y),love(Y,X),love(X,Z),not(Y=Z).
  3. dangerous_couple(X,Y):-love(X,Y),love(X,Z),hate(Z,Y),not(Y=Z).
  4. possible_dangerous_couple(X,Y):-love(X,Y),love(X,Z),possiblehate(Z,Y),not(Y=Z).
  5. dangerous_love(X,Y,Z):-couple(X,Z),love(Y,Z),not(X=Y).
  6. enemy(X,Y):-love(X,Z),not(love(Z,X)),love(Z,Y).
  7. enemy(X,Y):-loved(X,Z),not(love(Z,X)),love(Z,Y).
  8. possible_enemy(X,Y):-possiblelove(X,Z),not(love(Z,X)),love(Z,Y),not(X=Y).
  9. possible_enemy(X,Y):-loved(X,Z),not(love(Z,X)),possiblelove(Z,Y),not(X=Y).
  10. boom(X,Y):-hate(X,Y),hate(Y,X).
  11. possible_boom(X,Y):-couple(X,Y),love(Y,Z),hate(X,Z).
  12. jealousy(X,Y):-love(X,Z),not(love(Z,X)),friend(Z,Y),not(X=Y).
  13. possible_jealousy(X,Y):-possiblelove(X,Z),not(love(Z,X)),friend(Z,Y),not(X=Y).
  14. possible_jealousy(X,Y):-loved(X,Z),not(love(Z,X)),friend(Z,Y),not(X=Y).
  15. never(X,Y):-love(X,Y),hate(Y,X).
  16. uneqlove(X,Y):-love(X,Y),not(love(Y,X)).
  17. uneqplove(X,Y):-possiblelove(X,Y),not(love(Y,X)),not(possiblelove(Y,X)).
  18. compet(X,Y,Z):-love(X,Z),love(Y,Z),not(X=Y).
  19. possible_compet(X,Y,Z):-possiblelove(X,Z),love(Y,Z),not(X=Y).
  20. possible_compet(X,Y,Z):-possiblelove(X,Z),possiblelove(Y,Z),not(X=Y).
  21. competful(X,Y):-love(Y,X),love(Z,X),not(Y=Z).
  22. competful(X,Y):-possiblelove(Y,X),love(Z,X),not(Y=Z).
  23. competful(X,Y):-possiblelove(Y,X),possiblelove(Z,X),not(Y=Z).
  24. unclear(X,Y):-friend(X,Y),love(Y,X),not(couple(X,Y)).
  25. unclear(X,Y):-friend(X,Y),possiblelove(Y,X),not(couple(X,Y)).
  26. unclearful(X,Y):-unclear(Y,X),unclear(Z,X),not(Y=Z).
  27. misunderstood(X,Y):-friend(Y,X),love(X,Y),not(friend(X,Y)).
  28. possible_couple(X,Y):-friend(X,Y),love(X,Y),friend(Y,X).
  29. possible_couple(X,Y):-possible_friend(X,Y),love(X,Y),possible_friend(X,Y).
  30. possible_couple(X,Y):-friend(Y,X),possiblelove(X,Y).
  31. possible_couple(X,Y):-possiblelove(X,Y),possiblelove(Y,X).
  32. play(X,Y):-love(X,Y),love(X,Z),not(Y=Z).
  33. play(X,Y):-possiblelove(X,Y),love(X,Z),not(Y=Z).
  34. play(X,Y):-possiblelove(X,Y),possiblelove(X,Z),not(Y=Z).
  35. play(X,Y):-loved(X,Y),love(X,Z),not(Y=Z).
  36. play(X,Y):-loved(X,Y),loved(X,Z),not(Y=Z).
  37. realfriend(X,Y):-friend(X,Y),friend(Y,X).
  38. 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)).
  39. uneqfriend(X,Y):-friend(X,Y),not(friend(Y,X)).
  40. fakefriend(X,Y):-friend(X,Y),hate(Y,X).
  41. possible_fakefriend:-friend(X,Y),possiblehate(Y,X).
  42. dangerous_friend(X,Y):-friend(X,Y),love(X,Z),love(Z,Y),not(Y=Z).
  43. dangerous_friend(X,Y):-friend(X,Y),love(X,Z),love(Y,Z),not(X=Z).
  44. dangerous_friend(X,Y):-friend(X,Y),love(X,Z),friend(Z,Y),not(Y=Z).
  45. dangerous_friend(X,Y):-friend(X,Y),friend(X,Z),hate(Z,Y),not(Y=Z).
  46. possible_dangerpus_froend(X,Y):-friend(X,Y),friend(X,Z),possiblehate(Z,Y),not(Y=Z).
  47. possible_dangerous_friend(X,Y):-friend(X,Y),possiblelove(X,Z),possiblelove(Z,Y),not(Y=Z).
  48. possible_dangerous_friend(X,Y):-friend(X,Y),possiblelove(X,Z),friend(Z,Y),not(Y=Z).
  49. possible_dangerous_friend(X,Y):-friend(X,Y),possiblelove(X,Z),loved(Z,Y),not(Y=Z).
  50. possible_dangerous_friend(X,Y):-friend(X,Y),loved(X,Z),friend(Z,Y),not(Y=Z).
  51. possible_dangerous_friend(X,Y):-friend(X,Y),loved(X,Z),loved(Z,Y),not(Y=Z).
  52. possible_friend(X,Y):-friend(X,Z),friend(Z,Y),not(friend(X,Y)),not(X=Y).
  53. possible_friend(X,Y):-not(friend(X,Y)),love(Y,X).
  54. possible_friend(X,Y):-not(friend(X,Y)),possiblelove(Y,X).
  55. know(X,Y):-friend(X,Y).
  56. know(X,Y):-loved(X,Y),not(friend(X,Y)).
  57. know(X,Y):-possiblelove(X,Y),not(friend(X,Y)).
  58. know(X,Y):-love(X,Y),not(friend(X,Y)).
  59. know(X,Y):-uneqlove(X,Y).
  60. know(X,Y):-uneqfriend(Y,X).
  61. know(X,Y):-hate(Y,X).
  62. possible_know(X,Y):-possible_friend(X,Y),not(know(X,Y)).
  63. possible_know(X,Y):-friend(X,Z),love(Z,Y),not(know(X,Y)),not(X=Y).
  64. possible_know(X,Y):-friend(X,Z),hate(Z,Y),not(know(X,Y)),not(X=Y).
  65. possible_know(X,Y):-friend(X,Z),loved(Z,Y),not(know(X,Y)),not(X=Y).
  66. possible_know(X,Y):-friend(X,Z),possiblelove(Z,Y),not(know(X,Y)),not(X=Y).
  67. possible_know(X,Y):-friend(X,Z),dangerous_friend(Z,Y),not(know(X,Y)),not(X=Y).
  68. possible_know(X,Y):-friend(X,Z),possible_dangerous_friend(Z,Y),not(know(X,Y)),not(X=Y).
  69. possible_hate(X,Y):-possiblehate(X,Y).
  70. possible_hate(X,Y):-possible_enemy(X,Y).
  71. possible_hate(X,Y):-friend(X,Z),hate(Z,Y),know(X,Y),not(friend(X,Y)).
  72. possible_hate(X,Y):-friend(X,Z),hate(Z,Y),possible_know(X,Y),not(friend(X,Y)).
  73. possible_hate(X,Y):-love(X,Z),hate(Z,Y),know(X,Y),not(love(X,Y)).
  74. possible_hate(X,Y):-love(X,Z),hate(Z,Y),possible_know(X,Y),not(love(X,Y)).
  75. possible_hate(X,Y):-possiblelove(X,Z),hate(Z,Y),know(X,Y),not(possiblelove(X,Y)).
  76. possible_hate(X,Y):-possiblelove(X,Z),hate(Z,Y),possible_know(X,Y),not(possiblelove(X,Y)).
  77. possible_love(X,Y):-possiblelove(X,Y).
  78. possible_love(X,Y):-friend(X,Y),friend(X,Z),love(Z,Y),not(Y=X),know(X,Y),not(hate(X,Y)),not(possible_hate(X,Y)).
  79. possible_love(X,Y):-friend(X,Y),friend(X,Z),possiblelove(Z,Y),not(Y=X),know(X,Y),not(hate(X,Y)),not(possible_hate(X,Y)).
  80. possible_love(X,Y):-friend(X,Z),love(Z,Y),know(X,Y),not(hate(X,Y)),not(possible_hate(X,Y)).
  81. possible_love_infer(X,Y):-possible_love(X,Y),not(possiblelove(X,Y)).
  82. low_possible_hate(X,Y):-possible_jealousy(X,Y).
  83. low_possible_hate(X,Y):-friend(X,Z),hate(Z,Y).
  84. low_possible_hate(X,Y):-love(X,Z),hate(Z,Y).
  85. low_possible_hate(X,Y):-possiblelove(X,Z),hate(Z,Y).
  86. low_possible_hate(X,Y):-friend(X,Z),possiblehate(Z,Y).
  87. low_possible_hate(X,Y):-love(X,Z),possiblehate(Z,Y).
  88. low_possible_hate(X,Y):-possiblelove(X,Z),possiblehate(Z,Y).
  89. hate_many(X,Y,Z):-hate(X,Y),hate(X,Z),not(Y=Z).
  90. possible_hate_many(X,Y,Z):-possible_hate(X,Y),possible_hate(X,Z),not(Y=Z).
  91. possible_hate_many(X,Y,Z):-low_possible_hate(X,Y),low_possible_hate(X,Z),not(possible_hate(X,Z)),not(Y=Z).
  92. help(X,Y):-friend(Y,X),not(possible_hate(Y,X)),not(hate(Y,X)).
  93. help(X,Y):-love(Y,X),not(possible_hate(Y,X)),not(hate(Y,X)).
  94. possible_help(X,Y):-friend(Y,X),not(possible_hate(Y,X)),not(hate(Y,X)).
  95. possible_help(X,Y):-love(Y,X),not(possible_hate(Y,X)),not(hate(Y,X)).
  96. possible_help(X,Y):-possiblelove(Y,X),not(possible_hate(Y,X)),not(hate(Y,X)).
  97. possible_help(X,Y):-possible_friend(Y,X),not(possible_hate(Y,X)),not(hate(Y,X)).
  98. low_possible_help(X,Y):-possiblelove(Y,X).
  99. low_possible_help(X,Y):-possible_friend(Y,X).
  100. possible_error(X,Y):-friend(X,Y),possiblehate(X,Y).

Replies to Re: Re: Prolog - Relationship Analyze rss

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

Reply to "Re: Re: Prolog - Relationship Analyze"

Here you can reply to the paste above

captcha