continual-foragax 0.38.0__tar.gz → 0.40.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 (143) hide show
  1. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/PKG-INFO +1 -1
  2. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/pyproject.toml +2 -2
  3. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/continual_foragax.egg-info/PKG-INFO +1 -1
  4. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/env.py +46 -39
  5. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/registry.py +2 -5
  6. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/tests/test_benchmark.py +98 -7
  7. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/tests/test_foragax.py +0 -60
  8. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/README.md +0 -0
  9. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/setup.cfg +0 -0
  10. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/continual_foragax.egg-info/SOURCES.txt +0 -0
  11. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/continual_foragax.egg-info/dependency_links.txt +0 -0
  12. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/continual_foragax.egg-info/entry_points.txt +0 -0
  13. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/continual_foragax.egg-info/requires.txt +0 -0
  14. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/continual_foragax.egg-info/top_level.txt +0 -0
  15. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/__init__.py +0 -0
  16. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/colors.py +0 -0
  17. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100897.txt +0 -0
  18. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100928.txt +0 -0
  19. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100929.txt +0 -0
  20. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100930.txt +0 -0
  21. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID100931.txt +0 -0
  22. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106714.txt +0 -0
  23. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106715.txt +0 -0
  24. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106716.txt +0 -0
  25. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106717.txt +0 -0
  26. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106718.txt +0 -0
  27. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106930.txt +0 -0
  28. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106931.txt +0 -0
  29. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106932.txt +0 -0
  30. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106933.txt +0 -0
  31. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106934.txt +0 -0
  32. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106935.txt +0 -0
  33. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106936.txt +0 -0
  34. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106937.txt +0 -0
  35. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106938.txt +0 -0
  36. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106939.txt +0 -0
  37. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106940.txt +0 -0
  38. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106941.txt +0 -0
  39. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106942.txt +0 -0
  40. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106943.txt +0 -0
  41. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106994.txt +0 -0
  42. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106995.txt +0 -0
  43. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106996.txt +0 -0
  44. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106997.txt +0 -0
  45. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106998.txt +0 -0
  46. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID106999.txt +0 -0
  47. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107000.txt +0 -0
  48. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107001.txt +0 -0
  49. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107002.txt +0 -0
  50. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107003.txt +0 -0
  51. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107004.txt +0 -0
  52. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107005.txt +0 -0
  53. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107006.txt +0 -0
  54. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107007.txt +0 -0
  55. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107008.txt +0 -0
  56. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107009.txt +0 -0
  57. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107010.txt +0 -0
  58. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107011.txt +0 -0
  59. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107012.txt +0 -0
  60. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107013.txt +0 -0
  61. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107014.txt +0 -0
  62. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107015.txt +0 -0
  63. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107016.txt +0 -0
  64. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107017.txt +0 -0
  65. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107018.txt +0 -0
  66. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107019.txt +0 -0
  67. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107020.txt +0 -0
  68. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107021.txt +0 -0
  69. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107022.txt +0 -0
  70. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107023.txt +0 -0
  71. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107024.txt +0 -0
  72. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107025.txt +0 -0
  73. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107026.txt +0 -0
  74. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107027.txt +0 -0
  75. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107028.txt +0 -0
  76. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107029.txt +0 -0
  77. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107030.txt +0 -0
  78. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107031.txt +0 -0
  79. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107032.txt +0 -0
  80. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107033.txt +0 -0
  81. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107034.txt +0 -0
  82. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107035.txt +0 -0
  83. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107036.txt +0 -0
  84. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107037.txt +0 -0
  85. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107038.txt +0 -0
  86. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107039.txt +0 -0
  87. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107040.txt +0 -0
  88. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107041.txt +0 -0
  89. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107042.txt +0 -0
  90. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107043.txt +0 -0
  91. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107044.txt +0 -0
  92. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107045.txt +0 -0
  93. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107046.txt +0 -0
  94. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107047.txt +0 -0
  95. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107048.txt +0 -0
  96. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107049.txt +0 -0
  97. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107050.txt +0 -0
  98. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107051.txt +0 -0
  99. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107052.txt +0 -0
  100. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107053.txt +0 -0
  101. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107054.txt +0 -0
  102. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107055.txt +0 -0
  103. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107056.txt +0 -0
  104. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107057.txt +0 -0
  105. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107058.txt +0 -0
  106. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107059.txt +0 -0
  107. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107060.txt +0 -0
  108. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107061.txt +0 -0
  109. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107062.txt +0 -0
  110. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107063.txt +0 -0
  111. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107064.txt +0 -0
  112. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107065.txt +0 -0
  113. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107066.txt +0 -0
  114. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107067.txt +0 -0
  115. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107068.txt +0 -0
  116. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107069.txt +0 -0
  117. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107070.txt +0 -0
  118. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID107071.txt +0 -0
  119. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID115808.txt +0 -0
  120. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID115812.txt +0 -0
  121. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID146811.txt +0 -0
  122. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156831.txt +0 -0
  123. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156835.txt +0 -0
  124. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156839.txt +0 -0
  125. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156843.txt +0 -0
  126. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156847.txt +0 -0
  127. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156851.txt +0 -0
  128. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156855.txt +0 -0
  129. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156859.txt +0 -0
  130. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156863.txt +0 -0
  131. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156867.txt +0 -0
  132. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156871.txt +0 -0
  133. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156875.txt +0 -0
  134. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156879.txt +0 -0
  135. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156883.txt +0 -0
  136. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/TG_SOUID156887.txt +0 -0
  137. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/elements.txt +0 -0
  138. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/metadata.txt +0 -0
  139. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/data/ECA_non-blended_custom/sources.txt +0 -0
  140. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/objects.py +0 -0
  141. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/rendering.py +0 -0
  142. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/src/foragax/weather.py +0 -0
  143. {continual_foragax-0.38.0 → continual_foragax-0.40.0}/tests/test_registry.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: continual-foragax
3
- Version: 0.38.0
3
+ Version: 0.40.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.38.0"
3
+ version = "0.40.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.38.0"
33
+ version = "0.40.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.38.0
3
+ Version: 0.40.0
4
4
  Summary: A continual reinforcement learning benchmark
5
5
  Author-email: Steven Tang <stang5@ualberta.ca>
6
6
  Requires-Python: >=3.8
@@ -6,7 +6,7 @@ Source: https://github.com/andnp/Forager
6
6
  from dataclasses import dataclass
7
7
  from enum import IntEnum
8
8
  from functools import partial
9
- from typing import Any, Dict, Optional, Tuple, Union
9
+ from typing import Any, Dict, Tuple, Union
10
10
 
11
11
  import jax
12
12
  import jax.numpy as jnp
@@ -128,7 +128,6 @@ class ForagaxEnv(environment.Environment):
128
128
  biomes: Tuple[Biome, ...] = (Biome(object_frequencies=()),),
129
129
  nowrap: bool = False,
130
130
  deterministic_spawn: bool = False,
131
- teleport_interval: Optional[int] = None,
132
131
  observation_type: str = "object",
133
132
  dynamic_biomes: bool = False,
134
133
  biome_consumption_threshold: float = 0.9,
@@ -154,7 +153,6 @@ class ForagaxEnv(environment.Environment):
154
153
  self.observation_type = observation_type
155
154
  self.nowrap = nowrap
156
155
  self.deterministic_spawn = deterministic_spawn
157
- self.teleport_interval = teleport_interval
158
156
  self.dynamic_biomes = dynamic_biomes
159
157
  self.biome_consumption_threshold = biome_consumption_threshold
160
158
  self.dynamic_biome_spawn_empty = dynamic_biome_spawn_empty
@@ -391,23 +389,6 @@ class ForagaxEnv(environment.Environment):
391
389
  is_blocking = self.object_blocking[obj_at_new_pos]
392
390
  pos = jax.lax.select(is_blocking, state.pos, new_pos)
393
391
 
394
- # Check for automatic teleport
395
- if self.teleport_interval is not None:
396
- should_teleport = jnp.mod(state.time + 1, self.teleport_interval) == 0
397
- else:
398
- should_teleport = False
399
-
400
- def teleport_fn():
401
- # Calculate squared distances from current position to each biome center
402
- diffs = self.biome_centers_jax - pos
403
- distances = jnp.sum(diffs**2, axis=1)
404
- # Find the index of the furthest biome center
405
- furthest_idx = jnp.argmax(distances)
406
- new_pos = self.biome_centers_jax[furthest_idx]
407
- return new_pos
408
-
409
- pos = jax.lax.cond(should_teleport, teleport_fn, lambda: pos)
410
-
411
392
  # 2. HANDLE COLLISIONS AND REWARDS
412
393
  obj_at_pos = current_objects[pos[1], pos[0]]
413
394
  is_collectable = self.object_collectable[obj_at_pos]
@@ -774,20 +755,53 @@ class ForagaxEnv(environment.Environment):
774
755
  biome_mask = self.biome_masks_array[i]
775
756
  new_gen_value = new_biome_state.generation[i]
776
757
 
777
- # Only update where new spawn has objects and biome should respawn
778
- is_new_object = (
779
- (all_new_objects[i] > 0) & biome_mask & should_respawn[i][..., None]
780
- )
758
+ # Update mask: biome area AND needs respawn
759
+ should_update = biome_mask & should_respawn[i][..., None]
760
+
761
+ # 1. Merge: Overwrite with new objects if present, otherwise keep existing
762
+ # If the new spawn has an object, we take it. If it's empty, we keep whatever was there.
763
+ new_spawn_valid = all_new_objects[i] > 0
781
764
 
782
- new_obj_id = jnp.where(is_new_object, all_new_objects[i], new_obj_id)
783
- new_color = jnp.where(
784
- is_new_object[..., None], all_new_colors[i], new_color
765
+ merged_objs = jnp.where(new_spawn_valid, all_new_objects[i], new_obj_id)
766
+ merged_colors = jnp.where(
767
+ new_spawn_valid[..., None], all_new_colors[i], new_color
785
768
  )
786
- new_params = jnp.where(
787
- is_new_object[..., None], all_new_params[i], new_params
769
+ merged_params = jnp.where(
770
+ new_spawn_valid[..., None], all_new_params[i], new_params
788
771
  )
789
- new_gen = jnp.where(is_new_object, new_gen_value, new_gen)
790
- new_spawn = jnp.where(is_new_object, current_time, new_spawn)
772
+
773
+ # For generation/spawn time, update only if we took the NEW object
774
+ merged_gen = jnp.where(new_spawn_valid, new_gen_value, new_gen)
775
+ merged_spawn = jnp.where(new_spawn_valid, current_time, new_spawn)
776
+
777
+ # 2. Apply dropout to the MERGED result (only where we are allowed to update)
778
+ if self.dynamic_biome_spawn_empty > 0:
779
+ key, dropout_key = jax.random.split(key)
780
+ # Dropout applies only to cells that are both in the biome AND need updating
781
+ keep_mask = jax.random.bernoulli(
782
+ dropout_key, 1.0 - self.dynamic_biome_spawn_empty, merged_objs.shape
783
+ )
784
+ # Only apply dropout where should_update is true; elsewhere, keep merged_objs
785
+ dropout_mask = should_update & keep_mask
786
+ # Apply dropout only to the merged result and associated metadata
787
+ final_objs = jnp.where(dropout_mask, merged_objs, 0)
788
+ final_colors = jnp.where(dropout_mask[..., None], merged_colors, 0)
789
+ final_params = jnp.where(dropout_mask[..., None], merged_params, 0)
790
+ final_gen = jnp.where(dropout_mask, merged_gen, 0)
791
+ final_spawn = jnp.where(dropout_mask, merged_spawn, 0)
792
+ else:
793
+ final_objs = merged_objs
794
+ final_colors = merged_colors
795
+ final_params = merged_params
796
+ final_gen = merged_gen
797
+ final_spawn = merged_spawn
798
+
799
+ # 3. Write back: Only update where should_update is true
800
+ new_obj_id = jnp.where(should_update, final_objs, new_obj_id)
801
+ new_color = jnp.where(should_update[..., None], final_colors, new_color)
802
+ new_params = jnp.where(should_update[..., None], final_params, new_params)
803
+ new_gen = jnp.where(should_update, final_gen, new_gen)
804
+ new_spawn = jnp.where(should_update, final_spawn, new_spawn)
791
805
 
792
806
  # Clear timers in respawning biomes
793
807
  new_respawn_timer = object_state.respawn_timer
@@ -890,7 +904,7 @@ class ForagaxEnv(environment.Environment):
890
904
  biome_freqs = self.biome_object_frequencies[biome_idx]
891
905
  biome_mask = self.biome_masks_array[biome_idx]
892
906
 
893
- key, spawn_key, color_key, params_key, dropout_key = jax.random.split(key, 5)
907
+ key, spawn_key, color_key, params_key = jax.random.split(key, 4)
894
908
 
895
909
  # Generate object IDs using deterministic or random spawn
896
910
  if deterministic:
@@ -929,13 +943,6 @@ class ForagaxEnv(environment.Environment):
929
943
  jnp.searchsorted(cumulative_freqs, grid_rand, side="right") - 1
930
944
  )
931
945
 
932
- # Apply random dropout if configured
933
- if self.dynamic_biome_spawn_empty > 0:
934
- dropout_mask = jax.random.bernoulli(
935
- dropout_key, 1.0 - self.dynamic_biome_spawn_empty, object_grid.shape
936
- )
937
- object_grid = jnp.where(dropout_mask, object_grid, 0)
938
-
939
946
  # Initialize color grid
940
947
  color_grid = jnp.full((self.size[1], self.size[0], 3), 255, dtype=jnp.uint8)
941
948
 
@@ -147,12 +147,12 @@ ENV_CONFIGS: Dict[str, Dict[str, Any]] = {
147
147
  "size": (15, 15),
148
148
  "aperture_size": None,
149
149
  "objects": None,
150
- "biomes": (Biome(start=(0, 0), stop=(15, 15), object_frequencies=(0.2,)),),
150
+ "biomes": (Biome(start=(0, 0), stop=(15, 15), object_frequencies=(0.4,)),),
151
151
  "nowrap": False,
152
152
  "deterministic_spawn": True,
153
153
  "dynamic_biomes": True,
154
154
  "biome_consumption_threshold": 1000,
155
- "dynamic_biome_spawn_empty": 0.1,
155
+ "dynamic_biome_spawn_empty": 0.4,
156
156
  },
157
157
  "ForagaxTwoBiome-v1": {
158
158
  "size": (15, 15),
@@ -636,9 +636,6 @@ def make(
636
636
  biome2_deathcap,
637
637
  )
638
638
 
639
- if env_id == "ForagaxTwoBiome-v16":
640
- config["teleport_interval"] = 10000
641
-
642
639
  # Backward compatibility: map "world" to "object" with full world
643
640
  if observation_type == "world":
644
641
  # add deprecation warning
@@ -2,6 +2,7 @@ import chex
2
2
  import jax
3
3
  import jax.numpy as jnp
4
4
 
5
+ from foragax import registry
5
6
  from foragax.env import Actions, Biome, ForagaxEnv
6
7
  from foragax.objects import FLOWER, WALL
7
8
 
@@ -40,7 +41,7 @@ def test_benchmark_vision(benchmark):
40
41
  benchmark(benchmark_fn)
41
42
 
42
43
 
43
- def test_benchmark_creation(benchmark):
44
+ def test_benchmark_reset(benchmark):
44
45
  env = ForagaxEnv(
45
46
  size=1_000,
46
47
  aperture_size=31,
@@ -63,6 +64,40 @@ def test_benchmark_creation(benchmark):
63
64
  benchmark(benchmark_fn)
64
65
 
65
66
 
67
+ def test_benchmark_tiny_env(benchmark):
68
+ env = ForagaxEnv(
69
+ size=15,
70
+ aperture_size=11,
71
+ objects=(WALL, FLOWER),
72
+ biomes=(Biome(object_frequencies=(0.1, 0.1)),),
73
+ observation_type="color",
74
+ )
75
+ params = env.default_params
76
+ key = jax.random.key(0)
77
+ key, reset_key = jax.random.split(key)
78
+ _, state = env.reset(reset_key, params)
79
+
80
+ @jax.jit
81
+ def _run(state, key):
82
+ def f(carry, _):
83
+ state, key = carry
84
+ key, step_key = jax.random.split(key, 2)
85
+ _, new_state, _, _, _ = env.step(step_key, state, Actions.DOWN, params)
86
+ return (new_state, key), None
87
+
88
+ (final_state, _), _ = jax.lax.scan(f, (state, key), None, length=10)
89
+ return final_state
90
+
91
+ key, run_key = jax.random.split(key)
92
+ _run(state, run_key).pos.block_until_ready()
93
+
94
+ def benchmark_fn():
95
+ key, run_key = jax.random.split(jax.random.key(1))
96
+ _run(state, run_key).pos.block_until_ready()
97
+
98
+ benchmark(benchmark_fn)
99
+
100
+
66
101
  def test_benchmark_small_env(benchmark):
67
102
  env = ForagaxEnv(
68
103
  size=1_000,
@@ -84,7 +119,7 @@ def test_benchmark_small_env(benchmark):
84
119
  _, new_state, _, _, _ = env.step(step_key, state, Actions.DOWN, params)
85
120
  return (new_state, key), None
86
121
 
87
- (final_state, _), _ = jax.lax.scan(f, (state, key), None, length=1000)
122
+ (final_state, _), _ = jax.lax.scan(f, (state, key), None, length=10)
88
123
  return final_state
89
124
 
90
125
  key, run_key = jax.random.split(key)
@@ -120,7 +155,7 @@ def test_benchmark_big_env(benchmark):
120
155
  _, new_state, _, _, _ = env.step(step_key, state, Actions.DOWN, params)
121
156
  return (new_state, key), None
122
157
 
123
- (final_state, _), _ = jax.lax.scan(f, (state, key), None, length=100)
158
+ (final_state, _), _ = jax.lax.scan(f, (state, key), None, length=10)
124
159
  return final_state
125
160
 
126
161
  # warm-up compilation
@@ -136,7 +171,7 @@ def test_benchmark_big_env(benchmark):
136
171
 
137
172
 
138
173
  def test_benchmark_vmap_env(benchmark):
139
- num_envs = 100
174
+ num_envs = 10
140
175
  env = ForagaxEnv(
141
176
  size=1_000,
142
177
  aperture_size=11,
@@ -163,7 +198,7 @@ def test_benchmark_vmap_env(benchmark):
163
198
  )
164
199
  return (new_states, key), None
165
200
 
166
- (final_states, _), _ = jax.lax.scan(f, (states, key), None, length=1000)
201
+ (final_states, _), _ = jax.lax.scan(f, (states, key), None, length=10)
167
202
  return final_states
168
203
 
169
204
  # warm-up compilation
@@ -199,7 +234,7 @@ def test_benchmark_small_env_color(benchmark):
199
234
  _, new_state, _, _, _ = env.step(step_key, state, Actions.DOWN, params)
200
235
  return (new_state, key), None
201
236
 
202
- (final_state, _), _ = jax.lax.scan(f, (state, key), None, length=100)
237
+ (final_state, _), _ = jax.lax.scan(f, (state, key), None, length=10)
203
238
  return final_state
204
239
 
205
240
  key, run_key = jax.random.split(key)
@@ -233,7 +268,63 @@ def test_benchmark_small_env_world(benchmark):
233
268
  _, new_state, _, _, _ = env.step(step_key, state, Actions.DOWN, params)
234
269
  return (new_state, key), None
235
270
 
236
- (final_state, _), _ = jax.lax.scan(f, (state, key), None, length=100)
271
+ (final_state, _), _ = jax.lax.scan(f, (state, key), None, length=10)
272
+ return final_state
273
+
274
+ key, run_key = jax.random.split(key)
275
+ _run(state, run_key).pos.block_until_ready()
276
+
277
+ def benchmark_fn():
278
+ key, run_key = jax.random.split(jax.random.key(1))
279
+ _run(state, run_key).pos.block_until_ready()
280
+
281
+ benchmark(benchmark_fn)
282
+
283
+
284
+ def test_benchmark_diwali_v5(benchmark):
285
+ env = registry.make("ForagaxDiwali-v5")
286
+ params = env.default_params
287
+ key = jax.random.key(0)
288
+ key, reset_key = jax.random.split(key)
289
+ _, state = env.reset(reset_key, params)
290
+
291
+ @jax.jit
292
+ def _run(state, key):
293
+ def f(carry, _):
294
+ state, key = carry
295
+ key, step_key = jax.random.split(key, 2)
296
+ _, new_state, _, _, _ = env.step(step_key, state, Actions.DOWN, params)
297
+ return (new_state, key), None
298
+
299
+ (final_state, _), _ = jax.lax.scan(f, (state, key), None, length=10)
300
+ return final_state
301
+
302
+ key, run_key = jax.random.split(key)
303
+ _run(state, run_key).pos.block_until_ready()
304
+
305
+ def benchmark_fn():
306
+ key, run_key = jax.random.split(jax.random.key(1))
307
+ _run(state, run_key).pos.block_until_ready()
308
+
309
+ benchmark(benchmark_fn)
310
+
311
+
312
+ def test_benchmark_sine_two_biome_v1(benchmark):
313
+ env = registry.make("ForagaxSineTwoBiome-v1")
314
+ params = env.default_params
315
+ key = jax.random.key(0)
316
+ key, reset_key = jax.random.split(key)
317
+ _, state = env.reset(reset_key, params)
318
+
319
+ @jax.jit
320
+ def _run(state, key):
321
+ def f(carry, _):
322
+ state, key = carry
323
+ key, step_key = jax.random.split(key, 2)
324
+ _, new_state, _, _, _ = env.step(step_key, state, Actions.DOWN, params)
325
+ return (new_state, key), None
326
+
327
+ (final_state, _), _ = jax.lax.scan(f, (state, key), None, length=10)
237
328
  return final_state
238
329
 
239
330
  key, run_key = jax.random.split(key)
@@ -977,66 +977,6 @@ def test_single_color_all_objects():
977
977
  chex.assert_trees_all_equal(obj_obs, jnp.array([1.0]))
978
978
 
979
979
 
980
- def test_teleporting():
981
- """Test automatic teleporting to the furthest biome center from current position."""
982
- key = jax.random.key(0)
983
-
984
- # Create environment with two biomes and teleport every 5 steps
985
- env = ForagaxEnv(
986
- size=(10, 10),
987
- aperture_size=(3, 3),
988
- objects=(WALL,),
989
- biomes=(
990
- Biome(
991
- start=(1, 1), stop=(5, 5), object_frequencies=(0.0,)
992
- ), # Biome 0 center at (2,2)
993
- Biome(
994
- start=(6, 6), stop=(10, 10), object_frequencies=(0.0,)
995
- ), # Biome 1 center at (7,7)
996
- ),
997
- teleport_interval=5,
998
- nowrap=True,
999
- observation_type="color",
1000
- )
1001
- params = env.default_params
1002
-
1003
- # Reset and get initial state
1004
- obs, state = env.reset_env(key, params)
1005
-
1006
- # Agent should start at center (5, 5), which is not in either biome initially
1007
- # But let's manually place it in biome 0 for testing
1008
- state = state.replace(pos=jnp.array([2, 2])) # In biome 0
1009
-
1010
- # Step 4 times (time will be 0,1,2,3,4 after these steps)
1011
- for i in range(4):
1012
- key, step_key = jax.random.split(key)
1013
- obs, state, _, _, _ = env.step_env(step_key, state, Actions.LEFT, params)
1014
-
1015
- # After 4 steps, time=4, next step should teleport (4+1) % 5 == 0
1016
- key, step_key = jax.random.split(key)
1017
- obs, state, _, _, _ = env.step_env(step_key, state, Actions.LEFT, params)
1018
-
1019
- # Should have teleported to the furthest biome center (biome 1 center)
1020
- # From (2,2), (7,7) is further than (2,2)
1021
- expected_pos = jnp.array([7, 7])
1022
- chex.assert_trees_all_equal(state.pos, expected_pos)
1023
-
1024
- # Step another 4 times to reach time=9, then teleport back
1025
- # From [7,7], move right to stay in biome: [8,7], [9,7], then stay
1026
- for i in range(4):
1027
- key, step_key = jax.random.split(key)
1028
- obs, state, _, _, _ = env.step(step_key, state, Actions.RIGHT, params)
1029
-
1030
- # After another 4 steps, time=9, next step should teleport (9+1) % 5 == 0
1031
- key, step_key = jax.random.split(key)
1032
- obs, state, _, _, _ = env.step(step_key, state, Actions.RIGHT, params)
1033
-
1034
- # Should teleport to the furthest biome center (biome 0 center)
1035
- # From (7,7), (2,2) is further than (7,7)
1036
- expected_pos = jnp.array([2, 2])
1037
- chex.assert_trees_all_equal(state.pos, expected_pos)
1038
-
1039
-
1040
980
  def test_info_discount():
1041
981
  """Test that info contains discount."""
1042
982
  key = jax.random.key(0)