JuliaReinforcementLearning / GridWorlds.jl

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

Add RLBase dependency and use its API (as per #48) #54

Closed Sid-Bhatia-0 closed 4 years ago

Sid-Bhatia-0 commented 4 years ago
  1. Add RLBase dependency as per #48
  2. Make AbstractGridWorld a subtype of AbstractEnv
  3. Extend RLBase methods for CollectGems environment.
  4. Modify the terminal rendering show method so that it does not get overriden by the default one given in RLBase
findmyway commented 4 years ago

Could you also add methods like RLBase.get_state before merging this PR? And adding a simple test case like run(RandomPolicy(env), env) would be much appreciated.

Sid-Bhatia-0 commented 4 years ago

Sure.

For the RLBase.get_state method, should I add a trait that specifies the format of the state. For example, two of the common formats for gridworlds are:

  1. agent grid view
  2. flattened full grid view (with agent location and direction conatenated)

And adding a simple test case like run(RandomPolicy(env), env) would be much appreciated.

Will do.

findmyway commented 4 years ago

Implementing the get_state(env) would be enough at present I think.

codecov-io commented 4 years ago

Codecov Report

Merging #54 into master will increase coverage by 33.61%. The diff coverage is 88.88%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #54       +/-   ##
===========================================
+ Coverage   30.88%   64.50%   +33.61%     
===========================================
  Files          14       14               
  Lines         395      400        +5     
===========================================
+ Hits          122      258      +136     
+ Misses        273      142      -131     
Impacted Files Coverage Δ
src/GridWorlds.jl 100.00% <ø> (ø)
src/render_in_terminal.jl 0.00% <0.00%> (ø)
src/abstract_grid_world.jl 85.00% <100.00%> (+5.00%) :arrow_up:
src/envs/collectgems.jl 100.00% <100.00%> (+100.00%) :arrow_up:
src/grid_world_base.jl 69.76% <0.00%> (+2.32%) :arrow_up:
src/objects.jl 22.58% <0.00%> (+14.38%) :arrow_up:
src/envs/doorkey.jl 97.22% <0.00%> (+97.22%) :arrow_up:
src/envs/dynamicobstacles.jl 100.00% <0.00%> (+100.00%) :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 f46e78c...c302269. Read the comment docs.