SignetStudios / slackbot-uno

MIT License
4 stars 5 forks source link

Create a simple AI player to play the game #12

Closed kingofzeal closed 8 years ago

kingofzeal commented 8 years ago

Plays immediately on their turn. Uses the following precedence for actions:

Will always vote to reset the game (except in games with exactly 3 players).

Ideally, the bot code will reside in a separate file, and will be injected as a callback to the game code, which is executed on endTurn. Bot players should have a flag identifying them as such (to know if the callback should be executed or not). It could also identify the name of the bot (eg, 'SimpleBot') in the turn status information. Player1 can add bots to the game by using a new command and specifying the type/name of the bot (eg /uno addbot simplebot).

We will need to do something with the API so it can interact with the game state. Initially, the full game state can be passed to the bot's callback and it can operate on that. However, in practice it might not be a good idea to let bots see everybody's hand information.

kingofzeal commented 8 years ago

Closed with #16