Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AbstractPlayer.playerId refactor #119

Open
hopshackle opened this issue Oct 26, 2020 · 0 comments
Open

AbstractPlayer.playerId refactor #119

hopshackle opened this issue Oct 26, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@hopshackle
Copy link
Collaborator

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.

@hopshackle hopshackle self-assigned this Oct 26, 2020
@hopshackle hopshackle added the enhancement New feature or request label Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant