You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
from hanabi_learning_environment.pyhanabi import HanabiGame g = HanabiGame() s1 = g.new_initial_state() print(s1.fireworks()) s2 = s1.copy() print(s2.fireworks())
And I got this output: [0, 0, 0, 0, 0] [0, 0, 0]
This means HanabiState.copy() is not copying the fireworks correctly. This issue presents itself in two different ways depending on the number of colors C in the game.
If C > 3, then HanabiState.copy() truncates the fireworks to a length of 3.
If C <= 3, then coping the state and calling s2.fireworks() throws the following error:
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is C) >= this->size() (which is C) Aborted (core dumped)
Where C is again the number of colors in the game parameters.
The text was updated successfully, but these errors were encountered:
This issue has been resolved on my end, but it took a minute because I'm also using the features implemented in #40. It would be great to see both #40 and #35 merged into the master branch soon.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I ran this straightforward script:
from hanabi_learning_environment.pyhanabi import HanabiGame
g = HanabiGame()
s1 = g.new_initial_state()
print(s1.fireworks())
s2 = s1.copy()
print(s2.fireworks())
And I got this output:
[0, 0, 0, 0, 0]
[0, 0, 0]
This means
HanabiState.copy()
is not copying the fireworks correctly. This issue presents itself in two different ways depending on the number of colorsC
in the game.If
C > 3
, thenHanabiState.copy()
truncates the fireworks to a length of 3.If
C <= 3
, then coping the state and callings2.fireworks()
throws the following error:terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is C) >= this->size() (which is C)
Aborted (core dumped)
Where
C
is again the number of colors in the game parameters.The text was updated successfully, but these errors were encountered: