fschlatt / clubs_gym Goto Github PK
View Code? Open in Web Editor NEWOpen AI gym poker environment built using the clubs package
License: GNU General Public License v3.0
Open AI gym poker environment built using the clubs package
License: GNU General Public License v3.0
Hi, fschlatt,
when I run the example.py, I meet an error as follows:
Traceback (most recent call last):
File "E:\code\poker\clubs_gym-main\clubs_gym-main\example.py", line 5, in
env = gym.make("KuhnTwoPlayer-v0")
File "D:\anaconda23\envs\gympoker\lib\site-packages\gym\envs\registration.py", line 669, in make
env = PassiveEnvChecker(env)
File "D:\anaconda23\envs\gympoker\lib\site-packages\gym\wrappers\env_checker.py", line 27, in init
check_observation_space(env.observation_space)
File "D:\anaconda23\envs\gympoker\lib\site-packages\gym\utils\passive_env_checker.py", line 109, in check_space
check_space(subspace, space_type, check_box_space_fn)
File "D:\anaconda23\envs\gympoker\lib\site-packages\gym\utils\passive_env_checker.py", line 101, in check_space
), f"An empty Tuple {space_type} space is not allowed."
AssertionError: An empty Tuple observation space is not allowed.
And my conda env is shown as follows:
Package Version
certifi 2022.12.7
cloudpickle 2.2.1
clubs 0.1.4
clubs-gym 0.1.4
gym 0.26.2
gym-notices 0.0.8
importlib-metadata 6.0.0
numpy 1.21.6
pip 22.3.1
setuptools 65.6.3
typing_extensions 4.5.0
wheel 0.38.4
wincertstore 0.2
zipp 3.15.0
A couple other project teammates and I tried installing the repo through pip, and we ran into two problems:
pip install clubs-gym
doesn't install gym
accordingly, so it would be awesome if it could be clarified that gym
is a required package.from . import agent, configs, envs, poker
) of __init__.py
bugs out saying ImportError: cannot import name 'agent' from 'clubs'
. Digging into this deeper, this seems to be because pip
does not download the folders inside clubs
(agent
, envs
, poker
, render
). The only way we can run the code is if we clone the repo onto our local machines and run the example.py
script in the repo.Thank you for your help!
Considering the following code, I can't manage to access the hole_cards of both players (should have 4 hole_cards in total). I only get one - more precisely, print(env.reset())
returns {'action': 1, 'active': [True, True], 'button': 1, 'call': 1, 'community_cards': [], 'hole_cards': Card (1981034057104): 5โ , 'max_raise': 99, 'min_raise': 3, 'pot': 3, 'stacks': [98, 99], 'street_commits': [2, 1]}
. I would assume observation['hole_cards']
should return more than just one card?
import gym
import clubs_gym
env_str = "NoLimitHoldemTwoPlayer-v0"
num_players = 2
num_streets = 4
blinds = [1, 2]
antes = 0
raise_sizes = ['inf', 'inf', 'inf', 'inf']
num_raises = 'inf'
num_suits = 4
num_ranks = 13
num_hole_cards = 2
mandatory_num_hole_cards = 0
num_community_cards = [0, 3, 1, 1]
start_stack = 100
n_cards_for_hand = 5
order = ['sf', 'fk', 'fh', 'fl', 'st', 'tk', 'tp', 'pa', 'hc']
config_dict = {'num_players': num_players,
'num_streets': num_streets,
'blinds': blinds,
'antes': antes,
'raise_sizes': raise_sizes,
'num_raises': num_raises,
'num_suits': num_suits,
'num_ranks': num_ranks,
'num_hole_cards': num_hole_cards,
'mandatory_num_hole_cards': mandatory_num_hole_cards,
'num_community_cards': num_community_cards,
'start_stack': start_stack,
'num_cards_for_hand': n_cards_for_hand,
'order': order}
clubs_gym.envs.register({env_str: config_dict})
env = gym.make(env_str)
print(env.reset())
I am using those versions of clubs
and clubs_gym
. I'm using Python 3.9.10
. I'm on Windows 11
.
clubs==0.1.4
clubs-gym==0.1.3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.