continual-foragax 0.32.1__tar.gz → 0.33.1__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.32.1 → continual_foragax-0.33.1}/PKG-INFO +1 -1
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/pyproject.toml +2 -2
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/continual_foragax.egg-info/PKG-INFO +1 -1
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/env.py +17 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/tests/test_foragax.py +32 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/README.md +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/setup.cfg +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/continual_foragax.egg-info/SOURCES.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/continual_foragax.egg-info/dependency_links.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/continual_foragax.egg-info/entry_points.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/continual_foragax.egg-info/requires.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/continual_foragax.egg-info/top_level.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/__init__.py +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/colors.py +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100897.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100928.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100929.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100930.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100931.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106714.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106715.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106716.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106717.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106718.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106930.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106931.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106932.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106933.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106934.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106935.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106936.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106937.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106938.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106939.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106940.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106941.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106942.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106943.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106994.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106995.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106996.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106997.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106998.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106999.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107000.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107001.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107002.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107003.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107004.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107005.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107006.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107007.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107008.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107009.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107010.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107011.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107012.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107013.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107014.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107015.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107016.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107017.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107018.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107019.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107020.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107021.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107022.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107023.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107024.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107025.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107026.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107027.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107028.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107029.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107030.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107031.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107032.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107033.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107034.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107035.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107036.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107037.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107038.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107039.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107040.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107041.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107042.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107043.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107044.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107045.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107046.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107047.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107048.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107049.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107050.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107051.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107052.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107053.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107054.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107055.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107056.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107057.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107058.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107059.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107060.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107061.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107062.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107063.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107064.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107065.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107066.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107067.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107068.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107069.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107070.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107071.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID115808.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID115812.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID146811.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156831.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156835.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156839.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156843.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156847.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156851.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156855.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156859.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156863.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156867.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156871.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156875.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156879.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156883.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156887.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/elements.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/metadata.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/data/ECA_non-blended_custom/sources.txt +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/objects.py +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/registry.py +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/rendering.py +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/foragax/weather.py +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/tests/test_benchmark.py +0 -0
- {continual_foragax-0.32.1 → continual_foragax-0.33.1}/tests/test_registry.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "continual-foragax"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.33.1"
|
|
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.33.1"
|
|
34
34
|
tag_format = "$version"
|
|
35
35
|
version_files = ["pyproject.toml"]
|
|
36
36
|
|
|
@@ -562,6 +562,23 @@ class ForagaxEnv(environment.Environment):
|
|
|
562
562
|
biome_state=biome_state,
|
|
563
563
|
)
|
|
564
564
|
|
|
565
|
+
# Compute reward at each grid position
|
|
566
|
+
fixed_key = jax.random.key(0) # Fixed key for deterministic reward computation
|
|
567
|
+
|
|
568
|
+
def compute_reward(obj_id, params):
|
|
569
|
+
return jax.lax.cond(
|
|
570
|
+
obj_id > 0,
|
|
571
|
+
lambda: jax.lax.switch(
|
|
572
|
+
obj_id, self.reward_fns, state.time, fixed_key, params
|
|
573
|
+
),
|
|
574
|
+
lambda: 0.0,
|
|
575
|
+
)
|
|
576
|
+
|
|
577
|
+
reward_grid = jax.vmap(jax.vmap(compute_reward))(
|
|
578
|
+
object_state.object_id, object_state.state_params
|
|
579
|
+
)
|
|
580
|
+
info["rewards"] = reward_grid
|
|
581
|
+
|
|
565
582
|
done = self.is_terminal(state, params)
|
|
566
583
|
return (
|
|
567
584
|
jax.lax.stop_gradient(self.get_obs(state, params)),
|
|
@@ -2797,3 +2797,35 @@ def test_sine_object():
|
|
|
2797
2797
|
r_orig = sine_obj.reward(t, key, None)
|
|
2798
2798
|
r_shift = sine_obj_shifted.reward(t, key, None)
|
|
2799
2799
|
assert jnp.allclose(r_orig + r_shift, 0.0, atol=0.01)
|
|
2800
|
+
|
|
2801
|
+
|
|
2802
|
+
def test_info_rewards():
|
|
2803
|
+
"""Test that info contains rewards with reward values for each grid position."""
|
|
2804
|
+
key = jax.random.key(0)
|
|
2805
|
+
env = ForagaxEnv(
|
|
2806
|
+
size=(5, 5),
|
|
2807
|
+
objects=(FLOWER,),
|
|
2808
|
+
biomes=(Biome(object_frequencies=(0.5,)),),
|
|
2809
|
+
observation_type="object",
|
|
2810
|
+
)
|
|
2811
|
+
params = env.default_params
|
|
2812
|
+
obs, state = env.reset(key, params)
|
|
2813
|
+
|
|
2814
|
+
key, step_key = jax.random.split(key)
|
|
2815
|
+
_, _, _, _, info = env.step(step_key, state, Actions.UP, params)
|
|
2816
|
+
|
|
2817
|
+
# Check that rewards is in info
|
|
2818
|
+
assert "rewards" in info
|
|
2819
|
+
|
|
2820
|
+
# Check shape matches environment size
|
|
2821
|
+
assert info["rewards"].shape == (5, 5)
|
|
2822
|
+
|
|
2823
|
+
# Check that positions with objects have non-zero rewards
|
|
2824
|
+
object_mask = state.object_state.object_id > 0
|
|
2825
|
+
rewards_at_objects = info["rewards"][object_mask]
|
|
2826
|
+
assert jnp.all(rewards_at_objects == FLOWER.reward_val)
|
|
2827
|
+
|
|
2828
|
+
# Check that empty positions have zero rewards
|
|
2829
|
+
empty_mask = state.object_state.object_id == 0
|
|
2830
|
+
rewards_at_empty = info["rewards"][empty_mask]
|
|
2831
|
+
assert jnp.all(rewards_at_empty == 0.0)
|
|
File without changes
|
|
File without changes
|
{continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/continual_foragax.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{continual_foragax-0.32.1 → continual_foragax-0.33.1}/src/continual_foragax.egg-info/requires.txt
RENAMED
|
File without changes
|
{continual_foragax-0.32.1 → continual_foragax-0.33.1}/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
|