Let's create an environment that represents our problem of cliff walking:
- Let's start by loading the cliff walking environment using the makeEnvironment() function:
env = makeEnvironment("cliff.walking")env
The following screenshot shows the description of the cliff walking environment:
- Next, we create a function that will query the environment with random actions and get the observational sequence data:
# Creating the function to query the environmentsequences <- function(iter,env){ actions <- env$actions data <- data.frame(matrix(ncol = 4, nrow = 0)) colnames(data) <- c("State", "Action", "Reward","NextState") env$reset() ...