JuliaReinforcementLearning / GridWorlds.jl

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

simplify internals, boost performance #132

Closed Sid-Bhatia-0 closed 3 years ago

Sid-Bhatia-0 commented 3 years ago
  1. Remove parameters and fields from object structs.
  2. Fix rendering. Shade agent view region only when necessary. For example, environments with RLBase.StateStyle of InternalState{Any}() shouldn't shade agent view region. Rename terminal_rendering.jl to textual_rendering.jl and makie_rendering.jl to graphical_rendering.jl. Add render_layers method for debugging in textual rendering mode.
  3. Add more documentation to README. Update gifs. Update benchmarks.jl and benchmarks.md. Remove all exports.
  4. Add macros generate_getters and generate_setters. Remove most fallback getters, setters, and RLBase methods on AbstractGridWorld. Remove navigation style traits. Remove Center direction.
  5. Performance improvements. Use views macro in get_grid! for much lesser memory allocation. Use CartesianIndices for get_interior of Rooms. Fix type stability of Room. Add StaticArrays package dependency for performance.
  6. Update environments. Make separate structs for directed and undirected environments. Parameterize environment structs with reward type T. Add Agent layer. Replace GoToDoor with GoToTarget.
codecov-io commented 3 years ago

Codecov Report

Merging #132 (dc9c4b0) into master (b3337d3) will increase coverage by 0.50%. The diff coverage is 81.96%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #132      +/-   ##
==========================================
+ Coverage   81.21%   81.71%   +0.50%     
==========================================
  Files          21       20       -1     
  Lines        1187     2040     +853     
==========================================
+ Hits          964     1667     +703     
- Misses        223      373     +150     
Impacted Files Coverage Δ
src/directions.jl 100.00% <ø> (ø)
src/graphical_rendering.jl 0.00% <0.00%> (ø)
src/grid_world_base.jl 35.71% <0.00%> (-8.97%) :arrow_down:
src/textual_rendering.jl 0.00% <0.00%> (ø)
src/abstract_grid_world.jl 75.00% <66.66%> (+7.69%) :arrow_up:
src/envs/transport.jl 89.67% <88.57%> (-10.33%) :arrow_down:
src/envs/empty_room.jl 91.22% <90.19%> (-8.78%) :arrow_down:
src/envs/sequential_rooms.jl 94.20% <90.75%> (-5.80%) :arrow_down:
src/envs/dynamic_obstacles.jl 92.35% <90.76%> (-6.43%) :arrow_down:
src/envs/grid_rooms.jl 93.10% <91.45%> (-6.90%) :arrow_down:
... and 17 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 b3337d3...dc9c4b0. Read the comment docs.