-
Notifications
You must be signed in to change notification settings - Fork 99
Description
Can we move/remove the playerId property from AbstractPlayer?
The direct problem this is causing (for me) is that in MCTS rollout I want to 'inject' a Heuristic Policy (that implements AbstractPlayer) and will take decisions during rollout.
I also want to do the same for OpponentModels - i.e. after copying an AbstractGameState from a player's perspective, we then 'inject' how they think the opponents will behave, and then rollout. Obviously these AbstractPlayer implementations will not be the real opponent policies.
At the moment this is not possible, as the playerID can only be set in Game.
One possible approach is to have a Map<Integer, AbstractPlayer> in AbstractGameState, which can therefore be overidden on copied states for the purposes above. Game still retains its AbstractPlayer information - and this is used to initialise the new Map?
I'd like to understand what AbstractPlayer.playerID is used for more widely first though.