Comments (4)
I got it. Such a feature could be useful, but it would also require a bit of effort. If you could work on it in your forked repository, I would appreciate it. PRs are always welcome!
from postflop-solver.
I am not sure I grasp your intent. The game tree can be traversed after solving by calling the play()
method of the PostFlopGame
struct. The children nodes can also be obtained by the available_actions()
method.
It is hard to make the game tree mutable after it is solved. This is because the strategy and EV data are stored in a single global buffer.
Also, although the implementation will probably wait a month or two, there is a plan to implement the ability to save the data without post-river information.
from postflop-solver.
Yeah, I wrote a traverser and it works but it took some time and the logic was a little subtle. I'm sure I didn't find the nicest implementation, but I guess that's the point: it took me most of the day to build a traverser and I ran into a few dead ends/etc, and I thought it would be a good piece of logic to abstract out.
I'm coming at this from a "I want to perform analyses on game trees" perspective, so I'll be writing lots of traversals and I'll probably be abstracting this logic out anyway. It may be too niche for the main repo, but I think there's some definite value added to have an interface that makes traversals easy.
Here is an example that builds a traverser that identifies low-frequency actions and stores them for removal later.
let removed_lines: Vec
let traverser = GameTreeTraverserFactory::new()
.breadth_first() // do a breadth-first traversal
.with_skip_actions(|action, history| action.frequency() < 0.01) // skip low-frequency action
.with_action_processor( // store low-frequency actions
|action, history|
if node.frequency() < 0.01 {
let mut line = history.clone();
line.push(action);
removed_lines.push(line);
})
.build();
traverser.traverse();
Obviously the interface would need to be a bit more complicated than this (I'd want to pass a &PostFlopGame
reference into the lambdas), but this is the basic idea.
from postflop-solver.
Another use case would be turn aggregation reports, river aggregation reports, etc. If you've ever messed with compilers I'm basically looking for something that does the same thing as the Visitor Pattern.
Anyway, I'll try to hack something together on my fork and if it looks not horrible I'll send a PR along.
from postflop-solver.
Related Issues (20)
- Easiest way to compute intermediate EVs and MESs during solve HOT 4
- Removing different actions from different turns/rivers HOT 7
- Add discussion board to repo? HOT 1
- PLO extension HOT 4
- Why resets the cumulative strategy when the number of iterations is a power of 4? HOT 1
- Print tree actions HOT 2
- Exploitability Calculation - ICM HOT 4
- Release Ram after solving HOT 1
- Slow time to load saved solution HOT 3
- [Project] Trainer derived from postflop-solver HOT 1
- Is there a limit to the number of cores used? HOT 6
- GPU implementation HOT 1
- Unclear how to save a file HOT 2
- I wish I had a clue how to use this.. HOT 2
- node lock HOT 2
- Extremely slow serialization with bincode v2 HOT 1
- Decompression speed improvements
- Example usage and solver tests are incorrect HOT 3
- Announcement: Suspension of development of open-source poker solver project HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postflop-solver.