February 2020
Intermediate to advanced
328 pages
8h 19m
English
In the Getting ready section, we defined our RL problem. We know that to solve a model-based RL problem, we need a transition probability matrix and a reward matrix:
# Up up=matrix(c( 0.9, 0.1, 0, 0, 0.2, 0.7, 0.1, 0, 0, 0, 0.1, 0.9, 0, 0, 0, 1), nrow=4,ncol=4,byrow=TRUE)# Down down=matrix(c(0.1, 0, 0, 0.9, 0, 0.8, 0.2, 0, 0, 0.2, 0.8, 0, 0, 0, 0.8, 0.2), nrow=4,ncol=4,byrow=TRUE)# Left left=matrix(c(1, 0, 0, 0, 0.9, 0.1, 0, 0, 0, 0.8, 0.2, 0, 0, 0, 0, 1), nrow=4,ncol=4,byrow=TRUE)# Right right=matrix(c(0.1, 0.9, 0, 0, 0.1, 0.2, 0.7, ...
Read now
Unlock full access