Skip to content

Commit

Permalink
updated adp-intro
Browse files Browse the repository at this point in the history
  • Loading branch information
cboettig committed May 29, 2013
1 parent 5e3f3f5 commit 4eb6a30
Show file tree
Hide file tree
Showing 2 changed files with 286 additions and 31 deletions.
6 changes: 4 additions & 2 deletions inst/examples/adp-intro.Rmd
Expand Up @@ -227,7 +227,7 @@ We have time, iterations, and state/action space to keep track over. eek.


```{r}
N <- 50000 # iterations
N <- 5000 # iterations
M <- 20 # gridsize
Tmax <- 5 # Time horizon
Expand All @@ -241,7 +241,9 @@ S <- seq(0, 1, length.out = M)
sdp_matrix <- determine_SDP_matrix(f, p, x_grid=S, h_grid=chi, sigma_g)
V <- matrix(0, M, Tmax) # matrix(rep(chi, Tmax), nrow=M) #
V <- matrix(1, M, Tmax) # A* strategy
# Fails to explore at matrix(0, M, Tmax)
# consider: # V <- matrix(rep(chi, Tmax), nrow=M) #
# V[,1] <- chi # fails to explore if it doesn't have at least some non-zero values
C <- function(S, X) pmin(S, X)
Expand Down

0 comments on commit 4eb6a30

Please sign in to comment.