Top "Prolog" questions

Do not use this tag like Prologue and Epilogue.

Check if variable is empty or filled

I have the following problem: prolog prog: man(thomas, 2010). man(leon, 2011). man(thomas, 2012). man(Man) :- once(man(Man, _). problem: ?…

variables prolog prolog-setof
integer division operator in Prolog

This code is a part of the program that I am writing to solve a cryptarithmatic puzzle in prolog. I …

prolog sicstus-prolog clpfd
prolog passing a function as a variable, how to add arguments?

I have this arbitrary function that I need to call many times with different variables. btw, this is SWI-Prolog perform(…

prolog declarative
8-puzzle has a solution in prolog using manhattan distance

The 8-puzzle will be represented by a 3x3 list of lists positions where the empty box will be represented by …

prolog knowledge-management sliding-tile-puzzle
Prolog operator priority

The user input is given in the format a:b>c>d>e... and so on. I …

prolog operators iso-prolog
How to - Graph Coloring in Prolog

I'm trying to make the simple graph coloring algorithm in Prolog, but I'm having a bit of a hard time …

algorithm prolog graph-theory graph-coloring
Hanoi Tower(Towers of Hanoi)

I'm trying to do the Towers of Hanoi problem, what I have tried so far: move(1,[H|T],B,C,…

prolog towers-of-hanoi
What is "!" in Prolog

Could somebody explain me what does "!" do in Prolog ? I don't understand it. Here I have a code that counts …

list prolog prolog-cut
Learning Prolog: solving a crossword scheme

I'm trying to learn Prolog following the tutorials on this site and I can't find a solution to an exercise (…

prolog crossword
I want to create dynamic facts in prolog

I wrote the following simple code, and I expect that when I write 'male.', this code ask me once "…

prolog prolog-assert prolog-directive-dynamic