1
0
Fork 0
mirror of https://gitlab.rlp.net/mobitar/ReCo.jl.git synced 2025-09-04 09:12:35 +00:00

Added reward shaping plot

This commit is contained in:
Mo8it 2022-01-30 04:38:57 +01:00
parent eb29ca3d10
commit fd83c13333
5 changed files with 35 additions and 4 deletions

View file

@ -28,7 +28,9 @@ function plot_potentials()
max_y = 1.05
min_y = -max_y
ax = Axis(fig[1, 1]; xlabel=L"r/σ", ylabel=L"U/ϵ", limits=(0.88, max_x, min_y, max_y))
ax = Axis(
fig[1, 1]; xlabel=L"r / σ", ylabel=L"U(r) / ϵ", limits=(0.88, max_x, min_y, max_y)
)
r_σ_ratio = LinRange(0.95, max_x, 1000)

View file

@ -0,0 +1,29 @@
using CairoMakie
using LaTeXStrings: @L_str
using ReCo: ReCo
includet("../src/Visualization/common_CairoMakie.jl")
function plot_reward_function()
init_cairomakie!()
fig = gen_figure()
min_x = 0.0
max_x = 1.15
ax = Axis(
fig[1, 1]; xlabel=L"x / x_{\max}", ylabel=L"R(x)", limits=(min_x, max_x, 0.0, 1.05)
)
x = LinRange(min_x, max_x, 1000)
lines!(ax, x, ReCo.RL.minimizing_reward.(x, 1.0))
set_gaps!(fig)
save_fig("reward_shaping.pdf", fig)
return nothing
end