I wrote this code to solve the map coloring problem using prolog:
coloring([A,B,C,D,E,F]):-
maplist(=\=(A),[B,C,D,E]),
maplist(=\=(B),[C,D,F]),
C=\=D,
maplist(=\=(D),[E,F]),
E=\=F.
I try to get solutions using the query:
?- coloring(Cs), Cs ins [1,2,3,4], Cs = [1|_].
but I always get the error "Arguments not sufficiently instantiated", how to fix this?