continual-foragax 0.24.2__tar.gz → 0.25.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.24.2 → continual_foragax-0.25.0}/PKG-INFO +1 -1
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/pyproject.toml +2 -2
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/continual_foragax.egg-info/PKG-INFO +1 -1
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/env.py +34 -3
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/registry.py +17 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/tests/test_foragax.py +59 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/README.md +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/setup.cfg +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/continual_foragax.egg-info/SOURCES.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/continual_foragax.egg-info/dependency_links.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/continual_foragax.egg-info/entry_points.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/continual_foragax.egg-info/requires.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/continual_foragax.egg-info/top_level.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/__init__.py +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/colors.py +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100897.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100928.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100929.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100930.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100931.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106714.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106715.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106716.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106717.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106718.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106930.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106931.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106932.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106933.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106934.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106935.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106936.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106937.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106938.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106939.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106940.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106941.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106942.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106943.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106994.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106995.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106996.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106997.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106998.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106999.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107000.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107001.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107002.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107003.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107004.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107005.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107006.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107007.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107008.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107009.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107010.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107011.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107012.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107013.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107014.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107015.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107016.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107017.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107018.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107019.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107020.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107021.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107022.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107023.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107024.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107025.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107026.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107027.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107028.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107029.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107030.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107031.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107032.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107033.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107034.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107035.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107036.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107037.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107038.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107039.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107040.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107041.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107042.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107043.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107044.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107045.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107046.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107047.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107048.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107049.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107050.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107051.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107052.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107053.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107054.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107055.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107056.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107057.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107058.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107059.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107060.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107061.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107062.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107063.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107064.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107065.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107066.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107067.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107068.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107069.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107070.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107071.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID115808.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID115812.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID146811.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156831.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156835.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156839.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156843.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156847.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156851.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156855.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156859.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156863.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156867.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156871.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156875.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156879.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156883.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156887.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/elements.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/metadata.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/data/ECA_non-blended_custom/sources.txt +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/objects.py +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/rendering.py +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/foragax/weather.py +0 -0
- {continual_foragax-0.24.2 → continual_foragax-0.25.0}/tests/test_benchmark.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "continual-foragax"
|
3
|
-
version = "0.
|
3
|
+
version = "0.25.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.25.0"
|
34
34
|
tag_format = "$version"
|
35
35
|
version_files = ["pyproject.toml"]
|
36
36
|
|
@@ -1,12 +1,12 @@
|
|
1
|
-
"""JAX implementation of
|
1
|
+
"""JAX implementation of Forager environment.
|
2
2
|
|
3
|
-
Source: https://github.com/andnp/
|
3
|
+
Source: https://github.com/andnp/Forager
|
4
4
|
"""
|
5
5
|
|
6
6
|
from dataclasses import dataclass
|
7
7
|
from enum import IntEnum
|
8
8
|
from functools import partial
|
9
|
-
from typing import Any, Dict, Tuple, Union
|
9
|
+
from typing import Any, Dict, Optional, Tuple, Union
|
10
10
|
|
11
11
|
import jax
|
12
12
|
import jax.numpy as jnp
|
@@ -75,6 +75,7 @@ class ForagaxEnv(environment.Environment):
|
|
75
75
|
biomes: Tuple[Biome, ...] = (Biome(object_frequencies=()),),
|
76
76
|
nowrap: bool = False,
|
77
77
|
deterministic_spawn: bool = False,
|
78
|
+
teleport_interval: Optional[int] = None,
|
78
79
|
):
|
79
80
|
super().__init__()
|
80
81
|
self._name = name
|
@@ -87,6 +88,7 @@ class ForagaxEnv(environment.Environment):
|
|
87
88
|
self.aperture_size = aperture_size
|
88
89
|
self.nowrap = nowrap
|
89
90
|
self.deterministic_spawn = deterministic_spawn
|
91
|
+
self.teleport_interval = teleport_interval
|
90
92
|
objects = (EMPTY,) + objects
|
91
93
|
if self.nowrap:
|
92
94
|
objects = objects + (PADDING,)
|
@@ -117,6 +119,16 @@ class ForagaxEnv(environment.Environment):
|
|
117
119
|
[b.stop if b.stop is not None else (-1, -1) for b in biomes]
|
118
120
|
)
|
119
121
|
self.biome_sizes = np.prod(self.biome_stops - self.biome_starts, axis=1)
|
122
|
+
self.biome_starts_jax = jnp.array(self.biome_starts)
|
123
|
+
self.biome_stops_jax = jnp.array(self.biome_stops)
|
124
|
+
biome_centers = []
|
125
|
+
for i in range(len(self.biome_starts)):
|
126
|
+
start = self.biome_starts[i]
|
127
|
+
stop = self.biome_stops[i]
|
128
|
+
center_x = (start[0] + stop[0] - 1) // 2
|
129
|
+
center_y = (start[1] + stop[1] - 1) // 2
|
130
|
+
biome_centers.append((center_x, center_y))
|
131
|
+
self.biome_centers_jax = jnp.array(biome_centers)
|
120
132
|
self.biome_masks = []
|
121
133
|
for i in range(self.biome_object_frequencies.shape[0]):
|
122
134
|
# Create mask for the biome
|
@@ -174,6 +186,23 @@ class ForagaxEnv(environment.Environment):
|
|
174
186
|
is_blocking = self.object_blocking[obj_at_new_pos]
|
175
187
|
pos = jax.lax.select(is_blocking, state.pos, new_pos)
|
176
188
|
|
189
|
+
# Check for automatic teleport
|
190
|
+
if self.teleport_interval is not None:
|
191
|
+
should_teleport = jnp.mod(state.time + 1, self.teleport_interval) == 0
|
192
|
+
else:
|
193
|
+
should_teleport = False
|
194
|
+
|
195
|
+
def teleport_fn():
|
196
|
+
# Calculate squared distances from current position to each biome center
|
197
|
+
diffs = self.biome_centers_jax - pos
|
198
|
+
distances = jnp.sum(diffs**2, axis=1)
|
199
|
+
# Find the index of the furthest biome center
|
200
|
+
furthest_idx = jnp.argmax(distances)
|
201
|
+
new_pos = self.biome_centers_jax[furthest_idx]
|
202
|
+
return new_pos
|
203
|
+
|
204
|
+
pos = jax.lax.cond(should_teleport, teleport_fn, lambda: pos)
|
205
|
+
|
177
206
|
# 2. HANDLE COLLISIONS AND REWARDS
|
178
207
|
obj_at_pos = current_objects[pos[1], pos[0]]
|
179
208
|
key, subkey = jax.random.split(key)
|
@@ -503,6 +532,7 @@ class ForagaxObjectEnv(ForagaxEnv):
|
|
503
532
|
biomes: Tuple[Biome, ...] = (Biome(object_frequencies=()),),
|
504
533
|
nowrap: bool = False,
|
505
534
|
deterministic_spawn: bool = False,
|
535
|
+
teleport_interval: Optional[int] = None,
|
506
536
|
):
|
507
537
|
super().__init__(
|
508
538
|
name,
|
@@ -512,6 +542,7 @@ class ForagaxObjectEnv(ForagaxEnv):
|
|
512
542
|
biomes,
|
513
543
|
nowrap,
|
514
544
|
deterministic_spawn,
|
545
|
+
teleport_interval,
|
515
546
|
)
|
516
547
|
|
517
548
|
# Compute unique colors and mapping for partial observability
|
@@ -272,6 +272,19 @@ ENV_CONFIGS: Dict[str, Dict[str, Any]] = {
|
|
272
272
|
"nowrap": True,
|
273
273
|
"deterministic_spawn": True,
|
274
274
|
},
|
275
|
+
"ForagaxTwoBiome-v16": {
|
276
|
+
"size": None,
|
277
|
+
"aperture_size": None,
|
278
|
+
"objects": (
|
279
|
+
BROWN_MOREL_UNIFORM_RANDOM,
|
280
|
+
BROWN_OYSTER_UNIFORM_RANDOM,
|
281
|
+
GREEN_DEATHCAP_UNIFORM_RANDOM,
|
282
|
+
GREEN_FAKE_UNIFORM_RANDOM,
|
283
|
+
),
|
284
|
+
"biomes": None,
|
285
|
+
"nowrap": True,
|
286
|
+
"deterministic_spawn": True,
|
287
|
+
},
|
275
288
|
"ForagaxTwoBiomeSmall-v1": {
|
276
289
|
"size": (16, 8),
|
277
290
|
"aperture_size": None,
|
@@ -348,6 +361,7 @@ def make(
|
|
348
361
|
"ForagaxTwoBiome-v9",
|
349
362
|
"ForagaxTwoBiome-v10",
|
350
363
|
"ForagaxTwoBiome-v15",
|
364
|
+
"ForagaxTwoBiome-v16",
|
351
365
|
):
|
352
366
|
margin = aperture_size[1] // 2 + 1
|
353
367
|
width = 2 * margin + 9
|
@@ -410,6 +424,9 @@ def make(
|
|
410
424
|
hot, cold = create_weather_objects(file_index=file_index, same_color=same_color)
|
411
425
|
config["objects"] = (hot, cold)
|
412
426
|
|
427
|
+
if env_id == "ForagaxTwoBiome-v16":
|
428
|
+
config["teleport_interval"] = 10000
|
429
|
+
|
413
430
|
env_class_map = {
|
414
431
|
"object": ForagaxObjectEnv,
|
415
432
|
"rgb": ForagaxRGBEnv,
|
@@ -906,3 +906,62 @@ def test_single_color_all_objects():
|
|
906
906
|
for i in range(3):
|
907
907
|
obj_obs = obs[1, i, :] # Row 1, columns 0-2
|
908
908
|
chex.assert_trees_all_equal(obj_obs, jnp.array([1.0]))
|
909
|
+
|
910
|
+
|
911
|
+
def test_teleporting():
|
912
|
+
"""Test automatic teleporting to the furthest biome center from current position."""
|
913
|
+
key = jax.random.key(0)
|
914
|
+
|
915
|
+
# Create environment with two biomes and teleport every 5 steps
|
916
|
+
env = ForagaxObjectEnv(
|
917
|
+
size=(10, 10),
|
918
|
+
aperture_size=(3, 3),
|
919
|
+
objects=(WALL,),
|
920
|
+
biomes=(
|
921
|
+
Biome(
|
922
|
+
start=(1, 1), stop=(5, 5), object_frequencies=(0.0,)
|
923
|
+
), # Biome 0 center at (2,2)
|
924
|
+
Biome(
|
925
|
+
start=(6, 6), stop=(10, 10), object_frequencies=(0.0,)
|
926
|
+
), # Biome 1 center at (7,7)
|
927
|
+
),
|
928
|
+
teleport_interval=5,
|
929
|
+
nowrap=True,
|
930
|
+
)
|
931
|
+
params = env.default_params
|
932
|
+
|
933
|
+
# Reset and get initial state
|
934
|
+
obs, state = env.reset_env(key, params)
|
935
|
+
|
936
|
+
# Agent should start at center (5, 5), which is not in either biome initially
|
937
|
+
# But let's manually place it in biome 0 for testing
|
938
|
+
state = state.replace(pos=jnp.array([2, 2])) # In biome 0
|
939
|
+
|
940
|
+
# Step 4 times (time will be 0,1,2,3,4 after these steps)
|
941
|
+
for i in range(4):
|
942
|
+
key, step_key = jax.random.split(key)
|
943
|
+
obs, state, _, _, _ = env.step_env(step_key, state, Actions.LEFT, params)
|
944
|
+
|
945
|
+
# After 4 steps, time=4, next step should teleport (4+1) % 5 == 0
|
946
|
+
key, step_key = jax.random.split(key)
|
947
|
+
obs, state, _, _, _ = env.step_env(step_key, state, Actions.LEFT, params)
|
948
|
+
|
949
|
+
# Should have teleported to the furthest biome center (biome 1 center)
|
950
|
+
# From (2,2), (7,7) is further than (2,2)
|
951
|
+
expected_pos = jnp.array([7, 7])
|
952
|
+
chex.assert_trees_all_equal(state.pos, expected_pos)
|
953
|
+
|
954
|
+
# Step another 4 times to reach time=9, then teleport back
|
955
|
+
# From [7,7], move right to stay in biome: [8,7], [9,7], then stay
|
956
|
+
for i in range(4):
|
957
|
+
key, step_key = jax.random.split(key)
|
958
|
+
obs, state, _, _, _ = env.step(step_key, state, Actions.RIGHT, params)
|
959
|
+
|
960
|
+
# After another 4 steps, time=9, next step should teleport (9+1) % 5 == 0
|
961
|
+
key, step_key = jax.random.split(key)
|
962
|
+
obs, state, _, _, _ = env.step(step_key, state, Actions.RIGHT, params)
|
963
|
+
|
964
|
+
# Should teleport to the furthest biome center (biome 0 center)
|
965
|
+
# From (7,7), (2,2) is further than (7,7)
|
966
|
+
expected_pos = jnp.array([2, 2])
|
967
|
+
chex.assert_trees_all_equal(state.pos, expected_pos)
|
File without changes
|
File without changes
|
{continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/continual_foragax.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
{continual_foragax-0.24.2 → continual_foragax-0.25.0}/src/continual_foragax.egg-info/requires.txt
RENAMED
File without changes
|
{continual_foragax-0.24.2 → continual_foragax-0.25.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
|