Generalized Kelly Coinflip game: right, observation space has to match the sufficient statistics...

This commit is contained in:
gwern
2017-03-21 19:01:00 -04:00
committed by Trevor Blackwell
parent 1de6febf46
commit 7c813e87c2

View File

@@ -85,7 +85,10 @@ class KellyCoinflipGeneralizedEnv(gym.Env):
self.action_space = spaces.Discrete(maxWealth*100)
self.observation_space = spaces.Tuple((
spaces.Discrete(maxWealth*100+1),
spaces.Discrete(maxRounds+1)))
spaces.Discrete(maxRounds+1), # rounds elapsed
spaces.Discrete(maxRounds+1), # wins
spaces.Discrete(maxRounds+1), # losses
spaces.Discrete(maxWealth*100+1))) # maximum observed wealth
self.reward_range = (0, maxWealth)
self.edge = edge
self.wealth = initialWealth