All Projects → 41semicolon → 41poker

41semicolon / 41poker

Licence: MIT license
a toolset for Texas Hold'em Poker

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to 41poker

Texas Hold Em Poker
德州扑克服务器Go实现
Stars: ✭ 53 (+307.69%)
Mutual labels:  poker
Poker
Poker framework for Python
Stars: ✭ 248 (+1807.69%)
Mutual labels:  poker
poker-calculator
Poker calculator for Texas Hold’em
Stars: ✭ 22 (+69.23%)
Mutual labels:  poker
Pluribus
Implementation of Pluribus by Noam Brown & Tuomas Sandholm, a Superhuman AI for 6-MAX No-Limit Holdem Poker Bot.
Stars: ✭ 92 (+607.69%)
Mutual labels:  poker
Pokerrl
Framework for Multi-Agent Deep Reinforcement Learning in Poker
Stars: ✭ 214 (+1546.15%)
Mutual labels:  poker
texas-poker-engine
Dummy Texas Poker Engine open source edition
Stars: ✭ 4 (-69.23%)
Mutual labels:  poker
Pokr
Make agile estimating and planning easy with our online planning or scrum poker tool
Stars: ✭ 44 (+238.46%)
Mutual labels:  poker
scrum-planning-poker
Please feel FREE to try it and give feedback by searching Scrum敏捷估算 in WeChat mini program.
Stars: ✭ 30 (+130.77%)
Mutual labels:  poker
Casinosclient
果派德州客户端源代码,使用Unity3D引擎。
Stars: ✭ 217 (+1569.23%)
Mutual labels:  poker
easyPokerHUD
This is the official repository for easyPokerHUD.
Stars: ✭ 40 (+207.69%)
Mutual labels:  poker
Deep Cfr
Scalable Implementation of Deep CFR and Single Deep CFR
Stars: ✭ 158 (+1115.38%)
Mutual labels:  poker
Qnmahjongserver
房卡麻将棋牌解决方案
Stars: ✭ 196 (+1407.69%)
Mutual labels:  poker
poinz
Distributed Planning Poker
Stars: ✭ 105 (+707.69%)
Mutual labels:  poker
Pypokergui
GUI application for PyPokerEngine
Stars: ✭ 72 (+453.85%)
Mutual labels:  poker
holdem
A texas holdem simulator build with WebAssembly and web workers
Stars: ✭ 42 (+223.08%)
Mutual labels:  poker
Node Poker Odds Calculator
A pre-flop and post-flop odds calculator for Texas Holdem.
Stars: ✭ 48 (+269.23%)
Mutual labels:  poker
pluribus-hand-parser
Parsing the hand histories that poker AI Pluribus played
Stars: ✭ 54 (+315.38%)
Mutual labels:  poker
pokerwars.io-starterbot-python
A starter bot written in python for the pokerwars.io platform. To play: pull this code, register on pokerwars.io, get your API token and play!
Stars: ✭ 37 (+184.62%)
Mutual labels:  poker
PokerTexter
SMS App for Poker Odds. Runs on Flask + Twilio + Heroku.
Stars: ✭ 17 (+30.77%)
Mutual labels:  poker
bet
This repository holds the implementation code of Pangea Poker white paper: https://bit.ly/3bdCz0Z
Stars: ✭ 15 (+15.38%)
Mutual labels:  poker

41poker

Build Status

41poker is a JavaScript toolset for Texas Hold'em, including

  • efficient hand evaluator for 5,6,7 cards
  • hand strength simulator for preflop, flop, turn
  • console/browser gameplay
  • smart agent (to be implemented)
  • ...

Some development notes are published in Japanese at Qiita. Contact me @41semicolon at Twitter.

Install

TBW

Usage

import

const P = require('./src/index.js');
// will be replaced by const P = require('41poker') when published to npm;

deal 7 cards and evaluate it.

const myhand = P.deck().slice(0,7);
console.log(myhand)
// -> [ 46, 48, 13, 30, 16, 1, 4 ]

const value = P.handval(myhand);
const name = P.handname(value);
const handrepr = myhand.map(P.repr).join(' ');
console.log(handstr, name, value);
// -> K♣ A♥ 5♦ 9♣ 6♥ 2♦ 3♥ high card 6305

calculate your hand strength (derived by simulation)

P.hs([51, 50], 2) // -> 0.8553, hand strength of AA, 2players, preflop.
P.hs([51, 50], 3) // -> 0.7444, hand strength of AA, 3players, preflop.

P.hs([51, 50], 2, [3, 8, 40]) // -> 0.8466 hs of AA, 2players, flop with 2♠ 4♥ Q♥
P.hs([51, 50], 3, [3, 8, 40]) // -> 0.7287 hs of AA, 3players, flop with 2♠ 4♥ Q♥

P.hs([51, 50], 2, [3, 8, 40, 20]) // -> 0.7837 hs of AA, 2players, turn with 2♠ 4♥ Q♥ 7♥
P.hs([51, 50], 3, [3, 8, 40, 20]) // -> 0.6212 hs of AA, 3players, turn with 2♠ 4♥ Q♥ 7♥

handmeter, which you can find in TV show.

const deck = P.deck();
const hands = [deck.slice(0, 2), deck.slice(2, 4)];
const hrepr = hands.map(([c1 ,c2]) => P.repr(c1) + P.repr(c2));
console.log(hrepr);
// -> [ '7♦A♥', '6♣2♠' ]

const preflop = P.handmeterTV([], hands).map(x => x.toFixed(2));
console.log(hrepr[0], preflop[0], hrepr[1], preflop[1]);
// -> 7♦A♥ 66.41 6♣2♠ 33.59

const flop = P.handmeterTV(deck.slice(4, 7), hands).map(x => x.toFixed(2));
console.log(hrepr[0], flop[0], hrepr[1], flop[1], deck.slice(4, 7).map(P.repr).join(''));
// -> 7♦A♥ 92.64 6♣2♠ 7.36 A♦T♠K♠

const turn = P.handmeterTV(deck.slice(4, 8), hands).map(x => x.toFixed(2));
console.log(hrepr[0], turn[0], hrepr[1], turn[1], deck.slice(4, 8).map(P.repr).join(''));
// -> 7♦A♥ 100.00 6♣2♠ 0.00 A♦T♠K♠8♣

Articles

In github pages, some outcome derived by 41poker is available.

Some development notes are available in Japanese.

Thanks

License

MIT © @41semicolon

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].