Skip to content

Commit

Permalink
Fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiahpslewis committed Mar 26, 2024
1 parent 9640fe6 commit f01afec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ end
RLBase.players(::TicTacToeEnv) = (Player(:Cross), Player(:Nought))

RLBase.state(env::TicTacToeEnv) = state(env, Observation{Int}(), Player(:Any))
RLBase.state(env::TicTacToeEnv, ::Observation{BitArray{3}}, p) = env.board
RLBase.state(env::TicTacToeEnv, ::RLBase.AbstractStateStyle) = state(env::TicTacToeEnv, Observation{Int}(), 1)
RLBase.state(env::TicTacToeEnv, ::Observation{BitArray{3}}, player) = env.board
RLBase.state(env::TicTacToeEnv, ::RLBase.AbstractStateStyle) = state(env::TicTacToeEnv, Observation{Int}(), Player(1))
RLBase.state(env::TicTacToeEnv, ::Observation{Int}, player::Player) =
get_tic_tac_toe_state_info()[env].index

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@
end

@testset "Wrapped Env run" begin
Base.@kwdef mutable struct LotteryEnv <: AbstractEnv
reward::Union{Nothing, Int} = nothing
end

struct LotteryAction{a}
function LotteryAction(a)
new{a}()
Expand Down

0 comments on commit f01afec

Please sign in to comment.