Re: Re: Re: Re: Prolog - Relationship Analyze

From NAT, 6 Years ago, written in Prolog, viewed 974 times. This paste is a reply to Re: Re: Re: Prolog - Relationship Analyze from NAT - view diff
URL https://code.nat.moe/view/bd92f584 Embed
Download Paste or View Raw
  1. /* Dangerous Relationship */
  2. dangerous_couple(X,Y):-love(X,Y),love(X,Z),hate(Z,Y),not(Y=Z).
  3. dangerous_couple(X,Y):-love(X,Y),love(Y,X),love(X,Z),not(Y=Z).
  4. dangerous_friend(X,Y):-friend(X,Y),friend(X,Z),hate(Y,Z),not(Y=Z).
  5. dangerous_friend(X,Y):-friend(X,Y),love(X,Z),friend(Y,Z),not(Y=Z).
  6. dangerous_friend(X,Y):-friend(X,Y),love(X,Z),love(Y,Z),not(X=Z).
  7. dangerous_friend(X,Y):-friend(X,Y),love(X,Z),love(Z,Y),not(Y=Z).
  8. dangerous_love(X,Y):-couple(X,Z),love(Y,Z),not(X=Y).
  9. dangerous_love(X,Y,Z):-couple(X,Z),love(Y,Z),not(X=Y).
  10. enemy(X,Y):-love(X,Z),not(love(Z,X)),love(Z,Y).
  11. enemy(X,Y):-loved(X,Z),not(love(Z,X)),love(Z,Y).
  12. enemy(X,Y,Z):-love(X,Z),not(love(Z,X)),love(Z,Y).
  13. enemy(X,Y,Z):-loved(X,Z),not(love(Z,X)),love(Z,Y).
  14. /* Low Possible Relationship */
  15. low_possible_boom(X,Y):-low_possible_hate(X,Y),low_possible_hate(Y,X).
  16. low_possible_hate(X,Y):-friend(X,Z),hate(Z,Y).
  17. low_possible_hate(X,Y):-friend(X,Z),possiblehate(Z,Y).
  18. low_possible_hate(X,Y):-love(X,Z),hate(Z,Y).
  19. low_possible_hate(X,Y):-love(X,Z),possiblehate(Z,Y).
  20. low_possible_hate(X,Y):-possible_jealousy(X,Y).
  21. low_possible_hate(X,Y):-possible_love(X,Z),hate(Z,Y).
  22. low_possible_hate(X,Y):-possible_love(X,Z),possiblehate(Z,Y).
  23. low_possible_help(X,Y):-possible_friend(Y,X).
  24. low_possible_help(X,Y):-possiblelove(Y,X).
  25. low_possible_know(X,Y):-possible_friend(X,Y),not(know(X,Y)).
  26. low_possible_know(X,Y):-possible_know(X,Y).
  27. low_possible_know(X,Y):-possible_know(X,Z),possible_know(Y,Z),not(X=Y),not(know(X,Y)).
  28. low_possible_love(X,Y):-friend(X,Y),friend(X,Z),friend(Z,Y),not(Y=X),know(X,Y),not(hate(X,Y)),not(possiblehate(X,Y)),not(love(X,A)).
  29. low_possible_love(X,Y):-friend(X,Y),friend(X,Z),love(Z,Y),not(Y=X),know(X,Y),not(hate(X,Y)),not(possiblehate(X,Y)),not(love(X,A)).
  30. low_possible_love(X,Y):-friend(X,Y),friend(X,Z),possiblelove(Z,Y),not(Y=X),know(X,Y),not(hate(X,Y)),not(possiblehate(X,Y)),not(love(X,A)).
  31. low_possible_love(X,Y):-friend(X,Z),love(Z,Y),know(X,Y),not(hate(X,Y)),not(possiblehate(X,Y)).
  32. low_possible_love(X,Y):-friend(Z,X),hate(Y,Z),not(love(Y,X)),not(love(X,A)).
  33. low_possible_love(X,Y):-possible_love(Y,X).
  34. low_possible_uneqlove(X,Y):-low_possible_love(X,Y),not(love(Y,X)),not(low_possible_love(Y,X)).
  35. low_possible_uneqlove(X,Y):-possible_uneqlove(X,Y).
  36. low_unclear(X,Y):-friend(X,Y),love(Y,X),not(couple(X,Y)),not(unclear(X,Y)).
  37. low_unclear(X,Y):-friend(X,Y),low_possible_love(Y,X),not(couple(X,Y)),not(unclear(X,Y)).
  38. low_unclear(X,Y):-unclear(X,Y).
  39. low_unclearful(X,Y):-low_unclear(Y,X),low_unclear(Z,X),not(Y=Z).
  40. /* Misc Relationship */
  41. boom(X,Y):-hate(X,Y),hate(Y,X).
  42. compet(X,Y,Z):-love(X,Z),love(Y,Z),not(X=Y).
  43. competful(X,Y):-love(Y,X),love(Z,X),not(Y=Z).
  44. competful(X,Y):-possible_love(Y,X),love(Z,X),not(Y=Z).
  45. competful(X,Y):-possible_love(Y,X),possible_love(Z,X),not(Y=Z).
  46. couple(X,Y):-love(X,Y),love(Y,X).
  47. fakefriend(X,Y):-friend(X,Y),hate(Y,X).
  48. hate_many(X,Y,Z):-hate(X,Y),hate(X,Z),not(Y=Z).
  49. help(X,Y):-friend(Y,X),not(possible_hate(Y,X)),not(hate(Y,X)).
  50. help(X,Y):-love(Y,X),not(possible_hate(Y,X)),not(hate(Y,X)).
  51. jealousy(X,Y):-love(X,Z),not(love(Z,X)),friend(Z,Y),not(X=Y).
  52. jealousyable(X,Y,Z):-possible_love(X,Z),possible_love(Y,Z),not(X=Y).
  53. know(X,Y):-definedknow(X,Y).
  54. know(X,Y):-friend(X,Y).
  55. know(X,Y):-hate(Y,X).
  56. know(X,Y):-love(X,Y),not(friend(X,Y)).
  57. know(X,Y):-loved(X,Y),not(friend(X,Y)).
  58. know(X,Y):-possiblelove(X,Y),not(friend(X,Y)).
  59. know(X,Y):-uneqfriend(Y,X).
  60. know(X,Y):-uneqlove(X,Y).
  61. misunderstood(X,Y):-friend(Y,X),love(X,Y),not(friend(X,Y)).
  62. never(X,Y):-love(X,Y),hate(Y,X).
  63. play(X,Y):-love(X,Y),love(X,Z),not(Y=Z).
  64. play(X,Y):-loved(X,Y),love(X,Z),not(Y=Z).
  65. play(X,Y):-loved(X,Y),loved(X,Z),not(Y=Z).
  66. play(X,Y):-possiblelove(X,Y),love(X,Z),not(Y=Z).
  67. play(X,Y):-possiblelove(X,Y),possiblelove(X,Z),not(Y=Z).
  68. realfriend(X,Y):-friend(X,Y),friend(Y,X).
  69. 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)).
  70. unclear(X,Y):-friend(X,Y),love(Y,X),not(couple(X,Y)).
  71. unclear(X,Y):-friend(X,Y),possible_love(Y,X),not(couple(X,Y)).
  72. unclearful(X,Y):-unclear(Y,X),unclear(Z,X),not(Y=Z).
  73. uneqfriend(X,Y):-friend(X,Y),not(friend(Y,X)).
  74. uneqlove(X,Y):-love(X,Y),not(love(Y,X)).
  75. very_possible_couple_low_relationship(X,Y):-low_possible_love(X,Y),low_possible_love(Y,X).
  76. /* Possible Relationship */
  77. possible_boom(X,Y):-couple(X,Y),love(Y,Z),hate(X,Z).
  78. possible_compet(X,Y,Z):-possible_love(X,Z),love(Y,Z),not(X=Y).
  79. possible_compet(X,Y,Z):-possible_love(X,Z),possible_love(Y,Z),not(X=Y).
  80. possible_couple(X,Y):-friend(X,Y),love(X,Y),friend(Y,X).
  81. possible_couple(X,Y):-friend(Y,X),possible_love(X,Y).
  82. possible_couple(X,Y):-possible_friend(X,Y),love(X,Y),possible_friend(X,Y).
  83. possible_couple(X,Y):-possible_love(X,Y),possible_love(Y,X).
  84. possible_dangerous_couple(X,Y):-love(X,Y),love(X,Z),possiblehate(Z,Y),not(Y=Z).
  85. possible_dangerous_friend(X,Y):-friend(X,Y),friend(X,Z),possiblehate(Z,Y),not(Y=Z).
  86. possible_dangerous_friend(X,Y):-friend(X,Y),loved(X,Z),friend(Z,Y),not(Y=Z).
  87. possible_dangerous_friend(X,Y):-friend(X,Y),loved(X,Z),loved(Z,Y),not(Y=Z).
  88. possible_dangerous_friend(X,Y):-friend(X,Y),possible_love(X,Z),friend(Z,Y),not(Y=Z).
  89. possible_dangerous_friend(X,Y):-friend(X,Y),possible_love(X,Z),loved(Z,Y),not(Y=Z).
  90. possible_dangerous_friend(X,Y):-friend(X,Y),possible_love(X,Z),possible_love(Z,Y),not(Y=Z).
  91. possible_enemy(X,Y):-loved(X,Z),not(love(Z,X)),possible_love(Z,Y),not(X=Y).
  92. possible_enemy(X,Y):-possible_love(X,Z),not(love(Z,X)),love(Z,Y),not(X=Y).
  93. possible_enemy(X,Y):-possible_love(X,Z),not(love(Z,X)),possible_love(Z,Y),not(X=Y).
  94. possible_enemy(X,Y,Z):-loved(X,Z),not(love(Z,X)),possible_love(Z,Y),not(X=Y).
  95. possible_enemy(X,Y,Z):-possible_love(X,Z),not(love(Z,X)),love(Z,Y),not(X=Y).
  96. possible_enemy(X,Y,Z):-possible_love(X,Z),not(love(Z,X)),possible_love(Z,Y),not(X=Y).
  97. possible_fakefriend:-friend(X,Y),possiblehate(Y,X).
  98. possible_friend(X,Y):-friend(X,Z),friend(Z,Y),not(friend(X,Y)),not(X=Y).
  99. possible_friend(X,Y):-not(friend(X,Y)),love(Y,X).
  100. possible_friend(X,Y):-not(friend(X,Y)),possiblelove(Y,X).
  101. possible_hate(X,Y):-friend(X,Z),hate(Z,Y),know(X,Y),not(friend(X,Y)).
  102. possible_hate(X,Y):-friend(X,Z),hate(Z,Y),possible_know(X,Y),not(friend(X,Y)).
  103. possible_hate(X,Y):-love(X,Z),hate(Z,Y),know(X,Y),not(love(X,Y)).
  104. possible_hate(X,Y):-love(X,Z),hate(Z,Y),possible_know(X,Y),not(love(X,Y)).
  105. possible_hate(X,Y):-possible_enemy(X,Y).
  106. possible_hate(X,Y):-possible_love(X,Z),hate(Z,Y),know(X,Y),not(possiblelove(X,Y)).
  107. possible_hate(X,Y):-possible_love(X,Z),hate(Z,Y),possible_know(X,Y),not(possiblelove(X,Y)).
  108. possible_hate(X,Y):-possiblehate(X,Y).
  109. possible_hate_many(X,Y,Z):-low_possible_hate(X,Y),low_possible_hate(X,Z),not(possible_hate(X,Z)),not(Y=Z).
  110. possible_hate_many(X,Y,Z):-possible_hate(X,Y),possible_hate(X,Z),not(Y=Z).
  111. possible_help(X,Y):-friend(Y,X),not(possible_hate(Y,X)),not(hate(Y,X)).
  112. possible_help(X,Y):-love(Y,X),not(possible_hate(Y,X)),not(hate(Y,X)).
  113. possible_help(X,Y):-possible_friend(Y,X),not(possible_hate(Y,X)),not(hate(Y,X)).
  114. possible_help(X,Y):-possiblelove(Y,X),not(possible_hate(Y,X)),not(hate(Y,X)).
  115. possible_jealousy(X,Y):-jealousy(X,Y).
  116. possible_jealousy(X,Y):-loved(X,Z),not(love(Z,X)),friend(Z,Y),not(X=Y).
  117. possible_jealousy(X,Y):-possible_love(X,Z),not(love(Z,X)),friend(Z,Y),not(X=Y).
  118. possible_jealousyable(X,Y,Z):-low_possible_love(X,Z),low_possible_love(Y,Z),not(X=Y).
  119. possible_know(X,Y):-friend(X,Z),dangerous_friend(Z,Y),not(know(X,Y)),not(X=Y).
  120. possible_know(X,Y):-friend(X,Z),hate(Z,Y),not(know(X,Y)),not(X=Y).
  121. possible_know(X,Y):-friend(X,Z),love(Z,Y),not(know(X,Y)),not(X=Y).
  122. possible_know(X,Y):-friend(X,Z),loved(Z,Y),not(know(X,Y)),not(X=Y).
  123. possible_know(X,Y):-friend(X,Z),possible_dangerous_friend(Z,Y),not(know(X,Y)),not(X=Y).
  124. possible_know(X,Y):-friend(X,Z),possible_love(Z,Y),not(know(X,Y)),not(X=Y).
  125. possible_know(X,Y):-know(X,Y).
  126. possible_know(X,Y):-know(X,Y).
  127. possible_love(X,Y):-possiblelove(X,Y).
  128. possible_realfriend(X,Y):-possible_friend(X,Y),possible_friend(Y,X).
  129. possible_turefriend(X,Y):-possible_friend(X,Y),possible_friend(Y,X),not(love(X,Y)),not(love(Y,X)),not(possiblelove(X,Y)),not(possiblelove(Y,X)).
  130. possible_uneqlove(X,Y):-possible_love(X,Y),not(love(Y,X)),not(possible_love(Y,X)).
  131. possible_uneqlove(X,Y):-uneqlove(X,Y).
  132. very_possible_couple(X,Y):-possible_love(X,Y),possible_love(Y,X).
  133.  

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

Here you can reply to the paste above

captcha