Re: Re: Re: Prolog - Relationship Analyze

From NAT, 6 Years ago, written in Prolog, viewed 1'012 times. This paste is a reply to Re: Re: Prolog - Relationship Analyze from NAT - view diff
URL https://code.nat.moe/view/b1ae9afb 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,Z):-couple(X,Z),love(Y,Z),not(X=Y).
  9. dangerous_love(X,Y):-couple(X,Z),love(Y,Z),not(X=Y).
  10. enemy(X,Y,Z):-love(X,Z),not(love(Z,X)),love(Z,Y).
  11. enemy(X,Y,Z):-loved(X,Z),not(love(Z,X)),love(Z,Y).
  12. enemy(X,Y):-love(X,Z),not(love(Z,X)),love(Z,Y).
  13. enemy(X,Y):-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_love(X,Y):-possible_love(Y,X).
  26. 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)).
  27. low_possible_love(X,Y):-friend(Z,X),hate(Y,Z),not(love(Y,X)).
  28. /* Misc Relationship */
  29. boom(X,Y):-hate(X,Y),hate(Y,X).
  30. compet(X,Y,Z):-love(X,Z),love(Y,Z),not(X=Y).
  31. competful(X,Y):-love(Y,X),love(Z,X),not(Y=Z).
  32. competful(X,Y):-possible_love(Y,X),love(Z,X),not(Y=Z).
  33. competful(X,Y):-possible_love(Y,X),possible_love(Z,X),not(Y=Z).
  34. couple(X,Y):-love(X,Y),love(Y,X).
  35. fakefriend(X,Y):-friend(X,Y),hate(Y,X).
  36. hate_many(X,Y,Z):-hate(X,Y),hate(X,Z),not(Y=Z).
  37. help(X,Y):-friend(Y,X),not(possible_hate(Y,X)),not(hate(Y,X)).
  38. help(X,Y):-love(Y,X),not(possible_hate(Y,X)),not(hate(Y,X)).
  39. jealousy(X,Y):-love(X,Z),not(love(Z,X)),friend(Z,Y),not(X=Y).
  40. know(X,Y):-friend(X,Y).
  41. know(X,Y):-hate(Y,X).
  42. know(X,Y):-love(X,Y),not(friend(X,Y)).
  43. know(X,Y):-loved(X,Y),not(friend(X,Y)).
  44. know(X,Y):-possiblelove(X,Y),not(friend(X,Y)).
  45. know(X,Y):-uneqfriend(Y,X).
  46. know(X,Y):-uneqlove(X,Y).
  47. misunderstood(X,Y):-friend(Y,X),love(X,Y),not(friend(X,Y)).
  48. never(X,Y):-love(X,Y),hate(Y,X).
  49. play(X,Y):-love(X,Y),love(X,Z),not(Y=Z).
  50. play(X,Y):-loved(X,Y),love(X,Z),not(Y=Z).
  51. play(X,Y):-loved(X,Y),loved(X,Z),not(Y=Z).
  52. play(X,Y):-possiblelove(X,Y),love(X,Z),not(Y=Z).
  53. play(X,Y):-possiblelove(X,Y),possiblelove(X,Z),not(Y=Z).
  54. realfriend(X,Y):-friend(X,Y),friend(Y,X).
  55. 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)).
  56. unclear(X,Y):-friend(X,Y),love(Y,X),not(couple(X,Y)).
  57. unclear(X,Y):-friend(X,Y),possiblelove(Y,X),not(couple(X,Y)).
  58. unclearful(X,Y):-unclear(Y,X),unclear(Z,X),not(Y=Z).
  59. uneqfriend(X,Y):-friend(X,Y),not(friend(Y,X)).
  60. uneqlove(X,Y):-love(X,Y),not(love(Y,X)).
  61. uneqplove(X,Y):-possiblelove(X,Y),not(love(Y,X)),not(possiblelove(Y,X)).
  62. /* Possible Relationship */
  63. possible_boom(X,Y):-couple(X,Y),love(Y,Z),hate(X,Z).
  64. possible_compet(X,Y,Z):-possible_love(X,Z),love(Y,Z),not(X=Y).
  65. possible_compet(X,Y,Z):-possible_love(X,Z),possible_love(Y,Z),not(X=Y).
  66. possible_couple(X,Y):-friend(X,Y),love(X,Y),friend(Y,X).
  67. possible_couple(X,Y):-friend(Y,X),possible_love(X,Y).
  68. possible_couple(X,Y):-possible_friend(X,Y),love(X,Y),possible_friend(X,Y).
  69. possible_couple(X,Y):-possible_love(X,Y),possible_love(Y,X).
  70. possible_dangerous_couple(X,Y):-love(X,Y),love(X,Z),possiblehate(Z,Y),not(Y=Z).
  71. possible_dangerous_friend(X,Y):-friend(X,Y),loved(X,Z),friend(Z,Y),not(Y=Z).
  72. possible_dangerous_friend(X,Y):-friend(X,Y),loved(X,Z),loved(Z,Y),not(Y=Z).
  73. possible_dangerous_friend(X,Y):-friend(X,Y),possible_love(X,Z),friend(Z,Y),not(Y=Z).
  74. possible_dangerous_friend(X,Y):-friend(X,Y),possible_love(X,Z),loved(Z,Y),not(Y=Z).
  75. possible_dangerous_friend(X,Y):-friend(X,Y),possible_love(X,Z),possible_love(Z,Y),not(Y=Z).
  76. possible_dangerous_friend(X,Y):-friend(X,Y),friend(X,Z),possiblehate(Z,Y),not(Y=Z).
  77. possible_enemy(X,Y):-loved(X,Z),not(love(Z,X)),possible_love(Z,Y),not(X=Y).
  78. possible_enemy(X,Y):-possible_love(X,Z),not(love(Z,X)),love(Z,Y),not(X=Y).
  79. possible_enemy(X,Y):-possible_love(X,Z),not(love(Z,X)),possible_love(Z,Y),not(X=Y).
  80. possible_enemy(X,Y,Z):-loved(X,Z),not(love(Z,X)),possible_love(Z,Y),not(X=Y).
  81. possible_enemy(X,Y,Z):-possible_love(X,Z),not(love(Z,X)),love(Z,Y),not(X=Y).
  82. possible_enemy(X,Y,Z):-possible_love(X,Z),not(love(Z,X)),possible_love(Z,Y),not(X=Y).
  83. possible_fakefriend:-friend(X,Y),possiblehate(Y,X).
  84. possible_friend(X,Y):-friend(X,Z),friend(Z,Y),not(friend(X,Y)),not(X=Y).
  85. possible_friend(X,Y):-not(friend(X,Y)),love(Y,X).
  86. possible_friend(X,Y):-not(friend(X,Y)),possiblelove(Y,X).
  87. possible_hate(X,Y):-friend(X,Z),hate(Z,Y),know(X,Y),not(friend(X,Y)).
  88. possible_hate(X,Y):-friend(X,Z),hate(Z,Y),possible_know(X,Y),not(friend(X,Y)).
  89. possible_hate(X,Y):-love(X,Z),hate(Z,Y),know(X,Y),not(love(X,Y)).
  90. possible_hate(X,Y):-love(X,Z),hate(Z,Y),possible_know(X,Y),not(love(X,Y)).
  91. possible_hate(X,Y):-possible_enemy(X,Y).
  92. possible_hate(X,Y):-possible_love(X,Z),hate(Z,Y),know(X,Y),not(possiblelove(X,Y)).
  93. possible_hate(X,Y):-possible_love(X,Z),hate(Z,Y),possible_know(X,Y),not(possiblelove(X,Y)).
  94. possible_hate(X,Y):-possiblehate(X,Y).
  95. possible_hate_many(X,Y,Z):-low_possible_hate(X,Y),low_possible_hate(X,Z),not(possible_hate(X,Z)),not(Y=Z).
  96. possible_hate_many(X,Y,Z):-possible_hate(X,Y),possible_hate(X,Z),not(Y=Z).
  97. possible_help(X,Y):-friend(Y,X),not(possible_hate(Y,X)),not(hate(Y,X)).
  98. possible_help(X,Y):-love(Y,X),not(possible_hate(Y,X)),not(hate(Y,X)).
  99. possible_help(X,Y):-possible_friend(Y,X),not(possible_hate(Y,X)),not(hate(Y,X)).
  100. possible_help(X,Y):-possiblelove(Y,X),not(possible_hate(Y,X)),not(hate(Y,X)).
  101. possible_jealousy(X,Y):-loved(X,Z),not(love(Z,X)),friend(Z,Y),not(X=Y).
  102. possible_jealousy(X,Y):-possible_love(X,Z),not(love(Z,X)),friend(Z,Y),not(X=Y).
  103. possible_know(X,Y):-friend(X,Z),dangerous_friend(Z,Y),not(know(X,Y)),not(X=Y).
  104. possible_know(X,Y):-friend(X,Z),hate(Z,Y),not(know(X,Y)),not(X=Y).
  105. possible_know(X,Y):-friend(X,Z),love(Z,Y),not(know(X,Y)),not(X=Y).
  106. possible_know(X,Y):-friend(X,Z),loved(Z,Y),not(know(X,Y)),not(X=Y).
  107. possible_know(X,Y):-friend(X,Z),possible_dangerous_friend(Z,Y),not(know(X,Y)),not(X=Y).
  108. possible_know(X,Y):-friend(X,Z),possible_love(Z,Y),not(know(X,Y)),not(X=Y).
  109. possible_know(X,Y):-know(X,Y).
  110. possible_know(X,Y):-possible_friend(X,Y),not(know(X,Y)).
  111. 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)).
  112. 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)).
  113. possible_love(X,Y):-friend(X,Z),love(Z,Y),know(X,Y),not(hate(X,Y)),not(possiblehate(X,Y)).
  114. possible_love(X,Y):-possiblelove(X,Y).
  115. possible_love_infer(X,Y):-possible_love(X,Y),not(possiblelove(X,Y)).
  116. very_possible_couple(X,Y):-possible_love(X,Y),possible_love(Y,X).

Replies to Re: Re: Re: Prolog - Relationship Analyze rss

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

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

Here you can reply to the paste above

captcha