continual-foragax 0.11.0__tar.gz → 0.13.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.
Files changed (141) hide show
  1. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/PKG-INFO +1 -1
  2. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/pyproject.toml +2 -2
  3. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/continual_foragax.egg-info/PKG-INFO +1 -1
  4. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/env.py +38 -7
  5. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/objects.py +12 -3
  6. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/registry.py +36 -1
  7. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/tests/test_foragax.py +91 -0
  8. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/README.md +0 -0
  9. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/setup.cfg +0 -0
  10. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/continual_foragax.egg-info/SOURCES.txt +0 -0
  11. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/continual_foragax.egg-info/dependency_links.txt +0 -0
  12. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/continual_foragax.egg-info/entry_points.txt +0 -0
  13. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/continual_foragax.egg-info/requires.txt +0 -0
  14. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/continual_foragax.egg-info/top_level.txt +0 -0
  15. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/__init__.py +0 -0
  16. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/colors.py +0 -0
  17. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100897.txt +0 -0
  18. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100928.txt +0 -0
  19. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100929.txt +0 -0
  20. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100930.txt +0 -0
  21. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100931.txt +0 -0
  22. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106714.txt +0 -0
  23. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106715.txt +0 -0
  24. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106716.txt +0 -0
  25. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106717.txt +0 -0
  26. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106718.txt +0 -0
  27. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106930.txt +0 -0
  28. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106931.txt +0 -0
  29. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106932.txt +0 -0
  30. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106933.txt +0 -0
  31. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106934.txt +0 -0
  32. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106935.txt +0 -0
  33. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106936.txt +0 -0
  34. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106937.txt +0 -0
  35. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106938.txt +0 -0
  36. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106939.txt +0 -0
  37. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106940.txt +0 -0
  38. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106941.txt +0 -0
  39. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106942.txt +0 -0
  40. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106943.txt +0 -0
  41. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106994.txt +0 -0
  42. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106995.txt +0 -0
  43. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106996.txt +0 -0
  44. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106997.txt +0 -0
  45. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106998.txt +0 -0
  46. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106999.txt +0 -0
  47. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107000.txt +0 -0
  48. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107001.txt +0 -0
  49. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107002.txt +0 -0
  50. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107003.txt +0 -0
  51. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107004.txt +0 -0
  52. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107005.txt +0 -0
  53. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107006.txt +0 -0
  54. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107007.txt +0 -0
  55. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107008.txt +0 -0
  56. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107009.txt +0 -0
  57. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107010.txt +0 -0
  58. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107011.txt +0 -0
  59. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107012.txt +0 -0
  60. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107013.txt +0 -0
  61. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107014.txt +0 -0
  62. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107015.txt +0 -0
  63. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107016.txt +0 -0
  64. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107017.txt +0 -0
  65. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107018.txt +0 -0
  66. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107019.txt +0 -0
  67. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107020.txt +0 -0
  68. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107021.txt +0 -0
  69. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107022.txt +0 -0
  70. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107023.txt +0 -0
  71. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107024.txt +0 -0
  72. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107025.txt +0 -0
  73. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107026.txt +0 -0
  74. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107027.txt +0 -0
  75. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107028.txt +0 -0
  76. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107029.txt +0 -0
  77. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107030.txt +0 -0
  78. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107031.txt +0 -0
  79. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107032.txt +0 -0
  80. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107033.txt +0 -0
  81. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107034.txt +0 -0
  82. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107035.txt +0 -0
  83. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107036.txt +0 -0
  84. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107037.txt +0 -0
  85. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107038.txt +0 -0
  86. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107039.txt +0 -0
  87. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107040.txt +0 -0
  88. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107041.txt +0 -0
  89. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107042.txt +0 -0
  90. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107043.txt +0 -0
  91. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107044.txt +0 -0
  92. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107045.txt +0 -0
  93. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107046.txt +0 -0
  94. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107047.txt +0 -0
  95. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107048.txt +0 -0
  96. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107049.txt +0 -0
  97. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107050.txt +0 -0
  98. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107051.txt +0 -0
  99. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107052.txt +0 -0
  100. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107053.txt +0 -0
  101. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107054.txt +0 -0
  102. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107055.txt +0 -0
  103. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107056.txt +0 -0
  104. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107057.txt +0 -0
  105. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107058.txt +0 -0
  106. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107059.txt +0 -0
  107. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107060.txt +0 -0
  108. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107061.txt +0 -0
  109. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107062.txt +0 -0
  110. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107063.txt +0 -0
  111. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107064.txt +0 -0
  112. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107065.txt +0 -0
  113. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107066.txt +0 -0
  114. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107067.txt +0 -0
  115. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107068.txt +0 -0
  116. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107069.txt +0 -0
  117. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107070.txt +0 -0
  118. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107071.txt +0 -0
  119. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID115808.txt +0 -0
  120. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID115812.txt +0 -0
  121. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID146811.txt +0 -0
  122. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156831.txt +0 -0
  123. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156835.txt +0 -0
  124. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156839.txt +0 -0
  125. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156843.txt +0 -0
  126. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156847.txt +0 -0
  127. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156851.txt +0 -0
  128. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156855.txt +0 -0
  129. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156859.txt +0 -0
  130. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156863.txt +0 -0
  131. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156867.txt +0 -0
  132. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156871.txt +0 -0
  133. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156875.txt +0 -0
  134. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156879.txt +0 -0
  135. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156883.txt +0 -0
  136. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156887.txt +0 -0
  137. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/elements.txt +0 -0
  138. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/metadata.txt +0 -0
  139. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/data/ECA_non-blended_custom/sources.txt +0 -0
  140. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/rendering.py +0 -0
  141. {continual_foragax-0.11.0 → continual_foragax-0.13.0}/src/foragax/weather.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: continual-foragax
3
- Version: 0.11.0
3
+ Version: 0.13.0
4
4
  Summary: A continual reinforcement learning benchmark
5
5
  Author-email: Steven Tang <stang5@ualberta.ca>
6
6
  Requires-Python: >=3.8
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "continual-foragax"
3
- version = "0.11.0"
3
+ version = "0.13.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.11.0"
33
+ version = "0.13.0"
34
34
  tag_format = "$version"
35
35
  version_files = ["pyproject.toml"]
36
36
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: continual-foragax
3
- Version: 0.11.0
3
+ Version: 0.13.0
4
4
  Summary: A continual reinforcement learning benchmark
5
5
  Author-email: Steven Tang <stang5@ualberta.ca>
6
6
  Requires-Python: >=3.8
@@ -13,7 +13,13 @@ import jax.numpy as jnp
13
13
  from flax import struct
14
14
  from gymnax.environments import environment, spaces
15
15
 
16
- from foragax.objects import AGENT, EMPTY, BaseForagaxObject, WeatherObject
16
+ from foragax.objects import (
17
+ AGENT,
18
+ EMPTY,
19
+ PADDING,
20
+ BaseForagaxObject,
21
+ WeatherObject,
22
+ )
17
23
  from foragax.rendering import apply_true_borders
18
24
  from foragax.weather import get_temperature
19
25
 
@@ -64,6 +70,7 @@ class ForagaxEnv(environment.Environment):
64
70
  aperture_size: Union[Tuple[int, int], int] = (5, 5),
65
71
  objects: Tuple[BaseForagaxObject, ...] = (),
66
72
  biomes: Tuple[Biome, ...] = (Biome(object_frequencies=()),),
73
+ nowrap: bool = False,
67
74
  ):
68
75
  super().__init__()
69
76
  if isinstance(size, int):
@@ -73,7 +80,10 @@ class ForagaxEnv(environment.Environment):
73
80
  if isinstance(aperture_size, int):
74
81
  aperture_size = (aperture_size, aperture_size)
75
82
  self.aperture_size = aperture_size
83
+ self.nowrap = nowrap
76
84
  objects = (EMPTY,) + objects
85
+ if self.nowrap:
86
+ objects = objects + (PADDING,)
77
87
  self.objects = objects
78
88
  self.weather_object = None
79
89
  for o in objects:
@@ -122,8 +132,12 @@ class ForagaxEnv(environment.Environment):
122
132
  direction = DIRECTIONS[action]
123
133
  new_pos = state.pos + direction
124
134
 
125
- # Wrap around boundaries
126
- new_pos = jnp.mod(new_pos, jnp.array(self.size))
135
+ if self.nowrap:
136
+ in_bounds = jnp.all((new_pos >= 0) & (new_pos < jnp.array(self.size)))
137
+ new_pos = jnp.where(in_bounds, new_pos, state.pos)
138
+ else:
139
+ # Wrap around boundaries
140
+ new_pos = jnp.mod(new_pos, jnp.array(self.size))
127
141
 
128
142
  # Check for blocking objects
129
143
  obj_at_new_pos = current_objects[new_pos[1], new_pos[0]]
@@ -288,10 +302,26 @@ class ForagaxEnv(environment.Environment):
288
302
 
289
303
  y_offsets = jnp.arange(ap_h)
290
304
  x_offsets = jnp.arange(ap_w)
291
- y_coords = jnp.mod(start_y + y_offsets[:, None], self.size[1])
292
- x_coords = jnp.mod(start_x + x_offsets, self.size[0])
305
+ y_coords = start_y + y_offsets[:, None]
306
+ x_coords = start_x + x_offsets
307
+
308
+ if self.nowrap:
309
+ # Clamp coordinates to bounds
310
+ y_coords_clamped = jnp.clip(y_coords, 0, self.size[1] - 1)
311
+ x_coords_clamped = jnp.clip(x_coords, 0, self.size[0] - 1)
312
+ values = object_grid[y_coords_clamped, x_coords_clamped]
313
+ # Mark out-of-bounds positions with -1
314
+ y_out = (y_coords < 0) | (y_coords >= self.size[1])
315
+ x_out = (x_coords < 0) | (x_coords >= self.size[0])
316
+ out_of_bounds = y_out | x_out
317
+ padding_index = self.object_ids[-1]
318
+ aperture = jnp.where(out_of_bounds, padding_index, values)
319
+ else:
320
+ y_coords_mod = jnp.mod(y_coords, self.size[1])
321
+ x_coords_mod = jnp.mod(x_coords, self.size[0])
322
+ aperture = object_grid[y_coords_mod, x_coords_mod]
293
323
 
294
- return object_grid[y_coords, x_coords]
324
+ return aperture
295
325
 
296
326
  @partial(jax.jit, static_argnames=("self", "render_mode"))
297
327
  def render(self, state: EnvState, params: EnvParams, render_mode: str = "world"):
@@ -404,8 +434,9 @@ class ForagaxObjectEnv(ForagaxEnv):
404
434
  aperture_size: Union[Tuple[int, int], int] = (5, 5),
405
435
  objects: Tuple[BaseForagaxObject, ...] = (),
406
436
  biomes: Tuple[Biome, ...] = (Biome(object_frequencies=()),),
437
+ nowrap: bool = False,
407
438
  ):
408
- super().__init__(size, aperture_size, objects, biomes)
439
+ super().__init__(size, aperture_size, objects, biomes, nowrap)
409
440
 
410
441
  # Compute unique colors and mapping for partial observability
411
442
  # Exclude EMPTY (index 0) from color channels
@@ -179,6 +179,8 @@ DEATHCAP = DefaultForagaxObject(
179
179
  )
180
180
  AGENT = DefaultForagaxObject(name="agent", blocking=True, color=(0, 0, 255))
181
181
 
182
+ PADDING = DefaultForagaxObject(name="padding", blocking=True, color=(0, 0, 0))
183
+
182
184
  BROWN_MOREL = NormalRegenForagaxObject(
183
185
  name="brown_morel",
184
186
  reward=30.0,
@@ -212,7 +214,10 @@ GREEN_FAKE = DefaultForagaxObject(
212
214
 
213
215
 
214
216
  def create_weather_objects(
215
- file_index: int = 0, repeat: int = 500, multiplier: float = 1.0
217
+ file_index: int = 0,
218
+ repeat: int = 500,
219
+ multiplier: float = 1.0,
220
+ same_color: bool = False,
216
221
  ):
217
222
  """Create HOT and COLD WeatherObject instances using the specified file.
218
223
 
@@ -220,6 +225,7 @@ def create_weather_objects(
220
225
  file_index: Index into `FILE_PATHS` to select the temperature file.
221
226
  repeat: How many steps each temperature value repeats for.
222
227
  multiplier: Base multiplier applied to HOT; COLD will use -multiplier.
228
+ same_color: If True, both HOT and COLD use the same color.
223
229
 
224
230
  Returns:
225
231
  A tuple (HOT, COLD) of WeatherObject instances.
@@ -232,20 +238,23 @@ def create_weather_objects(
232
238
 
233
239
  rewards = load_data(FILE_PATHS[file_index])
234
240
 
241
+ hot_color = (63, 30, 25) if same_color else (255, 0, 255)
242
+
235
243
  hot = WeatherObject(
236
244
  name="hot",
237
245
  rewards=rewards,
238
246
  repeat=repeat,
239
247
  multiplier=multiplier,
240
- color=(255, 0, 255),
248
+ color=hot_color,
241
249
  )
242
250
 
251
+ cold_color = hot_color if same_color else (0, 255, 255)
243
252
  cold = WeatherObject(
244
253
  name="cold",
245
254
  rewards=rewards,
246
255
  repeat=repeat,
247
256
  multiplier=-multiplier,
248
- color=(0, 255, 255),
257
+ color=cold_color,
249
258
  )
250
259
 
251
260
  return hot, cold
@@ -31,6 +31,19 @@ ENV_CONFIGS: Dict[str, Dict[str, Any]] = {
31
31
  # Cold biome
32
32
  Biome(start=(0, 10), stop=(15, 12), object_frequencies=(0.0, 0.5)),
33
33
  ),
34
+ "nowrap": False,
35
+ },
36
+ "ForagaxWeather-v2": {
37
+ "size": (15, 15),
38
+ "aperture_size": None,
39
+ "objects": None,
40
+ "biomes": (
41
+ # Hot biome
42
+ Biome(start=(0, 3), stop=(15, 5), object_frequencies=(0.5, 0.0)),
43
+ # Cold biome
44
+ Biome(start=(0, 10), stop=(15, 12), object_frequencies=(0.0, 0.5)),
45
+ ),
46
+ "nowrap": True,
34
47
  },
35
48
  "ForagaxTwoBiome-v1": {
36
49
  "size": (15, 15),
@@ -44,6 +57,7 @@ ENV_CONFIGS: Dict[str, Dict[str, Any]] = {
44
57
  start=(10, 0), stop=(12, 15), object_frequencies=(0.0, 0.5, 0.0, 0.25)
45
58
  ),
46
59
  ),
60
+ "nowrap": False,
47
61
  },
48
62
  "ForagaxTwoBiomeSmall-v1": {
49
63
  "size": (16, 8),
@@ -55,6 +69,7 @@ ENV_CONFIGS: Dict[str, Dict[str, Any]] = {
55
69
  # Oyster biome
56
70
  Biome(start=(10, 2), stop=(14, 6), object_frequencies=(0.0, 1.0)),
57
71
  ),
72
+ "nowrap": False,
58
73
  },
59
74
  "ForagaxTwoBiomeSmall-v2": {
60
75
  "size": (16, 8),
@@ -66,6 +81,19 @@ ENV_CONFIGS: Dict[str, Dict[str, Any]] = {
66
81
  # Oyster biome
67
82
  Biome(start=(11, 3), stop=(14, 6), object_frequencies=(0.0, 1.0)),
68
83
  ),
84
+ "nowrap": False,
85
+ },
86
+ "ForagaxTwoBiomeSmall-v3": {
87
+ "size": (16, 8),
88
+ "aperture_size": None,
89
+ "objects": (MEDIUM_MOREL, LARGE_OYSTER),
90
+ "biomes": (
91
+ # Morel biome
92
+ Biome(start=(3, 3), stop=(6, 6), object_frequencies=(1.0, 0.0)),
93
+ # Oyster biome
94
+ Biome(start=(11, 3), stop=(14, 6), object_frequencies=(0.0, 1.0)),
95
+ ),
96
+ "nowrap": True,
69
97
  },
70
98
  }
71
99
 
@@ -75,6 +103,7 @@ def make(
75
103
  observation_type: str = "object",
76
104
  aperture_size: Optional[Tuple[int, int]] = (5, 5),
77
105
  file_index: int = 0,
106
+ nowrap: Optional[bool] = None,
78
107
  ) -> ForagaxEnv:
79
108
  """Create a Foragax environment.
80
109
 
@@ -83,6 +112,9 @@ def make(
83
112
  observation_type: The type of observation to use. One of "object", "rgb", or "world".
84
113
  aperture_size: The size of the agent's observation aperture. If None, the default
85
114
  for the environment is used.
115
+ file_index: File index for weather objects. nowrap: If True, disables
116
+ wrapping around environment boundaries. If None, uses defaults per
117
+ environment.
86
118
 
87
119
  Returns:
88
120
  A Foragax environment instance.
@@ -93,9 +125,12 @@ def make(
93
125
  config = ENV_CONFIGS[env_id].copy()
94
126
 
95
127
  config["aperture_size"] = aperture_size
128
+ if nowrap is not None:
129
+ config["nowrap"] = nowrap
96
130
 
97
131
  if env_id.startswith("ForagaxWeather"):
98
- hot, cold = create_weather_objects(file_index=file_index)
132
+ same_color = env_id == "ForagaxWeather-v2"
133
+ hot, cold = create_weather_objects(file_index=file_index, same_color=same_color)
99
134
  config["objects"] = (hot, cold)
100
135
 
101
136
  env_class_map = {
@@ -364,6 +364,63 @@ def test_wrapping_dynamics():
364
364
  assert jnp.array_equal(state.pos, jnp.array([2, 2]))
365
365
 
366
366
 
367
+ def test_no_wrapping_dynamics():
368
+ """Test that the agent does not wrap around the environment boundaries when nowrap=True."""
369
+ key = jax.random.key(0)
370
+ env = ForagaxObjectEnv(size=(5, 5), objects=(), nowrap=True)
371
+ params = env.default_params
372
+ _, state = env.reset(key, params)
373
+
374
+ # Agent starts at center (2,2)
375
+
376
+ # Move to top edge
377
+ for _ in range(2):
378
+ key, step_key = jax.random.split(key)
379
+ _, state, _, _, _ = env.step(step_key, state, Actions.UP, params)
380
+ assert jnp.array_equal(state.pos, jnp.array([2, 0])) # at top
381
+
382
+ # Try to move up again, should stay put
383
+ key, step_key = jax.random.split(key)
384
+ _, state, _, _, _ = env.step(step_key, state, Actions.UP, params)
385
+ assert jnp.array_equal(state.pos, jnp.array([2, 0])) # still at top
386
+
387
+ # Move to bottom edge
388
+ _, state = env.reset(key, params)
389
+ for _ in range(2):
390
+ key, step_key = jax.random.split(key)
391
+ _, state, _, _, _ = env.step(step_key, state, Actions.DOWN, params)
392
+ assert jnp.array_equal(state.pos, jnp.array([2, 4])) # at bottom
393
+
394
+ # Try to move down again, should stay put
395
+ key, step_key = jax.random.split(key)
396
+ _, state, _, _, _ = env.step(step_key, state, Actions.DOWN, params)
397
+ assert jnp.array_equal(state.pos, jnp.array([2, 4])) # still at bottom
398
+
399
+ # Move to left edge
400
+ _, state = env.reset(key, params)
401
+ for _ in range(2):
402
+ key, step_key = jax.random.split(key)
403
+ _, state, _, _, _ = env.step(step_key, state, Actions.LEFT, params)
404
+ assert jnp.array_equal(state.pos, jnp.array([0, 2])) # at left
405
+
406
+ # Try to move left again, should stay put
407
+ key, step_key = jax.random.split(key)
408
+ _, state, _, _, _ = env.step(step_key, state, Actions.LEFT, params)
409
+ assert jnp.array_equal(state.pos, jnp.array([0, 2])) # still at left
410
+
411
+ # Move to right edge
412
+ _, state = env.reset(key, params)
413
+ for _ in range(2):
414
+ key, step_key = jax.random.split(key)
415
+ _, state, _, _, _ = env.step(step_key, state, Actions.RIGHT, params)
416
+ assert jnp.array_equal(state.pos, jnp.array([4, 2])) # at right
417
+
418
+ # Try to move right again, should stay put
419
+ key, step_key = jax.random.split(key)
420
+ _, state, _, _, _ = env.step(step_key, state, Actions.RIGHT, params)
421
+ assert jnp.array_equal(state.pos, jnp.array([4, 2])) # still at right
422
+
423
+
367
424
  def test_wrapping_vision():
368
425
  """Test that the agent's vision wraps around the environment boundaries."""
369
426
  key = jax.random.key(0)
@@ -408,6 +465,40 @@ def test_wrapping_vision():
408
465
  assert jnp.array_equal(obs, expected)
409
466
 
410
467
 
468
+ def test_no_wrapping_vision():
469
+ """Test that the agent's vision does not wrap around boundaries when nowrap=True."""
470
+ key = jax.random.key(0)
471
+ object_types = (FLOWER,)
472
+ env_no_wrap = ForagaxObjectEnv(
473
+ size=(7, 7), aperture_size=(3, 3), objects=object_types, nowrap=True
474
+ )
475
+ params = env_no_wrap.default_params
476
+
477
+ # Place a flower at the opposite corner (6,6)
478
+ grid = jnp.zeros((7, 7), dtype=int)
479
+ grid = grid.at[6, 6].set(1) # FLOWER
480
+
481
+ # Agent at (0,0)
482
+ state = env_no_wrap.reset(key, params)[1]
483
+ state = state.replace(object_grid=grid, pos=jnp.array([0, 0]))
484
+
485
+ # With no wrapping, should not see the flower, see padding
486
+ obs_no_wrap = env_no_wrap.get_obs(state, params)
487
+ assert env_no_wrap.num_color_channels == 2 # Flower + padding
488
+ # Check that padding channel is activated for out of bound positions
489
+ padding_mask = jnp.array(
490
+ [
491
+ [1, 1, 1],
492
+ [1, 0, 0],
493
+ [1, 0, 0],
494
+ ],
495
+ dtype=bool,
496
+ )
497
+ assert jnp.all(obs_no_wrap[padding_mask, 1] == 1)
498
+ # And flower not visible
499
+ assert jnp.all(obs_no_wrap[:, :, 0] == 0)
500
+
501
+
411
502
  def test_generate_objects_in_biome():
412
503
  """Test generating objects within a specific biome area."""
413
504
  object_types = (WALL, FLOWER, THORNS, MOREL, OYSTER)