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

Tutorial OpenSpiel KuhnOpenNSFP fails #1024

Closed
finmod opened this issue Mar 5, 2024 · 6 comments
Closed

Tutorial OpenSpiel KuhnOpenNSFP fails #1024

finmod opened this issue Mar 5, 2024 · 6 comments

Comments

@finmod
Copy link

finmod commented Mar 5, 2024

Trying to run this example: https://juliareinforcementlearning.org/docs/experiments/experiments/NFSP/JuliaRL_NFSP_OpenSpiel/#JuliaRL\\_NFSP\\_OpenSpiel(kuhn_poker) on WSL Ubuntu 2204 Julia 1.10.2.

It fails as follows:

LoadError: MethodError: no method matching information_state_tensor(::CxxWrap.StdLib.UniquePtrAllocated{State}, ::Int64)

Closest candidates are:
information_state_tensor(::Union{State, CxxWrap.CxxWrapCore.CxxRef{<:State}}, ::Integer)
@ OpenSpiel ~/.julia/packages/CxxWrap/5IZvn/src/CxxWrap.jl:624

in expression starting at In[8]:121

Stacktrace:
[1] _state(env::OpenSpielEnv{CxxWrap.StdLib.UniquePtrAllocated{State}, CxxWrap.StdLib.SharedPtrAllocated{Game}}, ::InformationSet{Array}, player::Int64)
@ ReinforcementLearningEnvironments ~/.julia/packages/ReinforcementLearningEnvironments/Pzsys/src/environments/3rd_party/open_spiel.jl:141
[2] state(env::OpenSpielEnv{CxxWrap.StdLib.UniquePtrAllocated{State}, CxxWrap.StdLib.SharedPtrAllocated{Game}}, ss::InformationSet{Array}, player::Int64)
@ ReinforcementLearningEnvironments ~/.julia/packages/ReinforcementLearningEnvironments/Pzsys/src/environments/3rd_party/open_spiel.jl:135
[3] state
@ ~/.julia/packages/ReinforcementLearningEnvironments/Pzsys/src/environments/wrappers/wrappers.jl:21 [inlined]
[4] state(env::DefaultStateStyleEnv{InformationSet{Array}(), ActionTransformedEnv{var"#21#25"{OpenSpielEnv{CxxWrap.StdLib.UniquePtrAllocated{State}, CxxWrap.StdLib.SharedPtrAllocated{Game}}}, var"#20#24"{OpenSpielEnv{CxxWrap.StdLib.UniquePtrAllocated{State}, CxxWrap.StdLib.SharedPtrAllocated{Game}}}, OpenSpielEnv{CxxWrap.StdLib.UniquePtrAllocated{State}, CxxWrap.StdLib.SharedPtrAllocated{Game}}}}, player::Int64)
@ ReinforcementLearningEnvironments ~/.julia/packages/ReinforcementLearningEnvironments/Pzsys/src/environments/wrappers/DefaultStateStyle.jl:20
[5] Experiment(::Val{:JuliaRL}, ::Val{:NFSP}, ::Val{:OpenSpiel}, game::SubString{String}; seed::Int64)
@ Main ./In[8]:35
[6] Experiment
@ ./In[8]:17 [inlined]
[7] Experiment(s::String)
@ ReinforcementLearningCore ~/.julia/packages/ReinforcementLearningCore/yeRLW/src/core/experiment.jl:46
[8] var"@E_cmd"(source::LineNumberNode, module::Module, s::Any)
@ ReinforcementLearningCore ~/.julia/packages/ReinforcementLearningCore/yeRLW/src/core/experiment.jl:36

@finmod
Copy link
Author

finmod commented Mar 5, 2024

Same problem with KuhnOpenEDHook. Perhaps this issue should be raised in OpenSpiel since it has to do with CxxWrap?

@jeremiahpslewis
Copy link
Member

this should / may fix it JuliaReinforcementLearning/OpenSpiel.jl#21

@jeremiahpslewis
Copy link
Member

Try OpenSpiel.jl v0.2.2

@finmod
Copy link
Author

finmod commented Mar 5, 2024

Test OpenSpiel v0.2.2 Ok, Test ReinforcementLearning v0.10.2 Ok .

It continues to fail:

{
"name": "LoadError",
"message": "LoadError: MethodError: no method matching information_state_tensor_shape(::CxxWrap.StdLib.SharedPtrAllocated{Game})

Closest candidates are:
information_state_tensor_shape(::Union{Ptr{Nothing}, CxxWrap.CxxWrapCore.ConstCxxPtr{<:Game}, CxxWrap.CxxWrapCore.CxxPtr{<:Game}})
@ OpenSpiel ~/.julia/packages/CxxWrap/5IZvn/src/CxxWrap.jl:624
information_state_tensor_shape(::Union{Game, CxxWrap.CxxWrapCore.ConstCxxRef{<:Game}, CxxWrap.CxxWrapCore.CxxRef{<:Game}})
@ OpenSpiel ~/.julia/packages/CxxWrap/5IZvn/src/CxxWrap.jl:624

in expression starting at In[2]:69",
"stack": "LoadError: MethodError: no method matching information_state_tensor_shape(::CxxWrap.StdLib.SharedPtrAllocated{Game})

Closest candidates are:
information_state_tensor_shape(::Union{Ptr{Nothing}, CxxWrap.CxxWrapCore.ConstCxxPtr{<:Game}, CxxWrap.CxxWrapCore.CxxPtr{<:Game}})
@ OpenSpiel ~/.julia/packages/CxxWrap/5IZvn/src/CxxWrap.jl:624
information_state_tensor_shape(::Union{Game, CxxWrap.CxxWrapCore.ConstCxxRef{<:Game}, CxxWrap.CxxWrapCore.CxxRef{<:Game}})
@ OpenSpiel ~/.julia/packages/CxxWrap/5IZvn/src/CxxWrap.jl:624

in expression starting at In[2]:69

Stacktrace:
[1] _state(env::OpenSpielEnv{CxxWrap.StdLib.UniquePtrAllocated{State}, CxxWrap.StdLib.SharedPtrAllocated{Game}}, ::InformationSet{Array}, player::Int64)
@ ReinforcementLearningEnvironments ~/.julia/packages/ReinforcementLearningEnvironments/Pzsys/src/environments/3rd_party/open_spiel.jl:141
[2] state(env::OpenSpielEnv{CxxWrap.StdLib.UniquePtrAllocated{State}, CxxWrap.StdLib.SharedPtrAllocated{Game}}, ss::InformationSet{Array}, player::Int64)
@ ReinforcementLearningEnvironments ~/.julia/packages/ReinforcementLearningEnvironments/Pzsys/src/environments/3rd_party/open_spiel.jl:135
[3] state
@ ~/.julia/packages/ReinforcementLearningEnvironments/Pzsys/src/environments/wrappers/wrappers.jl:21 [inlined]
[4] state
@ ~/.julia/packages/ReinforcementLearningEnvironments/Pzsys/src/environments/wrappers/DefaultStateStyle.jl:20 [inlined]
[5] Experiment(::Val{:JuliaRL}, ::Val{:ED}, ::Val{:OpenSpiel}, game::SubString{String}; seed::Int64)
@ Main ./In[2]:40
[6] Experiment(::Val{:JuliaRL}, ::Val{:ED}, ::Val{:OpenSpiel}, game::SubString{String})
@ Main ./In[2]:22
[7] Experiment(s::String)
@ ReinforcementLearningCore ~/.julia/packages/ReinforcementLearningCore/yeRLW/src/core/experiment.jl:46
[8] var"@E_cmd"(source::LineNumberNode, module::Module, s::Any)
@ ReinforcementLearningCore ~/.julia/packages/ReinforcementLearningCore/yeRLW/src/core/experiment.jl:36"
}

@jeremiahpslewis
Copy link
Member

@jeremiahpslewis
Copy link
Member

Try OpenSpiel.jl v0.2.3

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

2 participants