A Texas Hold 'Em AI utilizing by reinforcement learning
- python 2.7 for
player.py
(game agent, deuces related, random forest for reward predicting) - python 3.5 for
zmq_server.py
(DQN tensorflow related) - sklearn for py2.7
- tensorflow for py3.5
- zmq for py2 & py3
-
Run below steps at python 2.7
- collect data by
util.py
at gaming as log1.txt, log2.txt - generate dataset by
log_to_dataset.py
- train model-1(predict reward) by
train_model_1.py
, this model helps you predict thereward
- run game agent
player.py
- collect data by
-
Then, run below steps at python 3.5
- run DQN server
zmq_server.py
- run DQN server
- since poker game related modules such as deuces not support python3, and DQN related modules tensorflow not support python2
- they communicated by zmq. agent send cmd and data to server, server reply DQN predicted action.
- reward is predicted by random forest: currently we have get acc=86%
- 29 features at
util.py
- action (1~7)
- round name (1/2/3...)
- is_big_blind
- is_small_blind
- player_num
- chips
- amount
- minBet
- totalBet
- betCount
- initChips
- big_blind_amount
- small_blind_amount
- board_cards
- self_cards
- card_score
- my_card_contribution
- other players action statistic
- observation
- features not include action (0)
- reward
- winners actions are 1, else 0
- hard to define reward for each action, so train RandomForest model to do this work