I’m using: Tau Prolog
Is there another way than to create a giant list of
\= between a large list of values when there can only be one of each in the result? Doing it with recursion on the list would effectively be doing the same, as I understand, with the likelihood that it’ll be slower.
C1=a, C2=b, C3=c, C4=d, C5=e, alldif([S1,S2,S3,S4,S5,S6,S7,S8]), prefers(S1,C1,P1), prefers(S2,C1,P2), prefers(S3,C1,P3), prefers(S4,C2,P4), prefers(S5,C2,P5), prefers(S6,C3,P6), prefers(S7,C4,P4), prefers(S8,C5,P4),
Doing something like the above, setting
S1\=S2 between everything and everything else, before calling the
prefers/3 predicates would be better, but I’m also struggling with this in tau since
maplist/2 can’t use
dif/1, as I understand it doesn’t exist.
Really, I’d like something that automatically states that