Skip to content

AbstractPlayer.playerId refactor #119

Description

@hopshackle

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions