mirror of
https://gitlab.rlp.net/mobitar/ReCo.jl.git
synced 2024-12-21 00:51:21 +00:00
Plot rewards during process
This commit is contained in:
parent
cbf9c1528d
commit
4d5b9552fd
1 changed files with 8 additions and 2 deletions
10
src/RL/RL.jl
10
src/RL/RL.jl
|
@ -19,6 +19,7 @@ using Random: Random
|
|||
using ProgressMeter: ProgressMeter
|
||||
using JLD2: JLD2
|
||||
using LaTeXStrings: LaTeXStrings, @L_str
|
||||
using UnicodePlots: UnicodePlots
|
||||
|
||||
using ..ReCo: ReCo
|
||||
|
||||
|
@ -32,7 +33,7 @@ const DEFAULT_UPDATE_ACTIONS_AT = 0.1
|
|||
const DEFAULT_N_PARTICLES = 100
|
||||
const DEFAULT_SEED = 42
|
||||
const DEFAULT_ϵ_STABLE = 0.00001
|
||||
const DEFAULT_PACKING_FRACTION = 0.01
|
||||
const DEFAULT_PACKING_FRACTION = 0.02
|
||||
const DEFAULT_SHOW_PROGRESS = true
|
||||
const DEFAULT_SHOW_SIMULATION_PROGRESS = true
|
||||
const DEFAULT_REWARD_DISCOUNT = 0.1
|
||||
|
@ -202,7 +203,12 @@ function run_rl(
|
|||
JLD2.save_object(env_helper_path, env_helper)
|
||||
end
|
||||
|
||||
ProgressMeter.next!(progress; showvalues=[(:rewards, hook.rewards)])
|
||||
ProgressMeter.next!(
|
||||
progress;
|
||||
showvalues=[(
|
||||
:R, repr(UnicodePlots.lineplot(1:episode, hook.rewards; border=:none))
|
||||
)],
|
||||
)
|
||||
end
|
||||
|
||||
# Post experiment
|
||||
|
|
Loading…
Reference in a new issue