GithubHelp home page GithubHelp logo

fschlatt / clubs_gym Goto Github PK

View Code? Open in Web Editor NEW
26.0 26.0 2.0 356 KB

Open AI gym poker environment built using the clubs package

License: GNU General Public License v3.0

Python 98.72% Shell 1.28%
machine-learning poker python reinforcement-learning

clubs_gym's People

Contributors

fschlatt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

hobbit19 tfrietto

clubs_gym's Issues

There might be an error in the poker gym env.

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

errors with pip install clubs-gym

A couple other project teammates and I tried installing the repo through pip, and we ran into two problems:

  1. It seems that 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.
  2. When running the example script, line 1 (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!

render method only works once

After rendering NoLimitHoldemTwoPlayer-v0 once, running render throws an InvalidRenderModeError from line 429 in clubs/poker/engine.py
Using python 3.8.5

Screen Shot 2021-03-22 at 11 31 48 PM

P.S. this is my first github issue, any advice on improving is appreciated

Only one hole_card is displayed in `env.reset()` (NoLimitHoldemTwoPlayer-v0)

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.