Git Product home page Git Product logo

tabular_xdo's Introduction

Tabular XDO

Installation

(Tested on Ubuntu 20.04)

Overview

  1. Clone the repo
  2. Set up a Conda env
  3. Install OpenSpiel

Clone repo with git submodules

git clone --recursive [email protected]:indylab/tabular_xdo.git
cd tabular_xdo

If you've already cloned this repo but not the submodules, you can clone them with:

git submodule update --init --recursive

Set up Conda environment

After installing Anaconda, enter the repo directory and create the new environment:

conda env create -f environment.yml
conda activate grl

Install Python modules

1. DeepMind OpenSpiel (included dependency)

DeepMind's OpenSpiel is used for poker game logic as well as tabular game utilities.

# Starting from the repo root
cd dependencies/open_spiel
export BUILD_WITH_ACPC=ON # to compile with the optional universal poker game variant
./install.sh
pip install -e . # This will start a compilation process. Will take a few minutes.
cd ../..

Installation is now done!

Advanced Installation Notes (Optional)

If you need to compile/recompile OpenSpiel without pip installing it. Perform the following steps with your conda env * active*. (The conda env needs to be active so that OpenSpiel can find and compile against the python development headers in the env. Python version related issues may occur otherwise):

export BUILD_WITH_ACPC=ON # to compile with the optional universal poker game variant
mkdir build
cd build
CXX=clang++ cmake -DPython_TARGET_VERSION=3.6 -DCMAKE_CXX_COMPILER=${CXX} -DPython3_FIND_VIRTUALENV=FIRST -DPython3_FIND_STRATEGY=LOCATION ../open_spiel
make -j$(nproc)
cd ../../..

To import OpenSpiel without using pip, add OpenSpiel directories to your PYTHONPATH in your ~ /.bashrc (more details here):

# Add the following lines to your ~/.bashrc:
# For the python modules in open_spiel.
export PYTHONPATH=$PYTHONPATH:/<path_to_open_spiel_submodule>
# For the Python bindings of Pyspiel
export PYTHONPATH=$PYTHONPATH:/<path_to_open_spiel_submodule>/build/python

Running Experiments

To replicate figure 3.a, run the following commands:

python xdo_psro_fixed_population_comparison.py --num_strats 2
python xdo_psro_fixed_population_comparison.py --num_strats 10
python xdo_psro_fixed_population_comparison.py --num_strats 20
python xdo_psro_fixed_population_comparison.py --num_strats 50
python xdo_psro_fixed_population_comparison.py --num_strats 100
python xdo_psro_fixed_population_comparison.py --num_strats 300
python xdo_psro_fixed_population_comparison.py --num_strats 1000

To replicate figure 3.b, run the following commands:

python main_experiments.py --algorithm xdo --game_name leduc_poker
python main_experiments.py --algorithm psro --game_name leduc_poker

To replicate figure 3.c and figure 4.a, run the following commands:

python main_experiments.py --algorithm xdo --game_name leduc_poker_dummy
python main_experiments.py --algorithm psro --game_name leduc_poker_dummy
python main_experiments.py --algorithm cfr --game_name leduc_poker_dummy
python main_experiments.py --algorithm xfp --game_name leduc_poker_dummy

tabular_xdo's People

Contributors

jblanier avatar mcaleste avatar vitamintk avatar

Stargazers

Qizhen Zhang (Irene) avatar Mingzhi Wang avatar Zihan Ding avatar Adil Zouitine avatar Jarl Robert Pedersen Heer avatar Mike Walton avatar  avatar TzuRen avatar  avatar

Watchers

James Cloos avatar Roy Fox avatar  avatar  avatar

Forkers

vitamintk

tabular_xdo's Issues

Openspiel compilation error

Hi!
Thanks for sharing and I'm working on tabular xdo recently.
When I tried to install openspiel and run "pip install -e ." at folder tabular_xdo/dependencies/open_spiel, the compilation process raise error like :
" tabular_xdo/dependencies/open_spiel/open_spiel/../open_spiel/game_parameters.h:146:22: error: explicit specialization of 'value' in class scope"
Would you mind give me some suggestion on this error?
Thanks a lot!

Unknown game 'leduc_poker_dummy'

Hi!
Thanks for sharing and I am working on xdo recently.
When I tried to start an algorithm on leduc_poker_dummy, it reported that "pyspiel.SpielError: Unknown game 'leduc_poker_dummy'" and showed me the available games list. Would you mind give me some suggestion on this error?
Thanks a lot!

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.