Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong style for state report for TicTacToeEnv() #1079

Open
hespanha opened this issue Aug 27, 2024 · 2 comments
Open

Wrong style for state report for TicTacToeEnv() #1079

hespanha opened this issue Aug 27, 2024 · 2 comments

Comments

@hespanha
Copy link

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
@jeremiahpslewis
Copy link
Member

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?

@hespanha
Copy link
Author

hespanha commented Sep 3, 2024

Done.
Joao

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

No branches or pull requests

3 participants
@jeremiahpslewis @hespanha and others