Open
Description
A call to
state(env::TicTacToeEnv, Observation{BitArray{3}}())
does not result in the correct style.
The error can be "seen" using:
env = TicTacToeEnv()
display(state(env, Observation{String}(), current_player(env))) # works as expected
display(state(env, Observation{String}())) # works as expected
display(state(env, Observation{BitArray{3}}(), current_player(env))) # works as expected
display(state(env, Observation{BitArray{3}}())) # reports state default style: Observation{Int}
A simple fix is to the following line to TicTacToeEnv.jl
RLBase.state(env::TicTacToeEnv, ::Observation{BitArray{3}}) = env.board
Activity
amir1387aht commentedon Aug 27, 2024
amir1387aht commentedon Aug 27, 2024
jeremiahpslewis commentedon Aug 27, 2024
Hey! Thanks for the bug report! Would you mind creating pull requests for your fix, ideally with a new unit test that catches the error?
Fix and unit test for issue "Wrong style for state report for TicTacT…
hespanha commentedon Sep 3, 2024
Done.
Joao