semitable / lb-foraging

Level-based Foraging (LBF): A multi-agent environment for RL
MIT License
151 stars 64 forks source link

Feature/python3dot10 gym compatibility update #25

Open jbhoffman613 opened 10 months ago

jbhoffman613 commented 10 months ago

Changes made:

  1. Python3.10 and Numpy Update
    1. The repo is now compatible with python 3.10.
    2. The syntax/function calls have been updated to work with the newer version of Numpy. For instance, `.randint(...)` was changed to `.integer(...)`
  2. New gym version 0.26
    1. Gym 0.26 now passively type checks your function outputs at runtime, and some of the return types have changed. Specifically, the reset function now needs to return an observation and a dictionary with any information: ```env.reset() -> obs, {}```
    2. The return of the reset function has been updated, and the tests have also been updated, so they now pass with this change in place.
  3. The repo is not compatible with the newly updated pyglet2.* so the setup file has been changed to specify that the user needs a version of pyglet that is before version 2.
  4. Fixed the import and dependencies in the agents directory.
  5. Now, all tests pass the following is run: `python -m pytest test_env.py` while in the test directory and all the tests pass. At the highest level of the repo, the following can be run and the environment will be properly rendered. `python lbforaging.py --render`
Chulabhaya commented 10 months ago

Hi @jbhoffman613 ! I just wanted to give you thanks for bringing this environment up to date with Python/Gymnasium, and am looking forward to testing it out.