Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

rl_env.step() exits the program if illegal move is passed instead of throwing an exception #28

Open
carlbalmer opened this issue Nov 28, 2019 · 1 comment

Comments

@carlbalmer
Copy link
Contributor

If an illegal move is supplied to rl_env.step() the underlying c library just exits with a message to stderr:

Input requirements failed at ../../../hanabi_learning_environment/hanabi_lib/hanabi_state.cc:222 in ApplyMove: MoveIsLegal(move)
Aborted (core dumped)

It would be nice if rl_env.step() would raise a ValueError instead.

@carlbalmer
Copy link
Contributor Author

Tried to throw an exception in hanabi_state.cc ApplyMove() but cffi does not seem to pass exceptions from c++ to python.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant