check_pomdp: Check POMDP

Description Usage Arguments Details Value Author(s) Examples

View source: R/check_pomdp.R

Description

Checks if input matrices are compatible to form a POMDP

Usage

1
check_pomdp(transition, observation, reward)

Arguments

transition

Transition matrix between states, can be computed using tr. Array, dimensions = SxSxA with S number of states and A number of actions (positive)

observation

observation matrix for each action, can be computed using obs. Array, dimensions = SxOxA with S number of states, O the number of observations and A number of actions (positive)

reward

reward matrix, can be computed using rew. Matrix of A rows and S columns, with S number of states and A number of actions (positive)

Details

Checks the compatibility of dimensions of the input matrices (same number of states, actions), are the transition matrices stochastic and square,

Value

Bool, TRUE if the inputs are compatible to form a POMDP, FALSE otherwise

Author(s)

Luz Pascal

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
#values for Sumatran tigers
pen <- 0.1
p0 <- 1-pen
pem <- 0.05816
pm <- 1 - pem
V <- 175.133
Cm <- 18.784
Cs <- 10.840
d0 <- 0.01
dm <- 0.01
ds <- 0.78193

#buiding the matrices of the problem
t <- smsPOMDP::tr(p0, pm, d0, dm, ds, V, Cm, Cs) #transition matrix
o <- smsPOMDP::obs(p0, pm, d0, dm, ds, V, Cm, Cs)#observation matrix
r <- smsPOMDP::rew(p0, pm, d0, dm, ds, V, Cm, Cs)#reward matrix

check_pomdp(t, o, r)

## End(Not run)

conservation-decisions/smsPOMDP documentation built on Oct. 27, 2020, 10:44 p.m.