mirror of
https://gitlab.rlp.net/mobitar/ReCo.jl.git
synced 2024-12-21 00:51:21 +00:00
Fix reward_discount_analysis
This commit is contained in:
parent
a2262bce9e
commit
ea420224f9
2 changed files with 5 additions and 5 deletions
|
@ -4,10 +4,10 @@ using PrettyTables: pretty_table
|
||||||
using ReCo: ReCo
|
using ReCo: ReCo
|
||||||
|
|
||||||
function latex_table(
|
function latex_table(
|
||||||
dataframe::DataFrames.DataFrame, filename::String; path::String = "exports/$filename"
|
dataframe::DataFrames.DataFrame, filename::String; path::String="exports/$filename"
|
||||||
)
|
)
|
||||||
open(path, "w") do f
|
open(path, "w") do f
|
||||||
pretty_table(f, dataframe; backend = :latex, nosubheader = true, alignment = :c)
|
pretty_table(f, dataframe; backend=:latex, nosubheader=true, alignment=:c)
|
||||||
end
|
end
|
||||||
|
|
||||||
return nothing
|
return nothing
|
||||||
|
@ -29,7 +29,7 @@ function export_q_matrix(env_helper::ReCo.RL.EnvHelper, filename_without_extensi
|
||||||
table[:, col] ./= sum(table[:, col])
|
table[:, col] ./= sum(table[:, col])
|
||||||
end
|
end
|
||||||
|
|
||||||
table .= round.(table, digits = 2)
|
table .= round.(table, digits=2)
|
||||||
|
|
||||||
state_spaces_labels = env_helper.shared.env.shared.state_spaces_labels
|
state_spaces_labels = env_helper.shared.env.shared.state_spaces_labels
|
||||||
states = AbstractString[]
|
states = AbstractString[]
|
||||||
|
|
|
@ -11,8 +11,8 @@ function run_reward_discount_processes(γs::AbstractVector)
|
||||||
|
|
||||||
Threads.@threads for γ_ind in 1:n_γs
|
Threads.@threads for γ_ind in 1:n_γs
|
||||||
γ = γs[γ_ind]
|
γ = γs[γ_ind]
|
||||||
env_helper, rl_dir = ReCo.run_rl(;
|
env_helper, rl_dir = ReCo.run_rl(
|
||||||
EnvType=ReCo.OriginEnv,
|
ReCo.OriginEnv;
|
||||||
n_episodes=400,
|
n_episodes=400,
|
||||||
episode_duration=15.0,
|
episode_duration=15.0,
|
||||||
n_particles=150,
|
n_particles=150,
|
||||||
|
|
Loading…
Reference in a new issue