I have following knowledge base
team_name(1, conneticut).
team_name(2, duke).
team_name(3, memphis).
team_name(4, villanova).
team_name(5,gonzaga).
win_lose(1,22,2).
win_lose(2,24,1).
win_lose(3,23,2).
win_lose(4,20,2).
win_lose(5,21,3).
zone(west,5).
zone(south,3).
zone(east,1).
zone(east,2).
zone(east,4).
I want to write a query that allows the team with most wing play against the team with the least wins, which both are in the same zone, and the home team is the one with most wins
I have the following
canPlay(X,Y). Y can play X
canPlay(X,Y):-zone(zone(X)=:=Y). Y can play X, if Y zone == X
it does not work.