Open D3usXMachina opened 1 year ago
Add colours of houses to body of zebra_owner predicate.
The puzzle can be solved without knowing the colour of the last house, but a priori we wouldn't know that.
A minimal example that yields the entire solution would be:
solvesPuzzle(Street) :- Street = [_,_,_], member(house(green,_,_), Street), member(house(red,english,_), Street), member(house(_,spanish,jaguar), Street), sublist([house(_,_,snail),house(_,japanese,_)], Street), sublist([house(_,_,snail),house(blue,_,_)], Street), member(house(_,_,zebra), Street).
which yields:
Street = [house(red, english, snail), house(blue, japanese, zebra), house(green, spanish, jaguar)] .
Add colours of houses to body of zebra_owner predicate.
The puzzle can be solved without knowing the colour of the last house, but a priori we wouldn't know that.
A minimal example that yields the entire solution would be:
which yields:
Street = [house(red, english, snail), house(blue, japanese, zebra), house(green, spanish, jaguar)] .