Skip to content

A minimal Hanabi emulator, written in pure Python.

Notifications You must be signed in to change notification settings

tombewley/Hanabi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimal Hanabi Emulator

Hanabi

Hanabi is a cooperative card game created by Antoine Bauza. Playing the game successfully demands players effectively cultivate a theory of mind for each of their team mates. For this reason, Hanabi was recently identified as a challenging "new frontier for AI research".

This ultra-minimal (194 lines of Python 3) Hanabi emulator provides a simple test bed for the Hanabi problem. It should be easy for anybody to run and understand, and has no dependencies aside from the random module (for shuffling the deck!)


example.py walks you through the basic interactions needed to play the game. Broadly speaking:

  • Initialise the game with a set of players.
  • For each turn, the active player p:
    • Receives an observation of the game state from their perspective, and surveys what pieces of information it may give to the other players.
    • Decides which action to take: play, discard or give information.
    • Submits the action to the game emulator.
  • The game ends when either the maximum score is reached, the players run out of 'fuses', or the deck is empty.

Enjoy!

About

A minimal Hanabi emulator, written in pure Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages