-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reinforcement Learning Examples #284
Conversation
push!(rewards, reward[1]) | ||
push!(actions, action[1]) | ||
|
||
if o["render"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
o["render"] && render(env)
for conciseness?
render(env) | ||
end | ||
|
||
if done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done && break
return f1 * x + f2 * abs.(x) | ||
end | ||
|
||
function predict_linear(w, ob) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
predict_probs
or probs
or predict
instead of predict_linear
?
|
||
function sample_action(μ; σ=1.0) | ||
μ = convert(Array{Float32}, μ) | ||
a = μ + randn() * σ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
randn(size(μ))
instead of randn()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also use .+ and .*
the package Gym should be submitted to METADATA before merging this |
I coded here some actor-critic examples https://github.com/CarloLucibello/DeepRLexamples.jl, feel free to utilize any piece of code in case you find it of some use |
fixed |
Now, actor_critic_discrete.jl complains about Gym initialization.
|
It works now. @denizyuret examples work. It can be merged. |
|
|
OK, please check the dqn notebook, I can run all the others.
…On Sun, Mar 18, 2018 at 9:10 PM Ozan Arkan Can ***@***.***> wrote:
- I guess "WARNING: special characters "#{}()[]<>|&*?~;" is related
with a julia issue <JuliaLang/julia#20482>
- scipy is in the requirements of gym but somehow it is not triggered
during the installation. I will investigate it.
- 'WARN: gym.spaces.Box autodetected dtype as <type 'numpy.float32'>
is coming from gym even if you use it in python.
- The last one might be a notebook issue, julia dqn.jl --printinfo
should work.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#284 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABvNpp5INLGNxnzCdb21jorgTvDr--UDks5tfqL-gaJpZM4SmJ3_>
.
|
Hi,
I am starting this pull request for reinforcement learning examples. I have implemented followings:
Value Iteration
,Policy Evaluation
,Policy Iteration
REINFORCE
for both discrete and continuous action spacesMy TODO list