@@ -72,9 +72,9 @@ Create a POMDP defined by the tuple (S,A,O,T,Z,R,γ).
72
72
- `b₀=Uniform(S)`: Initial belief/state distribution (See `POMDPModelTools.Deterministic` and `POMDPModelTools.SparseCat` for other options).
73
73
74
74
## Keyword
75
- - `terminal =Set()`: Set of terminal states. Once a terminal state is reached, no more actions can be taken or reward received.
75
+ - `terminals =Set()`: Set of terminal states. Once a terminal state is reached, no more actions can be taken or reward received.
76
76
"""
77
- function DiscreteExplicitPOMDP (s, a, o, t, z, r, discount, b0= Uniform (s))
77
+ function DiscreteExplicitPOMDP (s, a, o, t, z, r, discount, b0= Uniform (s); terminals = Set () )
78
78
ss = vec (collect (s))
79
79
as = vec (collect (a))
80
80
os = vec (collect (o))
@@ -108,7 +108,7 @@ function DiscreteExplicitPOMDP(s, a, o, t, z, r, discount, b0=Uniform(s))
108
108
Dict (ss[i]=> i for i in 1 : length (ss)),
109
109
Dict (as[i]=> i for i in 1 : length (as)),
110
110
Dict (os[i]=> i for i in 1 : length (os)),
111
- discount, b0, terminal
111
+ discount, b0, convert (Set{ eltype (ss)}, terminals)
112
112
)
113
113
114
114
probability_check (m)
@@ -133,9 +133,9 @@ Create an MDP defined by the tuple (S,A,T,R,γ).
133
133
- `p₀=Uniform(S)`: Initial state distribution (See `POMDPModelTools.Deterministic` and `POMDPModelTools.SparseCat` for other options).
134
134
135
135
## Keyword
136
- - `terminal =Set()`: Set of terminal states. Once a terminal state is reached, no more actions can be taken or reward received.
136
+ - `terminals =Set()`: Set of terminal states. Once a terminal state is reached, no more actions can be taken or reward received.
137
137
"""
138
- function DiscreteExplicitMDP (s, a, t, r, discount, p0= Uniform (s); terminal = Set ())
138
+ function DiscreteExplicitMDP (s, a, t, r, discount, p0= Uniform (s); terminals = Set ())
139
139
ss = vec (collect (s))
140
140
as = vec (collect (a))
141
141
@@ -145,7 +145,7 @@ function DiscreteExplicitMDP(s, a, t, r, discount, p0=Uniform(s); terminal=Set()
145
145
ss, as, tds, r,
146
146
Dict (ss[i]=> i for i in 1 : length (ss)),
147
147
Dict (as[i]=> i for i in 1 : length (as)),
148
- discount, p0, terminal
148
+ discount, p0, convert (Set{ eltype (ss)}, terminals)
149
149
)
150
150
151
151
trans_prob_consistency_check (m)
0 commit comments