continual-foragax 0.33.0__py3-none-any.whl → 0.33.2__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: continual-foragax
3
- Version: 0.33.0
3
+ Version: 0.33.2
4
4
  Summary: A continual reinforcement learning benchmark
5
5
  Author-email: Steven Tang <stang5@ualberta.ca>
6
6
  Requires-Python: >=3.8
@@ -1,8 +1,8 @@
1
1
  foragax/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  foragax/colors.py,sha256=rqNPiywP4Nvr0POhsGpasRk-nMMTS3DOwFRUgperlUk,2065
3
- foragax/env.py,sha256=kf0B0D5CMUnOMiZ8diBlmlt_vf2Wh-M4gSNoeo4jfHY,55147
3
+ foragax/env.py,sha256=bDhNQTaqcoOwm9Csb1LHoduuNdE1j1RAhGnVV7cAEPI,55147
4
4
  foragax/objects.py,sha256=9wv0ZKT89dDkaeVwUwkVo4dwhRVeUxvsTyhoyYKfOEw,26508
5
- foragax/registry.py,sha256=hfzQHNgX6uoOdbf4_21iH25abQVQZIjBWn7h5bdrSBg,17981
5
+ foragax/registry.py,sha256=G_xpDsSJIclEjqxU_xtkOhv4KvPLp5y8Cq2x7VsasiQ,18092
6
6
  foragax/rendering.py,sha256=bms7wvBZTofoR-K-2QD2Ggeed7Viw8uwAEiEpEM3eSo,2768
7
7
  foragax/weather.py,sha256=KNAiwuFz8V__6G75vZIWQKPocLzXqxXn-Vt4TbHIpcA,1258
8
8
  foragax/data/ECA_non-blended_custom/TG_SOUID100897.txt,sha256=N7URbX6VlCZvCboUogYjMzy1I-0cfNPOn0QTLSHHfQ0,1776751
@@ -128,8 +128,8 @@ foragax/data/ECA_non-blended_custom/TG_SOUID156887.txt,sha256=juzTPgJoJxfqmZkorL
128
128
  foragax/data/ECA_non-blended_custom/elements.txt,sha256=OtcUBoDAHxuln79BPKGu0tsQxG_5G2BfAX3Ck130kEA,4507
129
129
  foragax/data/ECA_non-blended_custom/metadata.txt,sha256=nudnmOCy5cPJfSXt_IjyX0S5-T7NkCZREICZSimqeqc,48260
130
130
  foragax/data/ECA_non-blended_custom/sources.txt,sha256=1j3lSmINAoCMqPqFrHfZJriOz6sTYZNOhXzUwvTLas0,20857
131
- continual_foragax-0.33.0.dist-info/METADATA,sha256=vEOZLNVNPhccIZDIrN-puYjVPQKWHtThbhoVdUjhF4A,4713
132
- continual_foragax-0.33.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
133
- continual_foragax-0.33.0.dist-info/entry_points.txt,sha256=Qiu6iE_XudrDO_bVAMeA435h4PO9ourt8huvSHiuMPc,41
134
- continual_foragax-0.33.0.dist-info/top_level.txt,sha256=-z3SDK6RfLIcLI24n8rdbeFzlVY3hunChzlu-v1Fncs,8
135
- continual_foragax-0.33.0.dist-info/RECORD,,
131
+ continual_foragax-0.33.2.dist-info/METADATA,sha256=m6Om1tR_YnBz6lgN6iL_Ok0u9ucvX8IWM2E_cPYBECk,4713
132
+ continual_foragax-0.33.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
133
+ continual_foragax-0.33.2.dist-info/entry_points.txt,sha256=Qiu6iE_XudrDO_bVAMeA435h4PO9ourt8huvSHiuMPc,41
134
+ continual_foragax-0.33.2.dist-info/top_level.txt,sha256=-z3SDK6RfLIcLI24n8rdbeFzlVY3hunChzlu-v1Fncs,8
135
+ continual_foragax-0.33.2.dist-info/RECORD,,
foragax/env.py CHANGED
@@ -553,6 +553,15 @@ class ForagaxEnv(environment.Environment):
553
553
  info["biome_id"] = object_state.biome_id[pos[1], pos[0]]
554
554
  info["object_collected_id"] = jax.lax.select(should_collect, obj_at_pos, -1)
555
555
 
556
+ # 4. UPDATE STATE
557
+ state = EnvState(
558
+ pos=pos,
559
+ time=state.time + 1,
560
+ digestion_buffer=digestion_buffer,
561
+ object_state=object_state,
562
+ biome_state=biome_state,
563
+ )
564
+
556
565
  # Compute reward at each grid position
557
566
  fixed_key = jax.random.key(0) # Fixed key for deterministic reward computation
558
567
 
@@ -570,15 +579,6 @@ class ForagaxEnv(environment.Environment):
570
579
  )
571
580
  info["rewards"] = reward_grid
572
581
 
573
- # 4. UPDATE STATE
574
- state = EnvState(
575
- pos=pos,
576
- time=state.time + 1,
577
- digestion_buffer=digestion_buffer,
578
- object_state=object_state,
579
- biome_state=biome_state,
580
- )
581
-
582
582
  done = self.is_terminal(state, params)
583
583
  return (
584
584
  jax.lax.stop_gradient(self.get_obs(state, params)),
foragax/registry.py CHANGED
@@ -388,14 +388,19 @@ ENV_CONFIGS: Dict[str, Dict[str, Any]] = {
388
388
  "biomes": (
389
389
  # Biome 1 (left): Oyster +10, Death Cap -10 with sine
390
390
  Biome(
391
- start=(3, 0), stop=(5, 15), object_frequencies=(0.25, 0.25, 0.0, 0.0)
391
+ start=(3, 0),
392
+ stop=(5, 15),
393
+ object_frequencies=(8 / 30, 8 / 30, 0.0, 0.0),
392
394
  ),
393
395
  # Biome 2 (right): Oyster -10, Death Cap +10 with inverted sine
394
396
  Biome(
395
- start=(10, 0), stop=(12, 15), object_frequencies=(0.0, 0.0, 0.25, 0.25)
397
+ start=(10, 0),
398
+ stop=(12, 15),
399
+ object_frequencies=(0.0, 0.0, 8 / 30, 8 / 30),
396
400
  ),
397
401
  ),
398
402
  "nowrap": False,
403
+ "deterministic_spawn": True,
399
404
  },
400
405
  }
401
406