09.10. jealous/2 (Zusatzaufgabe)

Erinnere dich an die Definition von Neid aus Kapitel 1:

jealous(X,Y) :- loves(X,Z), loves(Y,Z).

Wenn sowohl Vincent als auch Marsellus in Mia verliebt sind, ist nach dieser Defintion Vincent neidisch auf Marsellus und Marsellus neidisch auf Vincent. Es ist aber auch Vincent neidisch auf Vincent und Marsellus neidisch auf Marsellus. Verbessere die Prolog Definition so, dass niemand mehr auf sich selbst neidisch sein kann.

Noch keine Kommentare eingereicht. Bitte hilf uns diese Aufgabe zu verbessern.

Schreibe einen Kommentar