-
Notifications
You must be signed in to change notification settings - Fork 0
/
FoodSimulation.mas2j
73 lines (51 loc) · 1.71 KB
/
FoodSimulation.mas2j
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
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
Jason Project
-- Food Simulation --
based on the description available at
http://jasss.soc.surrey.ac.uk/1/3/3.html
used in the chapter about Jason in the book
"Agents, Simulation and Applications" by
Adelinde M. Uhrmacher and Danny Weyns
*/
/*
The environment implementation provides the following perception and actions
Percepts:
. step(X): the step X has started.
. food(X,Y,P,O): food perception
X is the column
Y is the line
P can be
my_pos if the food is the same location as the agent
see if the food is in the agent's territory
smell if the food is two steps away from the agent
O is the agent allocated to the food, -1 if none
. pos(AgId,X,Y): agent position
AgId the agent's identification in the environment
. agent(AgId, X, Y, S, A): perception of other agents in the agent's territory
AgId is the identification of the other agent
S is its strength
A is its action (moving or eating)
. strength(S): the strength of the agent
. attacked(AgId,Name): the agent is beign attacked by AgId
Actions:
. eat
. move(X,Y)
. attack(X,Y)
. random_move
. pause
*/
MAS normative_simulation {
infrastructure: Centralised
// the class that implements the environment is FoodEnvironment
// parameters are: grid size, number of agents, number of food units
environment: FoodEnvironment(50,60,250)
agents:
//blind [verbose=0] #50;
strategic [verbose=0] #25;
//normative [verbose=0] #10;
//normativerule [verbose=0] #50;
reputation [verbose=0] #25;
forager [verbose=0] #10;
//attacker[verbose=0] #70;
aslSourcePath: "src/asl";
}