Skip to content

Instantly share code, notes, and snippets.

Rhialto The M. Rhialto

Block or report user

Report or block Rhialto

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Rhialto
Rhialto / wgc1.pl
Created Sep 22, 2015
Human Wolf Goat Cabbage version 1
View wgc1.pl
#!/usr/pkg/bin/swi-prolog
%
% Solve the puzzle of the wolf, the goat and th cabbage
%
:- use_module(library(lists)).
go :-
Begin = situation([h,w,g,c], []),
Goal = situation([], [h,c,g,w]),
@Rhialto
Rhialto / wgc.pl
Last active Sep 22, 2015
Human Wolf Goat Cabbage, version 2
View wgc.pl
#!/usr/pkg/bin/swi-prolog
%
% Solve the puzzle of the wolf, the goat and the cabbage
%
% Version 2, using place(Human, Wolf, Goat, Cabbage).
:- use_module(library(lists)). % for member/2
go :-
go(Messages),
You can’t perform that action at this time.