{"action":"created","issue":{"url":"https://api.github.com/repos/openai/gym/issues/337","repository_url":"https://api.github.com/repos/openai/gym","labels_url":"https://api.github.com/repos/openai/gym/issues/337/labels{/name}","comments_url":"https://api.github.com/repos/openai/gym/issues/337/comments","events_url":"https://api.github.com/repos/openai/gym/issues/337/events","html_url":"https://github.com/openai/gym/issues/337","id":175940234,"number":337,"title":"need for more parameters in reset(), step(), etc.","user":{"login":"osigaud","id":12270527,"avatar_url":"https://avatars.githubusercontent.com/u/12270527?v=3","gravatar_id":"","url":"https://api.github.com/users/osigaud","html_url":"https://github.com/osigaud","followers_url":"https://api.github.com/users/osigaud/followers","following_url":"https://api.github.com/users/osigaud/following{/other_user}","gists_url":"https://api.github.com/users/osigaud/gists{/gist_id}","starred_url":"https://api.github.com/users/osigaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osigaud/subscriptions","organizations_url":"https://api.github.com/users/osigaud/orgs","repos_url":"https://api.github.com/users/osigaud/repos","events_url":"https://api.github.com/users/osigaud/events{/privacy}","received_events_url":"https://api.github.com/users/osigaud/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-09-09T06:50:46Z","updated_at":"2016-09-15T19:52:19Z","closed_at":null,"body":"Hi,\r\n\r\nI'm currently refactoring a more complicated environment to match gym's API and I'm meeting the limits of the current API.\r\n\r\nFor reset(), I may want to have a deterministic reset(), which always start from the same point, or a stochastic one (the current one). Thus adding a boolean \"deterministic\" parameter. Or I may have a list of starting states and want to add the number of the state from which I want to restart. Or even more complicated, I may perform active learning and choose any state from where to start (In that case, I may rather use an additional set_state() method rather than do it through reset()).\r\n\r\nFor step(), I may want to pass additional information (in my case, a target_size to see if the current reaching movement was a hit and compute the reward). I believe many environments will require these kinds of extensions and at the moment the only option is to move away with the standard API, making any pull request difficult.\r\n\r\nI see two possible solutions:\r\n- add a general purpose \"setContext( dictionary)\" method where you can pass anything to your environment to provide additional information that any API method will use through dedicated attributes\r\n- add a (generally empty) dictionary parameter to all the standard methods (in the spirit of the \"infos\" output of the step() method), that the programmer can use for his own purpose.\r\n\r\nEverything coded so far would still work with both methods.\r\nI tend to believe the latter option is preferable, but of course the gym team may think differently (or find a different solution)!\r\n\r\nLooking forward to reading you on that\r\nOlivier Sigaud"},"comment":{"url":"https://api.github.com/repos/openai/gym/issues/comments/247433997","html_url":"https://github.com/openai/gym/issues/337#issuecomment-247433997","issue_url":"https://api.github.com/repos/openai/gym/issues/337","id":247433997,"user":{"login":"tlbtlbtlb","id":219508,"avatar_url":"https://avatars.githubusercontent.com/u/219508?v=3","gravatar_id":"","url":"https://api.github.com/users/tlbtlbtlb","html_url":"https://github.com/tlbtlbtlb","followers_url":"https://api.github.com/users/tlbtlbtlb/followers","following_url":"https://api.github.com/users/tlbtlbtlb/following{/other_user}","gists_url":"https://api.github.com/users/tlbtlbtlb/gists{/gist_id}","starred_url":"https://api.github.com/users/tlbtlbtlb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlbtlbtlb/subscriptions","organizations_url":"https://api.github.com/users/tlbtlbtlb/orgs","repos_url":"https://api.github.com/users/tlbtlbtlb/repos","events_url":"https://api.github.com/users/tlbtlbtlb/events{/privacy}","received_events_url":"https://api.github.com/users/tlbtlbtlb/received_events","type":"User","site_admin":false},"created_at":"2016-09-15T19:52:19Z","updated_at":"2016-09-15T19:52:19Z","body":"Define 2 separately named environments, with different `kwargs` to the constructor. See, for example, [FrozenLake-v0](https://github.com/openai/gym/blob/master/gym/envs/__init__.py#L142)  and [FrozenLake8x8-v0](https://github.com/openai/gym/blob/master/gym/envs/__init__.py#L150).\r\n\r\nFor a more complex environment, see how kwargs are [generated](https://github.com/openai/gym/blob/master/gym/envs/__init__.py#L301) programatically for the standard Atari environemnts "}}
{"actor":{"display_login":"tlbtlbtlb"}}