continual-foragax 0.10.0__tar.gz → 0.10.2__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.10.0 → continual_foragax-0.10.2}/PKG-INFO +1 -1
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/pyproject.toml +2 -2
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/continual_foragax.egg-info/PKG-INFO +1 -1
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/env.py +14 -3
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/rendering.py +5 -2
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/tests/test_foragax.py +15 -2
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/README.md +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/setup.cfg +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/continual_foragax.egg-info/SOURCES.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/continual_foragax.egg-info/dependency_links.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/continual_foragax.egg-info/entry_points.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/continual_foragax.egg-info/requires.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/continual_foragax.egg-info/top_level.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/__init__.py +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/colors.py +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100897.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100928.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100929.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100930.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100931.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106714.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106715.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106716.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106717.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106718.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106930.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106931.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106932.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106933.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106934.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106935.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106936.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106937.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106938.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106939.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106940.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106941.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106942.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106943.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106994.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106995.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106996.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106997.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106998.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106999.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107000.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107001.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107002.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107003.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107004.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107005.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107006.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107007.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107008.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107009.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107010.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107011.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107012.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107013.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107014.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107015.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107016.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107017.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107018.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107019.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107020.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107021.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107022.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107023.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107024.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107025.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107026.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107027.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107028.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107029.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107030.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107031.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107032.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107033.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107034.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107035.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107036.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107037.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107038.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107039.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107040.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107041.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107042.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107043.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107044.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107045.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107046.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107047.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107048.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107049.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107050.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107051.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107052.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107053.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107054.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107055.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107056.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107057.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107058.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107059.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107060.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107061.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107062.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107063.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107064.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107065.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107066.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107067.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107068.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107069.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107070.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107071.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID115808.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID115812.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID146811.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156831.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156835.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156839.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156843.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156847.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156851.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156855.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156859.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156863.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156867.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156871.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156875.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156879.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156883.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156887.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/elements.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/metadata.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/data/ECA_non-blended_custom/sources.txt +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/objects.py +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/registry.py +0 -0
- {continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/foragax/weather.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "continual-foragax"
|
3
|
-
version = "0.10.
|
3
|
+
version = "0.10.2"
|
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.10.
|
33
|
+
version = "0.10.2"
|
34
34
|
tag_format = "$version"
|
35
35
|
version_files = ["pyproject.toml"]
|
36
36
|
|
@@ -348,7 +348,9 @@ class ForagaxEnv(environment.Environment):
|
|
348
348
|
|
349
349
|
if is_true_mode:
|
350
350
|
# Apply true object borders by overlaying true colors on border pixels
|
351
|
-
img = apply_true_borders(
|
351
|
+
img = apply_true_borders(
|
352
|
+
img, render_grid, self.size, len(self.object_ids)
|
353
|
+
)
|
352
354
|
|
353
355
|
# Add grid lines for world mode
|
354
356
|
grid_color = jnp.zeros(3, dtype=jnp.uint8)
|
@@ -376,7 +378,9 @@ class ForagaxEnv(environment.Environment):
|
|
376
378
|
|
377
379
|
if is_true_mode:
|
378
380
|
# Apply true object borders by overlaying true colors on border pixels
|
379
|
-
img = apply_true_borders(
|
381
|
+
img = apply_true_borders(
|
382
|
+
img, aperture, self.aperture_size, len(self.object_ids)
|
383
|
+
)
|
380
384
|
|
381
385
|
# Add grid lines for aperture mode
|
382
386
|
grid_color = jnp.zeros(3, dtype=jnp.uint8)
|
@@ -492,7 +496,14 @@ class ForagaxWorldEnv(ForagaxEnv):
|
|
492
496
|
num_obj_types = len(self.object_ids)
|
493
497
|
# Decode grid for observation
|
494
498
|
obs_grid = jnp.maximum(0, state.object_grid)
|
495
|
-
obs =
|
499
|
+
obs = jnp.zeros((self.size[1], self.size[0], num_obj_types), dtype=jnp.float32)
|
500
|
+
|
501
|
+
num_object_channels = num_obj_types - 1
|
502
|
+
# create masks for all objects at once
|
503
|
+
object_ids = jnp.arange(1, num_obj_types)
|
504
|
+
object_masks = obs_grid[..., None] == object_ids[None, None, :]
|
505
|
+
obs = obs.at[:, :, :num_object_channels].set(object_masks.astype(float))
|
506
|
+
|
496
507
|
obs = obs.at[state.pos[1], state.pos[0], -1].set(1)
|
497
508
|
return obs
|
498
509
|
|
@@ -9,7 +9,10 @@ from foragax.colors import hsv_to_rgb_255
|
|
9
9
|
|
10
10
|
|
11
11
|
def apply_true_borders(
|
12
|
-
base_img: jax.Array,
|
12
|
+
base_img: jax.Array,
|
13
|
+
true_grid: jax.Array,
|
14
|
+
grid_size: Tuple[int, int],
|
15
|
+
num_objects: int,
|
13
16
|
) -> jax.Array:
|
14
17
|
"""Apply true object borders by overlaying HSV border colors on border pixels.
|
15
18
|
|
@@ -17,12 +20,12 @@ def apply_true_borders(
|
|
17
20
|
base_img: Base image with object colors
|
18
21
|
true_grid: Grid of object IDs for determining border colors
|
19
22
|
grid_size: (height, width) of the grid
|
23
|
+
num_objects: Number of object types
|
20
24
|
|
21
25
|
Returns:
|
22
26
|
Image with HSV borders overlaid on border pixels
|
23
27
|
"""
|
24
28
|
# Create HSV border colors for each object type
|
25
|
-
num_objects = true_grid.max() + 1 # Assume object IDs start from 0
|
26
29
|
hues = jnp.linspace(0, 1, num_objects, endpoint=False)
|
27
30
|
|
28
31
|
# Convert HSV to RGB for border colors
|
@@ -143,12 +143,25 @@ def test_rgb_observation_mode_large_aperture():
|
|
143
143
|
|
144
144
|
def test_world_observation_mode():
|
145
145
|
# can use world observation mode
|
146
|
-
env = ForagaxWorldEnv(
|
146
|
+
env = ForagaxWorldEnv(
|
147
|
+
size=(10, 10),
|
148
|
+
aperture_size=5,
|
149
|
+
objects=(WALL, FLOWER),
|
150
|
+
biomes=(Biome(object_frequencies=(0.1, 0.1)),),
|
151
|
+
)
|
147
152
|
params = env.default_params
|
148
153
|
key = jax.random.key(0)
|
149
154
|
obs, state = env.reset(key, params)
|
150
155
|
|
151
|
-
assert obs.shape == (10, 10,
|
156
|
+
assert obs.shape == (10, 10, 3)
|
157
|
+
# Check agent channel (last channel) is 0 except 1 at agent position
|
158
|
+
agent_channel = obs[:, :, 2]
|
159
|
+
assert jnp.sum(agent_channel) == 1
|
160
|
+
assert agent_channel[state.pos[1], state.pos[0]] == 1
|
161
|
+
|
162
|
+
# check non-zero values in other channels
|
163
|
+
assert jnp.sum(obs[:, :, 0]) > 0
|
164
|
+
assert jnp.sum(obs[:, :, 1]) > 0
|
152
165
|
|
153
166
|
|
154
167
|
def test_basic_movement():
|
File without changes
|
File without changes
|
{continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/continual_foragax.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
{continual_foragax-0.10.0 → continual_foragax-0.10.2}/src/continual_foragax.egg-info/requires.txt
RENAMED
File without changes
|
{continual_foragax-0.10.0 → continual_foragax-0.10.2}/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
|