R/degeneracy_check.R
find_wildcards.Rd
find_wildcards
finds indices for non-identifiable elements of state
matrix.
find_wildcards(state_mat, action_vec, cols)
state_mat | Numeric matrix with rows as states and columns as predictors. |
---|---|
action_vec | Numeric vector indicating what action to take for each state. |
cols | Numeric vector same length as number of columns of the
state matrix |
Returns a list of indices (tuples specifying row and column of a matrix).
This is a helper function for degeneracy_check
.
tft_state <- matrix(c(1, 1, 1, 1, 2, 2, 2, 2), 2, 4) tft_action <- matrix(c(1, 2)) find_wildcards(tft_state, tft_action, c(1, 2, 1, 2))#> [[1]] #> [1] 1 2 #> #> [[2]] #> [1] 1 4 #> #> [[3]] #> [1] 2 1 #> #> [[4]] #> [1] 2 3 #>