-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfarm.pro
More file actions
60 lines (52 loc) · 1.34 KB
/
Copy pathfarm.pro
File metadata and controls
60 lines (52 loc) · 1.34 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
:- dynamic (state/4).
:- dynamic(width/1).
:- dynamic(height/1).
object_props('wolf', 'W', animal).
object_props('chicken', 'H', animal).
object_props('cow', 'C', animal).
object_props('grass', 'G', food).
object_props('grain', 'F', food).
object_props('corn','M', food).
object_props('.', '.', '.').
object_props('.', '\n', '.').
can_eat(cow, grass).
can_eat(cow, grain).
can_eat(chicken, grain).
can_eat(chicken, corn).
can_eat(wolf, cow).
can_eat(wolf, chicken).
reproduction_ep(cow, 30).
reproduction_ep(chicken, 15).
reproduction_ep(wolf, 45).
energy_point(cow, 30).
energy_point(chicken, 15).
energy_point(grain, 10).
energy_point(grass, 20).
energy_point(corn, 5).
can_move(cow, move_up).
can_move(cow, move_down).
can_move(cow, move_left).
can_move(cow, move_right).
can_move(chicken, move_up_right).
can_move(chicken, move_up_left).
can_move(chicken, move_down_right).
can_move(chicken, move_down_left).
can_move(wolf, move_up).
can_move(wolf, move_down).
can_move(wolf, move_left).
can_move(wolf, move_right).
can_move(wolf, move_up_right).
can_move(wolf, move_up_left).
can_move(wolf, move_down_right).
can_move(wolf, move_down_left).
can_make(cow, idle).
can_make(cow, eat).
can_make(chicken, idle).
can_make(chicken, eat).
can_make(wolf, idle).
can_make(wolf, eat).
value(cow, 500).
value(chicken, 100).
value(corn, 10).
value(grain, 30).
value(grass, 20).