date(andy, jeff).
date(andy, kathy).
date(kathy, dave).
date(kathy, steve).
date(dave, sally). 
date(kathy, ryan).
date(ryan, jeff).

male(andy).
male(jeff).
male(dave).
male(steve).

female(X) :- not(male(X)).
female(joanna).

d(X,Y) :-
	date(X,Y).
d(X,Y) :-
	date(Y, X).

pinkeye(steve).

pinkeye(Receipient) :-
	d(Dater, Receipient),
	pinkeye(Dater).

%pinkeye(Victim) :-
%	path(Victim, steve, Path).

path(Start,End,Path) :-
        forward(Start,End,[Start],Path).

forward(Start,End,PartialPath,Path) :-
        d(Start,End),
	append([End], PartialPath, Path).

forward(Start,End,Visited,Path) :-
        d(Start,Neighbor),
        not(Neighbor == End),
        not(member(Neighbor,Visited)),
        forward(Neighbor,End,[Neighbor|Visited],Path).



	
