JuliaReinforcementLearning / GridWorlds.jl

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

Refactor and Clean Up #88

Closed Sid-Bhatia-0 closed 3 years ago

Sid-Bhatia-0 commented 3 years ago
  1. Make the implementation of environments much more consistent across environments.
  2. Decouple moving forward from the receiving reward or some special environment behavior.
  3. Move all the world construction to reset!. The world's grid will be constructed entirely from scratch every time. This doesn't have a disproportionately high cost since we anyways need to pass through the entirely GOAL layer in order to reset the GOAL, for example.
  4. Configurable agent_start_pos and agent_start_dir in GoToDoor environment.
  5. Add and reuse get_num_objects, get_height, get_width methds for a BitArray{3}.
  6. Change the ordering of environments. Keep the vanilla goal-seeking environments first.
  7. Clean up imports and exports. Use import Package instead of using Package when Package is being used only in a few places.
  8. Minor formatting and changing the order of things here and there.
codecov-io commented 3 years ago

Codecov Report

Merging #88 (cae350b) into master (bc99cb3) will increase coverage by 0.63%. The diff coverage is 97.58%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #88      +/-   ##
==========================================
+ Coverage   75.57%   76.21%   +0.63%     
==========================================
  Files          15       15              
  Lines         647      660      +13     
==========================================
+ Hits          489      503      +14     
+ Misses        158      157       -1     
Impacted Files Coverage Δ
src/objects.jl 24.24% <0.00%> (ø)
src/grid_world_base.jl 78.00% <88.23%> (+3.53%) :arrow_up:
src/GridWorlds.jl 100.00% <100.00%> (ø)
src/abstract_grid_world.jl 65.62% <100.00%> (ø)
src/actions.jl 100.00% <100.00%> (ø)
src/envs/collectgems.jl 100.00% <100.00%> (ø)
src/envs/doorkey.jl 98.36% <100.00%> (+0.05%) :arrow_up:
src/envs/dynamicobstacles.jl 100.00% <100.00%> (ø)
src/envs/emptygridworld.jl 100.00% <100.00%> (ø)
src/envs/fourrooms.jl 100.00% <100.00%> (ø)
... and 3 more

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 bc99cb3...cae350b. Read the comment docs.