JuliaReinforcementLearning / GridWorlds.jl

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

Refactor and Clean #86

Closed Sid-Bhatia-0 closed 3 years ago

Sid-Bhatia-0 commented 3 years ago
  1. Track agent's position as a field inside the Agent struct (as opposed to a field inside the environment struct)
  2. Factor out (env::AbstractGridWorld)(::MoveForward) behaviour for vanilla goal-based environments (EmptyGridWorld, FourRooms, SequentialRooms)
  3. Add method get_world_with_agent to make terminal rendering more modular.
  4. Add method get_num_objects, just like get_height and get_width
  5. Little bit of cleaning up here and there.
codecov-io commented 3 years ago

Codecov Report

Merging #86 (fea893c) into master (5e59b36) will decrease coverage by 0.21%. The diff coverage is 63.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #86      +/-   ##
==========================================
- Coverage   75.68%   75.46%   -0.22%     
==========================================
  Files          15       15              
  Lines         658      640      -18     
==========================================
- Hits          498      483      -15     
+ Misses        160      157       -3     
Impacted Files Coverage Δ
src/terminal_rendering.jl 0.00% <0.00%> (ø)
src/abstract_grid_world.jl 65.07% <68.96%> (+5.50%) :arrow_up:
src/envs/collectgems.jl 100.00% <100.00%> (ø)
src/envs/doorkey.jl 100.00% <100.00%> (+1.72%) :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%> (ø)
src/envs/gotodoor.jl 100.00% <100.00%> (ø)
src/envs/sequentialrooms.jl 99.16% <100.00%> (-0.07%) :arrow_down:
src/grid_world_base.jl 74.46% <100.00%> (+2.72%) :arrow_up:
... 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 5e59b36...fea893c. Read the comment docs.