GithubHelp home page GithubHelp logo

janrvdolf / gpucfr Goto Github PK

View Code? Open in Web Editor NEW
17.0 2.0 5.0 194 KB

GPUCFR is a parallel implementation of Counterfactual Regret Minimization (CFR) in C++ and CUDA C for NVIDIA GPUs.

CMake 2.38% Cuda 62.89% C++ 33.27% Shell 1.46%

gpucfr's Introduction

The GPUCFR project implements Counterfactual Regret Minimization (CFR) [1] in parallel on a CUDA-compatible NVIDIA GPU. GPUCFR uses simultaneous updates Vanilla CFR on extensive-form games. The project started as a semestral project during the General-purpose computing on GPUs [2] course at Czech Technical University in Prague.

The class GPUCFR implements the GPU version of CFR. Classes Node and InformationSet are support classes for EFG formalism. Struct efg_node_t represents the Node class on the GPU.

Header files are in the directory include, and source code files are in the directory src. Data directory contains exported EFG trees for three variants of Goofspiel.

The code is tested on a desktop computer with Ubuntu 20.04, CUDA 11, and NVIDIA GeForce GTX 1050 Mobile. Also, the code was run on a cluster with NVIDIA Tesla V100.

Compilation on CTU's Research Center for Informatics Cluster

Ask for an interactive computation node with GPU:

srun -p gpufast --gres=gpu:1 --pty bash -i

Add dependencies:

module add CMake
module add fosscuda/2020a

Create a compilation directory:

mkdir cmake-build-debug && cd cmake-build-debug

Compile (with the choice of Volta architecture for NVIDIA Tesla V100):

cmake -DCMAKE_CUDA_ARCHITECTURES="70" ..
make

Compilation on Cesnet MetaCentrum

Ask for an interactive computation node with GPU:

qsub -I -l select=1:ncpus=1:ngpus=1 -q gpu

Add dependencies:

module add cmake
module add cuda

Create a compilation directory:

mkdir cmake-build-debug && cd cmake-build-debug

Compile:

cmake ..
make

References

[1] Martin Zinkevich et al. “Regret Minimization in Games with Incomplete Information”. In: Advances in Neural Information Processing Systems 20. Ed. by J. C. Platt et al. Curran Associates, Inc., 2008, pp. 1729–1736. url: http://papers.nips.cc/paper/3306-regret-minimization-in-games-with-incomplete-information.pdf

[2] Jan Rudolf "Counterfactual Regret Minimization on GPU". In: General-purpose computing on GPUs, Faculty of Electrial Engineering, Czech Technical University in Prague. url: https://cent.felk.cvut.cz/courses/GPU/archives/2020-2021/W/rudolja1/

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.