微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

sbass无法读取gringo输出

如何解决sbass无法读取gringo输出

我正在运行一个简单的ASP程序:

%Defining possible states of each of the rook space
occupied(t; f).

%Generate all possible grids
{rook(X,Y,D) : occupied(D)} = 1 :- X=2..x,Y=2..y.

%Bound the grid with empty space
rook(X,f) :- X=0,Y=1..y.
rook(X,f) :- X=x+1,f) :- X=1..x,Y=0.
rook(X,Y=y+1.

%surrounding space is considered free path
freePath(X,Y) :- X=0,Y=1..y.
freePath(X,Y) :- X=x+1,Y) :- X=1..x,Y=0.
freePath(X,Y=y+1.

%Generate empty path from the outside space
freePath(X,Y) :- rook(X,f),freePath(X+1,Y).
freePath(X,freePath(X-1,freePath(X,Y-1).
freePath(X,Y+1).

%remove any grid where a rook is not adjacent to a free path
:- rook(X,t),not freePath(X,Y+1),Y-1),not freePath(X-1,Y),not freePath(X+1,Y).

%Maximize the number of rooks by minimizing empty space
#maximize{1,X,Y : rook(X,t)}.
#show rook/3.

为了尝试通过破坏对称性来减少搜索空间,我一直在尝试使用sbass tool that's on Potassco's website

我正在使用Ubuntu 20.04 LTS。在sbass文件中运行make并获取可执行文件后,我就运行了:

gringo ./rooks-game.lp -c x=5 -c y=5 | ./sbass

它抛出一个错误

./sbass: unable to read input

我想念什么?根据这篇文章,sbass应该只能够接收gringo的输出

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。