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

Upgrade gym to 0.21.0 #16

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pip install -e .
import gym

go_env = gym.make('gym_go:go-v0', size=7, komi=0, reward_method='real')
go_env.reset()

first_action = (2,5)
second_action = (5,2)
Expand Down
1 change: 1 addition & 0 deletions demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# Initialize environment
go_env = gym.make('gym_go:go-v0', size=args.boardsize, komi=args.komi)
go_env.reset()

# Game loop
done = False
Expand Down
3 changes: 3 additions & 0 deletions gym_go/tests/test_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ def test_num_liberties(self):

def test_komi(self):
env = gym.make('gym_go:go-v0', size=7, komi=2.5, reward_method='real')
env.reset()

# White win
_ = env.step(None)
Expand Down Expand Up @@ -224,6 +225,7 @@ def test_children(self):

def test_real_reward(self):
env = gym.make('gym_go:go-v0', size=7, reward_method='real')
env.reset()

# In game
state, reward, done, info = env.step((0, 0))
Expand Down Expand Up @@ -259,6 +261,7 @@ def test_real_reward(self):

def test_heuristic_reward(self):
env = gym.make('gym_go:go-v0', size=7, reward_method='heuristic')
env.reset()

# In game
state, reward, done, info = env.step((0, 0))
Expand Down
2 changes: 2 additions & 0 deletions gym_go/tests/test_invalid_moves.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ def test_small_suicide(self):
"""

self.env = gym.make('gym_go:go-v0', size=3, reward_method='real')
self.env.reset()
for move in [6, 7, 8, 5, 4, 8, 0, 1]:
state, reward, done, info = self.env.step(move)

Expand All @@ -203,6 +204,7 @@ def test_invalid_after_capture(self):
"""

self.env = gym.make('gym_go:go-v0', size=3, reward_method='real')
self.env.reset()
for move in [0, 8, 6, 4, 1, 2, 3, 7]:
state, reward, done, info = self.env.step(move)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
setup(
name='gym_go',
version='0.0.1',
install_requires=['gym'] # and other dependencies
install_requires=['gym==0.21.0'] # and other dependencies
)