Skip to content

JuliaReinforcementLearning/Hanabi.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hanabi.jl

This package provides a Julia wrapper for the game deepmind/hanabi-learning-environment with Clang.jl

Install

pkg> add Hanabi

Usage

All the APIs should be the same with those listed here with renaming.

  • CamelFunctionName -> camel_function_name
  • PyStructName -> StructName

Example

game = Ref{HanabiGame}()
new_default_game(game)
observation = Ref{HanabiObservation}()
state = Ref{HanabiState}()
new_state(game, state)
observation = Ref{HanabiObservation}()
new_observation(state, 0, observation)
unsafe_string(obs_to_string(observation))
# Life tokens: 3
# Info tokens: 8
# Fireworks: R0 Y0 G0 W0 B0
# Hands:
# -----
# Deck size: 50
# Discards:

You may also check some high level APIs in ReinforcementLearningEnvironments.jl

Play Game Interactively

Check out src/service.jl to see how to play Hanabi interactively.

play_interactively.png