From 7c813e87c2a033ddba14cfeede96cc1d4049e73a Mon Sep 17 00:00:00 2001 From: gwern Date: Tue, 21 Mar 2017 19:01:00 -0400 Subject: [PATCH] Generalized Kelly Coinflip game: right, observation space has to match the sufficient statistics... --- gym/envs/toy_text/kellycoinflip.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gym/envs/toy_text/kellycoinflip.py b/gym/envs/toy_text/kellycoinflip.py index e084d2c76..c600f5a10 100644 --- a/gym/envs/toy_text/kellycoinflip.py +++ b/gym/envs/toy_text/kellycoinflip.py @@ -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