mirror of
https://gitlab.rlp.net/mobitar/ReCo.jl.git
synced 2024-11-08 22:21:08 +00:00
29 lines
521 B
Julia
29 lines
521 B
Julia
using CairoMakie
|
|
using LaTeXStrings: @L_str
|
|
|
|
using ReCo: ReCo
|
|
|
|
include("../../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
|