Hello,
I am encountering this error when I run my code:
LoadError: MethodError: Cannot `convert` an object of type Tuple{Int64,Int64} to an object of type FState
This may have arisen from a call to the constructor FState(...),
since type constructors fall back to convert methods.
while loading C:\Users\willi\OneDrive\Documents\Stanford\Research\Faucet\Python Faucet Model\Learning Julia\Faucetv2.jl, in expression starting on line 41
setindex!(::Dict{FState,Int64}, ::Int64, ::Tuple{Int64,Int64}) at dict.jl:412
Dict{FState,Int64}(::Base.Generator{Enumerate{Array{Tuple{Int64,Int64},1}},##23#24}) at dict.jl:118
include_string(::String, ::String) at loading.jl:522
include_string(::Module, ::String, ::String) at Compat.jl:174
(::LastMain.Atom.##57#60{String,String})() at eval.jl:74
withpath(::LastMain.Atom.##57#60{String,String}, ::String) at utils.jl:30
withpath(::Function, ::String) at eval.jl:38
macro expansion at eval.jl:72 [inlined]
(::LastMain.Atom.##56#59{Dict{String,Any}})() at task.jl:80
I think I am close to figuring this out… but having a bit of trouble with knowing whether to use tuples or arrays.
Do I need some function that breaks 2D index values into a pairing of values accessible by the observation, reward and transition functions?
Would function observation(p::FPOMDP, a::Int, sp::FState) be a::Int still, or a::Tuple{Int, Int}, or does it just depend on if I want to use indices or tuples?
If using tuples, I am assuming:
sp.time > 2 && a != DTEMP[sp.task]
Would it now be: if sp.time > 2 && a[1] != DTEMP[sp.task] && a[2] != DFLOW[sp.task]?
I am encountering this error when I run my code:
while loading C:\Users\willi\OneDrive\Documents\Stanford\Research\Faucet\Python Faucet Model\Learning Julia\Faucetv2.jl, in expression starting on line 41
const AINDEX = Dict(a=>i for (i,a) in enumerate(actions(p)))having a bit of trouble with knowing whether to use tuples or arrays.
Do I need some function that breaks 2D index values into a pairing of values accessible by the observation, reward and transition functions?
Would function observation(p::FPOMDP, a::Int, sp::FState) be a::Int still, or a::Tuple{Int, Int}, or does it just depend on if I want to use indices or tuples?
Would it now be: if sp.time > 2 && a[1] != DTEMP[sp.task] && a[2] != DFLOW[sp.task]?