Giter Site home page Giter Site logo

vsupalov / pokerlookup-rs Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 26 KB

Contains the means to generate a large lookup table, which can be subsequently used to evaluate large amounts of 5, 6 and 7 card poker hands really fast.

License: GNU General Public License v3.0

Rust 100.00%

pokerlookup-rs's Introduction

#pokerlookup-rs

A library which provides the means to generate a large lookup table (about 124MB), which can be dumped to and loaded from a file. 5, 6 and 7 card poker hands can be evaluated using this table with impressive throughput.

The crate is called pokerlookup and you can depend on it via cargo:

[dependencies.pokerlookup]
git = "https://github.com/th4t/pokerlookup-rs.git"

Setup

Before running tests, execute the following command from the project root directory, to generate a HandRank.dat file. This will take a while. Not too long.

# or this, to get the results way faster:
$ cargo build --release
$ ./target/release/generate

Arguably, you could also try cargo run, but this will be painfully slow due to the debug build mode. Only if you want to wait a good while.

Afterwards the tests should run through successfully, evaluating all possible 5-card poker hands

$ cargo test

Checksum

The md5 sum of the generated HandRanks.dat file should be 5003cf3e6d5c9b8ee77094e168bfe73f.

License

As the original cpp code for this was licensed under GPL, this crate carries a similar license.

Related Crates

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.