Giter Club home page Giter Club logo

cfrbasic's Introduction

Project consists of 3 folders, cfrBasic, Cfrm and training


cfrBasic and Cfrm:

cfrWhist.sln is a visual studio project in cfrBasic, for the generation of CFR data of a simplified version of whist, with both single and multithread support.
It is based on an implementation found here, https://github.com/brianberns/Cfrm.
 
The f# files for the adjusted implementation of the CFR algorithm are contained in Cfrm folder. 

In program.cs, the Main method contains the following values that can be adjusted:
	    bool multiThread = true; //toggle for multi-threading
            bool fileMergingEnabled = false; //toggle for merging of strategy files
            var numIterations = 100000; //number of iterations to run
            int progressInterval = numIterations/10; //interval to print progress

training: 
	
The training folder contains python code for the training and testing of a neural network using data generated by CFR.
It uses a copy of strategy.csv that was generated by 100 million iterations of CFR on a single thread. 

This code makes use of the pytorch library. It's CPU compute platform was used for this project. Libarary found at https://pytorch.org/ 



loadEncode.py contains file parsing logic, to adjust the data into tensors so the model can make use of it. It is imported by both model train and test files.

modelTrain.py contains the training of the model. 

modelCheck.py allows for a model to be quickly checked by the user by eye. 

whistTest.py contains testing of model against random and greedy agents as well as a human opponent.
	
	At the end of this file the following is adjustable:

	iterations(number of iterations for computer pairings)
	humanIter(number of iteration for human vs computer pairings)
	
	function calls can be uncommented/commented to enable/disable testing of different pairings
 


	

cfrbasic's People

Contributors

randal22 avatar

Watchers

 avatar

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.