facebookresearch / hanabi_SAD

Simplified Action Decoder for Deep Multi-Agent Reinforcement Learning
Other
96 stars 35 forks source link

HanabiEnv::step #21

Open ingo-ch opened 3 years ago

ingo-ch commented 3 years ago

Hi Hengyuan

1) Is it possible to have an interaction with the game in python step by step. So something similar to the gym environments "obs, reward, done, info = env.step(action)"? 2) related to 1) I can see the "step" function in "pybind.cc". However the argument to pass to the step function seems to be a c object. Below is a simple script I tried to run.

import sys
lib_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(lib_path)

from create import *

g = create_envs(1, 1, 2, 5, 0, [0], 1, True, False, False)[0]
g.reset()

# for example the below works fine
print(g.move_is_legal(1)) 
print(g.deck_history())

# not sure how to make "g.step(a)" work though? 

Is it possible to have "g.step(a)" in python and get the observation updated afterwards for every step of a single game?

Thank you!