Skip to content

Commit 1023757

Browse files
committed
pretty readme and animatinos
1 parent 626d036 commit 1023757

File tree

4 files changed

+29
-13
lines changed

4 files changed

+29
-13
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@
99
*.pgcopy
1010
*.log
1111
*.png
12+
*.gif
13+
*.sh

README.md

+17-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,23 @@ robopoker
77

88
# Overview
99

10-
This started as a simple Rust project before evolving into a state-of-the-art poker solver and analysis tool seeking functional parity with Pluribus<sup>1</sup>, the first superhuman agent in multiplayer No Limit Texas Hold'em.
11-
10+
This started as a simple Rust project before evolving into a state-of-the-art poker solver and analysis tool seeking functional parity with Pluribus<sup>1</sup>, the first superhuman agent in multiplayer No Limit Texas Hold'em.
11+
12+
<table>
13+
<tr>
14+
<td align="center">
15+
<img src="https://github.com/user-attachments/assets/5118eba3-3d64-42f8-ac07-5c83ff733439" height="200" alt="Training Progress"/>
16+
<br>
17+
<em>Monte Carlo Tree Search</em>
18+
</td>
19+
<td align="center">
20+
<img src="https://github.com/user-attachments/assets/90b491df-9482-483e-9475-4360f5a17add" height="200" alt="Strategy Growth"/>
21+
<br>
22+
<em>Equity Distributions</em>
23+
</td>
24+
</tr>
25+
</table>
26+
1227
The guiding philosophy of this crate is to use very precise struct and trait abstractions to represent the rules, mechanics, and strategies of NLHE. Every module is modeled as closely as possible to its real-world analogue, while also utilizing clever representations and transformations to be as memory- and compute-efficient as possible. We lean heavily into idiomatic Rust by using lazy functional patterns, efficient data structure representations, infallible type conversions, thread-safe multi-processing, and strictly safe code.
1328

1429
The intended use case is a one-time resource-intensive training run that will save information abstractions, k-means clusters, distance metrics, and blueprint profiles to disk for use in later runs or analyses. To generate these datasets under arbitrary parametrization, the program will iterate through the following steps:

src/lib.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const KMEANS_TURN_TRAINING_ITERATIONS: usize = 128;
2626
const KMEANS_FLOP_TRAINING_ITERATIONS: usize = 128;
2727

2828
// mccfr parameters
29-
const CFR_BATCH_SIZE: usize = 128;
29+
const CFR_BATCH_SIZE: usize = 256;
3030
const CFR_TREE_COUNT: usize = 16_777_216;
3131
const CFR_ITERATIONS: usize = CFR_TREE_COUNT / CFR_BATCH_SIZE;
3232
const CFR_DISCOUNT_PHASE: usize = 100_000;
@@ -36,12 +36,11 @@ const CFR_PRUNNING_PHASE: usize = 100_000_000;
3636
const REGRET_MIN: Utility = -3e5;
3737
const REGRET_MAX: Utility = Utility::MAX;
3838
const POLICY_MIN: Probability = Probability::MIN_POSITIVE;
39-
4039
fn progress(n: usize) -> indicatif::ProgressBar {
4140
let progress = indicatif::ProgressBar::new(n as u64);
4241
let style = indicatif::ProgressStyle::with_template("{pos}")
4342
.unwrap()
44-
.progress_chars(".");
43+
.progress_chars("..");
4544
progress.set_style(style);
4645
progress
4746
}

src/play/game.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -101,20 +101,20 @@ impl Game {
101101
options.push(Action::Blind(Self::sblind()));
102102
return options;
103103
}
104-
if self.can_check() {
105-
options.push(Action::Check);
104+
if self.can_raise() {
105+
options.push(Action::Raise(self.to_raise()));
106106
}
107-
if self.can_fold() {
108-
options.push(Action::Fold);
107+
if self.can_shove() {
108+
options.push(Action::Shove(self.to_shove()));
109109
}
110110
if self.can_call() {
111111
options.push(Action::Call(self.to_call()));
112112
}
113-
if self.can_raise() {
114-
options.push(Action::Raise(self.to_raise()));
113+
if self.can_fold() {
114+
options.push(Action::Fold);
115115
}
116-
if self.can_shove() {
117-
options.push(Action::Shove(self.to_shove()));
116+
if self.can_check() {
117+
options.push(Action::Check);
118118
}
119119
options
120120
}

0 commit comments

Comments
 (0)