JuliaReinforcementLearning / GridWorlds.jl

Help! I'm lost in the flatland!
MIT License
46 stars 9 forks source link

Add StochasticEnv wrapper #63

Closed Sid-Bhatia-0 closed 3 years ago

Sid-Bhatia-0 commented 3 years ago

This wrapper allows us to convert a minimally written deterministic environment like EmptyGridWorld, and add customized stochastic behaviour without having to create a new environment that is mostly similar and only slightly different.

For example, this wrapper can be used to easily add randomized reset behaviour (random agent start position and direction at each call to reset!), or make the agent take the intended action only probabilistically (as if it is a drunken agent).

Sid-Bhatia-0 commented 3 years ago

@findmyway , I think it will be helpful to add examples like the drunken agent or randomly starting agent (position/direction). Should I add them in tests?

codecov-io commented 3 years ago

Codecov Report

Merging #63 (cfd5cc6) into master (7d32edc) will decrease coverage by 0.50%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #63      +/-   ##
==========================================
- Coverage   65.23%   64.73%   -0.51%     
==========================================
  Files          14       15       +1     
  Lines         443      448       +5     
==========================================
+ Hits          289      290       +1     
- Misses        154      158       +4     
Impacted Files Coverage Δ
src/GridWorlds.jl 100.00% <ø> (ø)
src/wrappers.jl 0.00% <0.00%> (ø)
src/envs/doorkey.jl 100.00% <0.00%> (+2.77%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7d32edc...cfd5cc6. Read the comment docs.