Skip to content

Commit

Permalink
up version and demo
Browse files Browse the repository at this point in the history
  • Loading branch information
fauzisho committed Jun 9, 2024
1 parent 9333745 commit 25ce1bf
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,17 @@ def run_game_env():
env = gymconnectx.gym.make('gymconnectx/ConnectGameEnv',
connect=4,
width=7,
height=7,
height=6,
reward_winner=1,
reward_loser=-1,
living_reward=0, max_steps=100, delay=100, square_size=100,
avatar_player_1='img_cat.png', avatar_player_2='img_dog.png')
reward_living=0,
reward_draw=0.5,
reward_hell=-0.5,
max_steps=100,
delay=100,
square_size=100,
avatar_player_1='img_cat.png',
avatar_player_2='img_dog.png')
env.reset()
while not env.is_done and env.current_step < env.max_steps:
Expand All @@ -49,6 +55,7 @@ def run_game_env():
env.render(mode='terminal_display')
env.render(mode='gui_update_display')
print(f'Observation: {observations}')
print(f"Step: {env.current_step}, "
f"Move: {move}, "
f"Rewards: {rewards}, "
Expand Down
4 changes: 3 additions & 1 deletion gymconnectx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
'height': 7,
'reward_winner': 1,
'reward_loser': -1,
'living_reward': 0,
'reward_living': 0,
'reward_draw': 0.5,
'reward_hell': -0.5,
'max_steps': 100,
'delay': 100,
'square_size': 100,
Expand Down
Empty file removed gymconnectx/assets/__init__.py
Empty file.
File renamed without changes.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "gymconnectx"
version = "1.2.0"
version = "1.2.1"
description = "An OpenAI Gym Environment Connect X Game with GUI. ConnectX is a game for two players that is based on the well-known Connect 4. The goal is to place X coins in a row, column, or diagonal on a board with dimensions M by N."
readme = "README.md"
authors = [{ name = "Fauzi Sholichin" }]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='gymconnectx',
version='1.2.0',
version='1.2.1',
description='ConnectX is a game for two players that is based on the well-known Connect 4. The goal is to place X coins in a row, column, or diagonal on a board with dimensions M by N.',
url='https://github.com/fauzisho/GymConnectX',
author='Fauzi Sholichin',
Expand Down

0 comments on commit 25ce1bf

Please sign in to comment.