Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register slitherin-gym environment #1

Open
kimbring2 opened this issue Feb 20, 2018 · 1 comment
Open

Register slitherin-gym environment #1

kimbring2 opened this issue Feb 20, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@kimbring2
Copy link

kimbring2 commented Feb 20, 2018

I think it would be nice to register your custom environment and
use it like below code for portability.

import gym
import slitherinenv

env = gym.make('SlitherinEnv-v0')
env.__init__(num_agents=1)
env.reset()

for i_episode in range(20):
    observation = env.reset()
    for t in range(100):
        env.render()
        #print(observation)
        action = env.action_space.sample()
        observation, reward, done, info = env.step(action)
        if done:
            print("Episode finished after {} timesteps".format(t+1))
            break
@bhairavmehta95
Copy link
Owner

Great idea, this is coming in the next iteration. Thank you for bringing this up!

@bhairavmehta95 bhairavmehta95 added the enhancement New feature or request label Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants