@@ -124,7 +124,8 @@ function build_initial_beliefs(root::Node, p::POMDP, px::POMDPXFile, pbar)
124
124
if px. pretty
125
125
label = " s_$(px. s_name (s)) "
126
126
else
127
- label = " s$(stateindex (p, s)) "
127
+ sidx = stateindex (p, s)
128
+ label = " s$(sidx - 1 ) "
128
129
end
129
130
130
131
link! (parameter, param (label; prob= pdf (init_states, s)))
@@ -151,7 +152,8 @@ function build_transitions!(root::Node, p::POMDP, px::POMDPXFile, pbar)
151
152
if px. pretty
152
153
label = " * s_$(px. s_name (s)) s_$(px. s_name (s)) "
153
154
else
154
- label = " * s$(stateindex (p, s)) s$(stateindex (p, s)) "
155
+ sidx = stateindex (p, s)
156
+ label = " * s$(sidx - 1 ) s$(sidx - 1 ) "
155
157
end
156
158
157
159
link! (parameter, param (label; prob= 1.0 ))
@@ -166,7 +168,8 @@ function build_transitions!(root::Node, p::POMDP, px::POMDPXFile, pbar)
166
168
if px. pretty
167
169
label = " a_$(px. a_name (a)) s_$(px. s_name (s)) s_$(px. s_name (sp)) "
168
170
else
169
- label = " a$(actionindex (p, a)) s$(stateindex (p, s)) s$(stateindex (p, sp)) "
171
+ (aidx, sidx, spidx) = (actionindex (p, a), stateindex (p, sp), stateindex (p, sp))
172
+ label = " a$(aidx - 1 ) s$(sidx - 1 ) o$(spidx - 1 ) "
170
173
end
171
174
172
175
T = transition (p, s, a)
@@ -209,7 +212,8 @@ function build_observations!(root::Node, p::POMDP, px::POMDPXFile, pbar)
209
212
if px. pretty
210
213
label = " a_$(px. a_name (a)) s_$(px. s_name (sp)) o_$(px. o_name (o)) "
211
214
else
212
- label = " a$(actionindex (p, a)) s$(stateindex (p, sp)) o$(obsindex (p, o)) "
215
+ (aidx, spidx, oidx) = (actionindex (p, a), stateindex (p, sp), obsindex (p, o))
216
+ label = " a$(aidx - 1 ) s$(spidx - 1 ) o$(oidx - 1 ) "
213
217
end
214
218
215
219
O = observation (p, a, sp)
@@ -239,7 +243,8 @@ function build_rewards!(root::Node, p::POMDP, px::POMDPXFile, pbar)
239
243
if px. pretty
240
244
label = " a_$(px. a_name (a)) s_$(px. s_name (s)) "
241
245
else
242
- label = " a$(actionindex (p, a)) s$(stateindex (p, s)) "
246
+ (aidx, sidx) = (actionindex (p, a), stateindex (p, s))
247
+ label = " a$(aidx - 1 ) s$(sidx - 1 ) "
243
248
end
244
249
245
250
if ! isterminal (p, s)
0 commit comments