JuliaReinforcementLearning / GridWorlds.jl

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

Pickup and Drop action behaviour #89

Closed Sid-Bhatia-0 closed 3 years ago

Sid-Bhatia-0 commented 3 years ago

Pickup and Drop are actions, just like MoveForward, TurnLeft and TurnRight. This means that they must be used in the form of arguments passed to the environment functor. Something like this, for example: (env::AbstractGridWorld)(::Pickup)

  1. Remove Pickup and Drop action related things from objects.jl file. This behavior must be individually specified for each environment that requires it. This is because we cannot pass the object while calling the Pickup action. And this also allows us to customize the Pickup and Drop action behavior for an environment.
  2. Make Agent a parametric struct with a parametric type for the inventory.
  3. Add get_... and set_... methods related to the inventory.
  4. In runtests.jl, remove the variable ACTIONS and use the get_actions method instead.