File: instance.lp

package info (click to toggle)
gringo 4.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 8,260 kB
  • ctags: 10,755
  • sloc: cpp: 55,049; python: 629; yacc: 569; sh: 124; makefile: 23
file content (37 lines) | stat: -rw-r--r-- 550 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
%     -------
%     |o|o|o|
%     -------
%     |o|o|o|
% ---------------
% |o|o|o|o|o|o|o|
% ---------------
% |o|o|o| |o|o|o|
% ---------------
% |o|o|o|o|o|o|o|
% ---------------
%     |o|o|o|
%     -------
%     |o|o|o|
%     -------
%
%

field(0,0).
field(X,Y) :- stone(X,Y).

stone(-1.. 1,-3..-1).
stone(-3..-1,-1.. 1).
stone( 1.. 3,-1.. 1).
stone(-1.. 1, 1.. 3).

dir(west;east;north;south).

dir(west ,-1, 0).
dir(east , 1, 0).
dir(north, 0,-1).
dir(south, 0, 1).

goal(0,0).

% fix the first jump to avoid symmetries
fix_jump(0,-2,south,1).