Blame view

code/asp/drafts/roads.lp 276 Bytes
3e0f9b8a   Francisco Coelho   back to work?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
road(berlin, potsdam).
road(potsdam, werder).
road(werder, brandenburg).
road(X, Y) :- road(Y, X).

blocked(werder, brandenburg).

route(X, Y) :- road(X, Y), not blocked(X, Y).
route(X, Y) :- route(X, Z), route(Z, Y).

% prob: 0.5
drive(X) :- route(berlin, X).

#show drive/1.