feat: Implement Serialize for MCTSBot (#1257)#1466
feat: Implement Serialize for MCTSBot (#1257)#1466SH20RAJ wants to merge 2 commits intogoogle-deepmind:masterfrom
Conversation
- Added MaxGameStringLength to Game class in spiel.h - Exposed in python bindings (pyspiel.cc) - Implemented for Kuhn Poker - Fixed compilation errors in spiel.h and bridge.cc (MutexLock) - Added unit test
- Added Serialize/Deserialize to MCTSBot - Enabled mcts_test in CMakeLists.txt (was missing) - Added unit test for serialization verifying determinism
|
This one has a similar problem as the other: it includes changes from two other PRs. Each PR should be independently. Please remove the files that are not part of the MCTS serialization. One suggestion: when you are creating new branches, branch directly from master, not from a different non-master branch. |
|
@SH20RAJ no need to recreate the PR, you did branching wrong, unfortunately, should've branched from
|
|
Thanks @lanctot and @alexunderch for the guidance! I'm still getting the hang of the workflow here. I will fix the branch by creating a clean branch from |
| std::string MCTSBot::Serialize() const { | ||
| std::ostringstream os; | ||
| os << uct_c_ << "\n"; | ||
| os << max_simulations_ << "\n"; | ||
| os << max_nodes_ << "\n"; | ||
| os << solve_ << "\n"; | ||
| os << max_utility_ << "\n"; | ||
| os << dirichlet_alpha_ << "\n"; | ||
| os << dirichlet_epsilon_ << "\n"; | ||
| os << dont_return_chance_node_ << "\n"; | ||
| os << verbose_ << "\n"; | ||
| os << static_cast<int>(child_selection_policy_) << "\n"; | ||
| os << rng_; // Serialization of mt19937 | ||
| return os.str(); | ||
| } |
There was a problem hiding this comment.
This doesn't save the tree? I think I'm missing something. What's the motivation of serializing an MCTS bot if you don't save the tree?
Implements Serialize and Deserialize for MCTSBot (Issue #1257).