Skip to content

Wrong style for state report for TicTacToeEnv() #1079

Open
@hespanha

Description

@hespanha

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

amir1387aht commented on Aug 27, 2024

@amir1387aht
amir1387aht

amir1387aht commented on Aug 27, 2024

@amir1387aht
jeremiahpslewis

jeremiahpslewis commented on Aug 27, 2024

@jeremiahpslewis
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

hespanha commented on Sep 3, 2024

@hespanha
Author

Done.
Joao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jeremiahpslewis@hespanha@amir1387aht

        Issue actions

          Wrong style for state report for TicTacToeEnv() · Issue #1079 · JuliaReinforcementLearning/ReinforcementLearning.jl