-
Notifications
You must be signed in to change notification settings - Fork 143
Closed
Description
Add ]add https://github.com/jonathan-laurent/AlphaZero.jl
and run
using AlphaZero; Scripts.train("connect-four")
(using julia Version 1.7.3 (2022-05-06) on macOS)
ERROR: MethodError: no method matching zero(::Type{Any})
Closest candidates are:
zero(::Type{Union{Missing, T}}) where T at /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/base/missing.jl:105
zero(::Union{Type{P}, P}) where P<:Dates.Period at /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Dates/src/periods.jl:53
zero(::FillArrays.Ones{T, N}) where {T, N} at ~/.julia/packages/FillArrays/5Arin/src/FillArrays.jl:545
...
Stacktrace:
[1] zero(#unused#::Type{Any})
@ Base ./missing.jl:106
[2] reduce_empty(#unused#::typeof(+), #unused#::Type{Any})
@ Base ./reduce.jl:313
[3] reduce_empty(#unused#::typeof(Base.add_sum), #unused#::Type{Any})
@ Base ./reduce.jl:322
[4] mapreduce_empty(#unused#::typeof(identity), op::Function, T::Type)
@ Base ./reduce.jl:345
[5] reduce_empty(op::Base.MappingRF{typeof(identity), typeof(Base.add_sum)}, #unused#::Type{Any})
@ Base ./reduce.jl:331
[6] reduce_empty_iter
@ ./reduce.jl:357 [inlined]
[7] mapreduce_empty_iter(f::Function, op::Function, itr::Vector{Any}, ItrEltype::Base.HasEltype)
@ Base ./reduce.jl:353
[8] _mapreduce(f::typeof(identity), op::typeof(Base.add_sum), #unused#::IndexLinear, A::Vector{Any})
@ Base ./reduce.jl:402
[9] _mapreduce_dim
@ ./reducedim.jl:330 [inlined]
[10] #mapreduce#731
@ ./reducedim.jl:322 [inlined]
[11] mapreduce
@ ./reducedim.jl:322 [inlined]
[12] #_sum#741
@ ./reducedim.jl:894 [inlined]
[13] _sum
@ ./reducedim.jl:894 [inlined]
[14] #sum#739
@ ./reducedim.jl:890 [inlined]
[15] _mean(f::typeof(identity), A::Vector{Any}, dims::Colon)
@ Statistics /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Statistics/src/Statistics.jl:170
[16] #mean#2
@ /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Statistics/src/Statistics.jl:164 [inlined]
[17] mean(A::Vector{Any})
@ Statistics /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Statistics/src/Statistics.jl:164
[18] run(env::Env{AlphaZero.Examples.ConnectFour.GameSpec, ResNet, NamedTuple{(:board, :curplayer), Tuple{StaticArraysCore.SMatrix{7, 6, UInt8, 42}, UInt8}}}, eval::AlphaZero.Benchmark.Duel, progress::ProgressMeter.Progress)
@ AlphaZero.Benchmark ~/.julia/packages/AlphaZero/MWXwb/src/benchmark.jl:97
[19] run_duel(env::Env{AlphaZero.Examples.ConnectFour.GameSpec, ResNet, NamedTuple{(:board, :curplayer), Tuple{StaticArraysCore.SMatrix{7, 6, UInt8, 42}, UInt8}}}, duel::AlphaZero.Benchmark.Duel; logger::AlphaZero.UserInterface.Log.Logger)
@ AlphaZero.UserInterface ~/.julia/packages/AlphaZero/MWXwb/src/ui/session.jl:206
[20] run_benchmark(session::Session{Env{AlphaZero.Examples.ConnectFour.GameSpec, ResNet, NamedTuple{(:board, :curplayer), Tuple{StaticArraysCore.SMatrix{7, 6, UInt8, 42}, UInt8}}}})
@ AlphaZero.UserInterface ~/.julia/packages/AlphaZero/MWXwb/src/ui/session.jl:217
[21] zeroth_iteration!(session::Session{Env{AlphaZero.Examples.ConnectFour.GameSpec, ResNet, NamedTuple{(:board, :curplayer), Tuple{StaticArraysCore.SMatrix{7, 6, UInt8, 42}, UInt8}}}})
@ AlphaZero.UserInterface ~/.julia/packages/AlphaZero/MWXwb/src/ui/session.jl:230
[22] resume!(session::Session{Env{AlphaZero.Examples.ConnectFour.GameSpec, ResNet, NamedTuple{(:board, :curplayer), Tuple{StaticArraysCore.SMatrix{7, 6, UInt8, 42}, UInt8}}}})
@ AlphaZero.UserInterface ~/.julia/packages/AlphaZero/MWXwb/src/ui/session.jl:313
[23] train(e::Experiment; args::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ AlphaZero.Scripts ~/.julia/packages/AlphaZero/MWXwb/src/scripts/scripts.jl:26
[24] train
@ ~/.julia/packages/AlphaZero/MWXwb/src/scripts/scripts.jl:26 [inlined]
[25] #train#15
@ ~/.julia/packages/AlphaZero/MWXwb/src/scripts/scripts.jl:28 [inlined]
[26] train(s::String)
@ AlphaZero.Scripts ~/.julia/packages/AlphaZero/MWXwb/src/scripts/scripts.jl:28
[27] top-level scope
@ REPL[2]:1
I'm trying to run mean(Any[])
and similar error shows.
Metadata
Metadata
Assignees
Labels
No labels