To simplify mcts::BoardRefView, we can just provide some needed online version interfaces for mcts::ActionAnalyzer, and provide traversal bridge interface for mcts::BoardView. In this way, we can eliminate the classes like RefSelfMinions, RefHandCards, etc.
Currently the usage graph is like:
Ideally, mcts::ActionAnalyzer should only rely on the information of mcts::BoardView, rather than the full information of state::State
One proposal is to make the usage graph like:
But, in current implemention, mcts::BoardView needs a 'copy' of the data members of BoardView.
So, it would be better to implement a mcts::BoardRefView, which
Then, the mcts::ActionAnalyzer can uses mcts::BoardRefView to construct action analyzer without unnecessary copy.
The dependency graph will be like:
To simplify mcts::BoardRefView, we can just provide some needed online version interfaces for mcts::ActionAnalyzer, and provide traversal bridge interface for mcts::BoardView. In this way, we can eliminate the classes like RefSelfMinions, RefHandCards, etc.