when I run the simulation :
agent1 <- build.agent(c(0.5,0.5), method = "Q.decide")
agent2 <- build.agent(c(1,0), method = "random")
agents <- list(agent1, agent2)
its <- 5000
winners <- vector("numeric", length = its)
loopy loop
pb <- txtProgressBar(min = 0, max = its, style = 3)
for(k in 1:its){
out <- play.liars.dice(auto = TRUE, players = 2, num.dice = 2, verbose = 0, agents = agents, Q.mat = Q.mat, train = TRUE)
winners[k] <- out$winner
Q.mat <- out$Q.mat
setTxtProgressBar(pb, k)
}
table(winners)
Error in Q.matrix[pars$p1.state, ] :
object of type 'closure' is not subsettable
thank you
when I run the simulation :
agent1 <- build.agent(c(0.5,0.5), method = "Q.decide")
agent2 <- build.agent(c(1,0), method = "random")
agents <- list(agent1, agent2)
its <- 5000
winners <- vector("numeric", length = its)
loopy loop
pb <- txtProgressBar(min = 0, max = its, style = 3)
for(k in 1:its){
out <- play.liars.dice(auto = TRUE, players = 2, num.dice = 2, verbose = 0, agents = agents, Q.mat = Q.mat, train = TRUE)
winners[k] <- out$winner
Q.mat <- out$Q.mat
setTxtProgressBar(pb, k)
}
table(winners)
Error in Q.matrix[pars$p1.state, ] :
object of type 'closure' is not subsettable
thank you