mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:27:35 +00:00
ChessEngine: Use reduced Board objects in MCTSTree
Monte-Carlo methods are known to intensively create nodes and in our case each leaf of the tree stores a board. However, for this use case, we don't need a full board object that also contains game information. This patch adds a `clone_cleared()` method that return a clone without game information and uses it when constructing the tree. It allows the ChessEngine much more possibility before getting out of memory.
This commit is contained in:
parent
5f13a87ce7
commit
351fc0cce2
3 changed files with 15 additions and 4 deletions
|
@ -117,6 +117,7 @@ struct Move {
|
|||
class Board {
|
||||
public:
|
||||
Board();
|
||||
Board clone_without_history() const;
|
||||
|
||||
Piece get_piece(Square const&) const;
|
||||
Piece set_piece(Square const&, Piece const&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue