Skip to content

Commit 6c2741e

Browse files
committed
added example of learning a program with multiple distinct head predicate symbols
1 parent e759e0a commit 6c2741e

File tree

3 files changed

+28634
-0
lines changed

3 files changed

+28634
-0
lines changed

examples/twoheads/bias.pl

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
max_clauses(2).
2+
max_vars(5).
3+
max_body(6).
4+
5+
%% trains
6+
head_pred(f1,1).
7+
body_pred(has_car,2).
8+
body_pred(has_load,2).
9+
body_pred(short,1).
10+
body_pred(long,1).
11+
body_pred(two_wheels,1).
12+
body_pred(three_wheels,1).
13+
body_pred(roof_open,1).
14+
body_pred(roof_closed,1).
15+
body_pred(zero_load,1).
16+
body_pred(one_load,1).
17+
body_pred(two_load,1).
18+
body_pred(three_load,1).
19+
body_pred(circle,1).
20+
body_pred(triangle,1).
21+
body_pred(rectangle,1).
22+
23+
type(f1,(train,)).
24+
type(has_car,(train,car)).
25+
type(has_load,(car,load)).
26+
type(short,(car,)).
27+
type(long,(car,)).
28+
type(two_wheels,(car,)).
29+
type(three_wheels,(car,)).
30+
type(roof_open,(car,)).
31+
type(roof_closed,(car,)).
32+
type(zero_load,(load,)).
33+
type(one_load,(load,)).
34+
type(two_load,(load,)).
35+
type(three_load,(load,)).
36+
type(circle,(load,)).
37+
type(triangle,(load,)).
38+
type(rectangle,(load,)).
39+
40+
direction(f1,(in,)).
41+
direction(has_car,(in,out)).
42+
direction(has_load,(in,out)).
43+
direction(short,(in,)).
44+
direction(long,(in,)).
45+
direction(two_wheels,(in,)).
46+
direction(three_wheels,(in,)).
47+
direction(roof_open,(in,)).
48+
direction(roof_closed,(in,)).
49+
direction(zero_load,(in,)).
50+
direction(one_load,(in,)).
51+
direction(two_load,(in,)).
52+
direction(three_load,(in,)).
53+
direction(circle,(in,)).
54+
direction(triangle,(in,)).
55+
direction(rectangle,(in,)).
56+
57+
%% robots
58+
head_pred(f2,2).
59+
body_pred(up,2).
60+
body_pred(down,2).
61+
body_pred(left,2).
62+
body_pred(right,2).
63+
64+
type(f2,(state,state)).
65+
type(up,(state,state)).
66+
type(down,(state,state)).
67+
type(left,(state,state)).
68+
type(right,(state,state)).
69+
70+
direction(f2,(in,out)).
71+
direction(up,(in,out)).
72+
direction(down,(in,out)).
73+
direction(left,(in,out)).
74+
direction(right,(in,out)).
75+

0 commit comments

Comments
 (0)