I have a Zebra Problem modified but I can't do correct. This are my sentences :
- The Brazilian doesn’t live in the second house.
- The dog owner plays basketball.
- There is an intermediate house between the football players house and the red house.
- The fish owner lives next to the cat owner.
- The dog owner lives next to the green house.
- A German lives in the third house.
This is my attempt but I am getting an error, could someone please help me.
neighborhood(N):-
length(N,3),
member(house(brazilian,_,_),N),
member(house(_,dog,basketball),N),
middle(house(red,_,_),house(_,_,soccer), N),
nextto(house(_,fish,_),house(_,cat,_), N),
nextto(house(_,dog,_),house(green,_,_), N),
N = [_,_,house(german,_,_)].