Last active
March 1, 2022 22:19
-
-
Save andrewjjenkins/f70419208d68b432ff11daeadbc51c50 to your computer and use it in GitHub Desktop.
A prolog skeleton for a Knights-and-Knaves problem with 8 animals
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Constraint Logic Programming | |
:- use_module(library(clpb)). % Boolean constraints | |
animals(1, [Horse, Cow, Chicken, Pig, Sheep, Goat, Swan, Cat]) :- | |
labeling([Horse, Cow, Chicken, Pig, Sheep, Goat, Swan, Cat]). | |
/** <examples> Your example queries go here, e.g. | |
?- animals(1, [Horse, Cow, Chicken, Pig, Sheep, Goat, Swan, Cat]). | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment