forked from ssanner/rddlsim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PROTOCOL.txt
145 lines (106 loc) · 5.85 KB
/
PROTOCOL.txt
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
RDDLSim -- A simulator for the relational dynamic influence diagram
language (RDDL).
Protocol for client/server interaction in RDDLSim.
NOTE: This is a modified version of the PROTOCOL file from
the PPDDL mdpsim simulator: http://www.tempastic.org/mdpsim/
Original authors (John Asmuth, Michael Littman, Hakan Younes)
===
A session looks like this
client: session-request
server: session-init
--loop (until round limit or session time limit reached)
client: round-request
server: round-init
--loop (until trial termination criteria or session time limit reached)
server: state
client: action
--
server: end-round
--
server: end-session
NOTES REGARDING SERVER SESSION TIME LIMITS (currently set at 1080000 ms = 18 min):
(1) All times are specified in milliseconds.
(2) Clients should expect a "round end" message in place of a "state" message if the
time limit during a trial is reached, and clients should expect a "session end"
message immediately after a "round end" if the "round end" message indicates
time-left <= 0. Note that time-left entries for "round end" and "session end"
have been added to the message format below.
NOTES REGARDING RDDL2 AND OBJECT NOTATION WITH $ PREFIX
(1) While in RDDL2, there is an optional $ prefix for objects (required to disambiguate
object references in expressions, but optional elsewhere), there is no ambiguity in
client/server object references so the $ is suppressed in messages sent by the server.
A client may optionally use a $ prefix for objects when communicating with the server.
(2) All clients written for the IPPC 2011 (when $'s were not used) should work without
modification with the latest versions of the RDDL2 client/server.
NOTES REGARDING THE INITIAL STATE
(1) When a round starts, the server immediately sends a state message.
(2) In a fully observed domain, the state message contains the values of the
state-fluents, expressed as observed-fluents. Fluents whose value is the default
may be omitted from the message.
(3) In a partially observed domain, the state message contains no
observed-fluents, since observations can only be computed after the first action
has been taken. That is because observations are functions of both the new and
the previous state. On partially observed domains, clients should ignore the
initial state message.
CLIENT MESSAGES:
-Session request
session-request => "<session-request>" <name> <problem> <input-language> "</session-request>" (Input language was added for IPC 2018)
name => "<client-name>" <WORD> "</client-name>"
problem => "<problem-name>" <WORD> "</problem-name>"
input-language => "input-language>" "rddl"|"pddl" "</input-language>
-Round request
round-request => "<round-request>" <execute-policy> "</round-request>"
execute-policy => "<execute-policy>" "yes"|"no" "</execute-policy>" (Since IPC 2018)
-Action spec
action => "<actions>" <act>* "</actions>"
act => "<action>" <name> <arg>* <value> "</action>"
name => "<action-name>" <WORD> "</action-name>
arg => "<action-arg>" <WORD> "</action-arg>"
value => "<action-value>" <WORD> "</action-value>"
-Resource request
resource-request => "<resource-request> </resource-request>"
SERVER MESSAGES:
-Session init
session-init => "<session-init>" <task> <sessionID> <numrounds> <timeallowed> "</session-init>"
task => "<task>" <WORD> "</task>" (Since IPC 2018)
sessionID => "<session-id>" <WORD> "</session-id>"
numrounds => "<num-rounds>" <WORD> "</num-rounds>"
timeallowed => "<time-allowed>" <WORD> "</time-allowed>"
-Round init
round-init => "<round-init>" <round> <time-left> <rounds-left> <sessionID> "</round-init>"
round => "<round-num>" <WORD> "</round-num>"
time-left => "<time-left>" <WORD> "</time-left>"
rounds-left => "<round-left>" <WORD> "</round-left>"
-State (and turn response)
state => "<turn>" <turn-num> <time-left> <immediate-reward> <observed-fluent>* "</turn>" |
"<turn>" <turn-num> <time-left> <immediate-reward> <no-observed-fluents> "</turn>" |
<end-round> | <end-session>
turn-num => "<turn-num>" <WORD> ">/turn-num>"
time-left => "<time-left>" <WORD> "</time-left>"
immediate-reward => "<immediate-reward> <WORD> "</immediate-reward>"
observed-fluent => "<observed-fluent>" <fluent-name> <fluent-arg>* <fluent-value> "</observed-fluent>"
fluent-name => "<fluent-name>" <WORD> "</fluent-name>"
fluent-arg => "<fluent-arg>" <WORD> "</fluent-arg>"
fluent-value => "<fluent-value>" <WORD> "</fluent-value>"
no-observed-fluents => "<no-observed-fluents/>"
-End round
end-round => "<round-end>" <instance-name> <client-name> <round-num> <round-reward> <turns-used> <time-used> <time-left> <immediate-reward> "</round-end>"
instance-name => "<instance-name>" <WORD> "</instance-name>"
client-name => "<client-name>" <WORD> "</client-name>"
round-num => "<round-num>" <WORD> "</round-num>"
round-reward => "<rount-reward>" <WORD> "</round-reward>"
turns-used => "<turns-used>" <WORD> "</turns-used>"
time-left => "<time-left>" <WORD> "</time-left>"
immediate-reward => "<immediate-reward>" <WORD> "</immediate-reward>"
-End session
end-session => "<session-end>" <instance-name> <total-reward> <rounds-used> <time-used> <client-name> <session-id> <time-left> "</session-end>"
instance-name => "<instance-name>" <WORD> "</instance-name>"
total-reward => "<total-reward>" <WORD> "</total-reward>"
rounds-used => "<rounds-used>" <WORD> "</rounds-used>"
client-name => "<client-name>" <WORD> "</client-name>"
session-id => "<session-id>" <WORD> "</session-id>"
time-left => "<time-left>" <WORD> "</time-left>"
-Resource notification
resource-notification => "<resource-notification>" <time-left> <memory-left> "</resource-notification>"
time-left => "<time-left>" <WORD> "</time-left>"
memory-left => "<memory-left>" <WORD> "</memory-left>"