Cjreynol-zz / willsmith

A framework for creating, testing, and comparing AI agents
MIT License
0 stars 1 forks source link

MCTSAgent assumes 2-player adversarial game #1

Closed Cjreynol-zz closed 6 years ago

Cjreynol-zz commented 6 years ago

At both https://github.com/Cjreynol/Monte-Carlo-Tree-Search/blob/b1d392bcaaca5e83ab2ff140db2c03c53b7a2a09/mcts_agent.py#L51 and https://github.com/Cjreynol/Monte-Carlo-Tree-Search/blob/b1d392bcaaca5e83ab2ff140db2c03c53b7a2a09/mcts_agent.py#L76 we make this assumption about the game.

The fix would be to add some methods to the Game class for polling which "team" is up on the game state in reference to the current agent_id. Not sure how a team would be decided, I assume this information would have to be encoded in specific Game subclasses.

Cjreynol-zz commented 6 years ago

The Node now keeps track of the agent_id whose turn it represents as of e7513896b2f4f83973b69e5a536f55f9c51b6930