python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
how to input clingo variable
I have following code, but I want to change the variable of p, how can I do it?
{p(1;2;3;4)}.
:- p(X*2).
It is normal.
But the following code does'nt work.
p(1;2;3;4)
{p(X)} :- X = p(X).
:- p(X*2).
...
Reason
Votes: 0
Answers: 1
clingo return the max subset
I have the following code:
1{p(1..10)}10.
:- p(I*2).
and it shows 31 answers, But I just need the max subset p(1) p(3) p(5) p(7) p(9).
How can I do it?
Reason
Votes: 0
Answers: 1
Calendar of a football championship - Answer set programming
I wrote an algorithm in answer set programming, run with clingo, to calculate a league of 20 teams and its 38 matches (19 round and 19 return) with certain constraints:
There may not be more than one...
BlowLore
Votes: 0
Answers: 1
append an atom with exisiting variables and create new set in clingo
I am totally new in asp, I am learning clingo and I have a problem with variables. I am working on graphs and paths in the graphs so I used a tuple such as g((1,2,3)). what I want is to add new node t...
Ali Ghazi
Votes: 0
Answers: 1