continual-foragax 0.26.0__tar.gz → 0.27.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/PKG-INFO +1 -1
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/pyproject.toml +2 -2
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/continual_foragax.egg-info/PKG-INFO +1 -1
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/env.py +2 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/tests/test_foragax.py +110 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/README.md +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/setup.cfg +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/continual_foragax.egg-info/SOURCES.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/continual_foragax.egg-info/dependency_links.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/continual_foragax.egg-info/entry_points.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/continual_foragax.egg-info/requires.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/continual_foragax.egg-info/top_level.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/__init__.py +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/colors.py +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100897.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100928.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100929.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100930.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100931.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106714.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106715.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106716.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106717.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106718.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106930.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106931.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106932.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106933.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106934.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106935.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106936.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106937.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106938.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106939.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106940.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106941.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106942.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106943.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106994.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106995.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106996.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106997.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106998.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106999.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107000.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107001.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107002.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107003.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107004.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107005.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107006.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107007.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107008.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107009.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107010.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107011.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107012.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107013.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107014.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107015.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107016.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107017.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107018.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107019.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107020.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107021.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107022.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107023.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107024.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107025.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107026.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107027.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107028.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107029.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107030.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107031.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107032.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107033.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107034.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107035.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107036.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107037.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107038.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107039.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107040.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107041.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107042.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107043.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107044.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107045.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107046.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107047.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107048.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107049.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107050.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107051.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107052.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107053.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107054.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107055.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107056.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107057.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107058.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107059.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107060.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107061.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107062.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107063.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107064.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107065.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107066.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107067.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107068.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107069.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107070.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107071.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID115808.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID115812.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID146811.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156831.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156835.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156839.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156843.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156847.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156851.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156855.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156859.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156863.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156867.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156871.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156875.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156879.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156883.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156887.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/elements.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/metadata.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/data/ECA_non-blended_custom/sources.txt +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/objects.py +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/registry.py +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/rendering.py +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/foragax/weather.py +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/tests/test_benchmark.py +0 -0
- {continual_foragax-0.26.0 → continual_foragax-0.27.0}/tests/test_registry.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "continual-foragax"
|
3
|
-
version = "0.
|
3
|
+
version = "0.27.0"
|
4
4
|
description = "A continual reinforcement learning benchmark"
|
5
5
|
readme = "README.md"
|
6
6
|
authors = [
|
@@ -30,7 +30,7 @@ build-backend = "setuptools.build_meta"
|
|
30
30
|
[tool]
|
31
31
|
[tool.commitizen]
|
32
32
|
name = "cz_conventional_commits"
|
33
|
-
version = "0.
|
33
|
+
version = "0.27.0"
|
34
34
|
tag_format = "$version"
|
35
35
|
version_files = ["pyproject.toml"]
|
36
36
|
|
@@ -273,6 +273,8 @@ class ForagaxEnv(environment.Environment):
|
|
273
273
|
info["temperature"] = get_temperature(
|
274
274
|
self.weather_object.rewards, state.time, self.weather_object.repeat
|
275
275
|
)
|
276
|
+
info["biome_id"] = state.biome_grid[pos[1], pos[0]]
|
277
|
+
info["object_collected_id"] = jax.lax.select(should_collect, obj_at_pos, -1)
|
276
278
|
|
277
279
|
# 4. UPDATE STATE
|
278
280
|
state = EnvState(
|
@@ -22,6 +22,7 @@ from foragax.objects import (
|
|
22
22
|
THORNS,
|
23
23
|
WALL,
|
24
24
|
DefaultForagaxObject,
|
25
|
+
WeatherObject,
|
25
26
|
)
|
26
27
|
|
27
28
|
|
@@ -965,3 +966,112 @@ def test_teleporting():
|
|
965
966
|
# From (7,7), (2,2) is further than (7,7)
|
966
967
|
expected_pos = jnp.array([2, 2])
|
967
968
|
chex.assert_trees_all_equal(state.pos, expected_pos)
|
969
|
+
|
970
|
+
|
971
|
+
def test_info_discount():
|
972
|
+
"""Test that info contains discount."""
|
973
|
+
key = jax.random.key(0)
|
974
|
+
env = ForagaxObjectEnv(size=(5, 5), objects=())
|
975
|
+
params = env.default_params
|
976
|
+
obs, state = env.reset(key, params)
|
977
|
+
|
978
|
+
key, step_key = jax.random.split(key)
|
979
|
+
_, _, _, _, info = env.step(step_key, state, Actions.UP, params)
|
980
|
+
|
981
|
+
assert "discount" in info
|
982
|
+
assert info["discount"] == 1.0
|
983
|
+
|
984
|
+
|
985
|
+
def test_info_temperature():
|
986
|
+
"""Test that info contains temperature when weather object is present."""
|
987
|
+
key = jax.random.key(0)
|
988
|
+
# Create a simple weather object
|
989
|
+
weather_obj = WeatherObject(
|
990
|
+
name="hot",
|
991
|
+
rewards=jnp.array([10.0, 20.0]),
|
992
|
+
repeat=1,
|
993
|
+
multiplier=1.0,
|
994
|
+
)
|
995
|
+
|
996
|
+
env = ForagaxObjectEnv(
|
997
|
+
size=(5, 5), objects=(weather_obj,), biomes=(Biome(object_frequencies=(0.1,)),)
|
998
|
+
)
|
999
|
+
params = env.default_params
|
1000
|
+
obs, state = env.reset(key, params)
|
1001
|
+
|
1002
|
+
key, step_key = jax.random.split(key)
|
1003
|
+
_, state, _, _, info = env.step(step_key, state, Actions.UP, params)
|
1004
|
+
|
1005
|
+
assert "temperature" in info
|
1006
|
+
# Temperature should be based on time=0, so first temperature value
|
1007
|
+
assert info["temperature"] == 10.0
|
1008
|
+
|
1009
|
+
key, step_key = jax.random.split(key)
|
1010
|
+
_, state, _, _, info = env.step(step_key, state, Actions.UP, params)
|
1011
|
+
assert info["temperature"] == 20.0 # Next temperature value
|
1012
|
+
|
1013
|
+
|
1014
|
+
def test_info_biome_id():
|
1015
|
+
"""Test that info contains biome_id at agent's position."""
|
1016
|
+
key = jax.random.key(0)
|
1017
|
+
|
1018
|
+
# Create environment with two biomes: one at (3,y) and one at (4,y)
|
1019
|
+
biomes = (
|
1020
|
+
Biome(start=(3, 0), stop=(4, 5), object_frequencies=(0.0,)),
|
1021
|
+
Biome(start=(4, 0), stop=(5, 5), object_frequencies=(0.0,)),
|
1022
|
+
)
|
1023
|
+
|
1024
|
+
env = ForagaxObjectEnv(size=(5, 5), objects=(), biomes=biomes)
|
1025
|
+
params = env.default_params
|
1026
|
+
obs, state = env.reset(key, params)
|
1027
|
+
|
1028
|
+
# Agent starts at center (2, 2), which should be in neither biome (biome_id = -1)
|
1029
|
+
assert state.biome_grid[2, 2] == -1
|
1030
|
+
|
1031
|
+
# Move right to biome 0: from (2,2) to (3,2)
|
1032
|
+
key, step_key = jax.random.split(key)
|
1033
|
+
_, state, _, _, info = env.step(step_key, state, Actions.RIGHT, params)
|
1034
|
+
|
1035
|
+
assert "biome_id" in info
|
1036
|
+
assert state.biome_grid[2, 3] == 0 # Position (3,2) is in biome 0
|
1037
|
+
assert info["biome_id"] == 0
|
1038
|
+
|
1039
|
+
# Move right again to biome 1: from (3,2) to (4,2)
|
1040
|
+
key, step_key = jax.random.split(key)
|
1041
|
+
_, state, _, _, info = env.step(step_key, state, Actions.RIGHT, params)
|
1042
|
+
|
1043
|
+
assert state.biome_grid[2, 4] == 1 # Position (4,2) is in biome 1
|
1044
|
+
assert info["biome_id"] == 1
|
1045
|
+
|
1046
|
+
|
1047
|
+
def test_info_object_collected_id():
|
1048
|
+
"""Test that info contains object_eaten_id when collecting objects."""
|
1049
|
+
key = jax.random.key(0)
|
1050
|
+
env = ForagaxObjectEnv(
|
1051
|
+
size=(7, 7),
|
1052
|
+
objects=(FLOWER,),
|
1053
|
+
)
|
1054
|
+
params = env.default_params
|
1055
|
+
_, state = env.reset(key, params)
|
1056
|
+
|
1057
|
+
flower_id = 1 # 0 is EMPTY
|
1058
|
+
|
1059
|
+
# Place a flower and move the agent to it
|
1060
|
+
grid = jnp.zeros((7, 7), dtype=int)
|
1061
|
+
grid = grid.at[4, 3].set(flower_id)
|
1062
|
+
state = state.replace(object_grid=grid, pos=jnp.array([3, 3]))
|
1063
|
+
|
1064
|
+
# Collect the flower by moving down
|
1065
|
+
key, step_key = jax.random.split(key)
|
1066
|
+
_, _, reward, _, info = env.step(step_key, state, Actions.DOWN, params)
|
1067
|
+
|
1068
|
+
assert "object_collected_id" in info
|
1069
|
+
assert info["object_collected_id"] == 1 # FLOWER id
|
1070
|
+
assert reward == FLOWER.reward_val
|
1071
|
+
|
1072
|
+
# Next step should not collect anything
|
1073
|
+
key, step_key = jax.random.split(key)
|
1074
|
+
_, _, reward, _, info = env.step(step_key, state, Actions.UP, params)
|
1075
|
+
|
1076
|
+
assert info["object_collected_id"] == -1 # No object collected
|
1077
|
+
assert reward == 0.0
|
File without changes
|
File without changes
|
{continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/continual_foragax.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
{continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/continual_foragax.egg-info/requires.txt
RENAMED
File without changes
|
{continual_foragax-0.26.0 → continual_foragax-0.27.0}/src/continual_foragax.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|