continual-foragax 0.20.0__py3-none-any.whl → 0.21.0__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.
- {continual_foragax-0.20.0.dist-info → continual_foragax-0.21.0.dist-info}/METADATA +1 -1
- {continual_foragax-0.20.0.dist-info → continual_foragax-0.21.0.dist-info}/RECORD +8 -8
- foragax/env.py +6 -12
- foragax/objects.py +28 -0
- foragax/registry.py +17 -1
- {continual_foragax-0.20.0.dist-info → continual_foragax-0.21.0.dist-info}/WHEEL +0 -0
- {continual_foragax-0.20.0.dist-info → continual_foragax-0.21.0.dist-info}/entry_points.txt +0 -0
- {continual_foragax-0.20.0.dist-info → continual_foragax-0.21.0.dist-info}/top_level.txt +0 -0
@@ -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=
|
4
|
-
foragax/objects.py,sha256=
|
5
|
-
foragax/registry.py,sha256=
|
3
|
+
foragax/env.py,sha256=phGPMzwNKbwLLIyme1bjca3l2MLNKfYYBmly7JP8cLc,20498
|
4
|
+
foragax/objects.py,sha256=8tBFMiquWCkhOpNndNmzovMjw7lE5P81OOlUvN2F65w,8301
|
5
|
+
foragax/registry.py,sha256=lSTnLrERIpSgPIEmtUWjjTdUiH6oLV1aO9G58W31o9M,9072
|
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.
|
132
|
-
continual_foragax-0.
|
133
|
-
continual_foragax-0.
|
134
|
-
continual_foragax-0.
|
135
|
-
continual_foragax-0.
|
131
|
+
continual_foragax-0.21.0.dist-info/METADATA,sha256=_i2CbUxmj7yQX6QIv3D6QswoWkRAT_c_EejTUUYjd1w,4897
|
132
|
+
continual_foragax-0.21.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
133
|
+
continual_foragax-0.21.0.dist-info/entry_points.txt,sha256=Qiu6iE_XudrDO_bVAMeA435h4PO9ourt8huvSHiuMPc,41
|
134
|
+
continual_foragax-0.21.0.dist-info/top_level.txt,sha256=-z3SDK6RfLIcLI24n8rdbeFzlVY3hunChzlu-v1Fncs,8
|
135
|
+
continual_foragax-0.21.0.dist-info/RECORD,,
|
foragax/env.py
CHANGED
@@ -361,19 +361,13 @@ class ForagaxEnv(environment.Environment):
|
|
361
361
|
if self.nowrap:
|
362
362
|
y_coords = jnp.clip(y_coords_original, 0, self.size[1] - 1)
|
363
363
|
x_coords = jnp.clip(x_coords_original, 0, self.size[0] - 1)
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
)
|
370
|
-
original_colors = img[y_coords, x_coords]
|
364
|
+
# Create tint mask: any in-bounds original position maps to a cell makes it tinted
|
365
|
+
tint_mask = jnp.zeros((self.size[1], self.size[0]), dtype=int)
|
366
|
+
tint_mask = tint_mask.at[y_coords, x_coords].set(1)
|
367
|
+
# Apply tint to masked positions
|
368
|
+
original_colors = img
|
371
369
|
tinted_colors = (1 - alpha) * original_colors + alpha * agent_color
|
372
|
-
img =
|
373
|
-
jnp.where(
|
374
|
-
in_bounds[..., None], tinted_colors, img[y_coords, x_coords]
|
375
|
-
)
|
376
|
-
)
|
370
|
+
img = jnp.where(tint_mask[..., None], tinted_colors, img)
|
377
371
|
else:
|
378
372
|
y_coords = jnp.mod(y_coords_original, self.size[1])
|
379
373
|
x_coords = jnp.mod(x_coords_original, self.size[0])
|
foragax/objects.py
CHANGED
@@ -242,6 +242,34 @@ GREEN_FAKE_2 = NormalRegenForagaxObject(
|
|
242
242
|
mean_regen_delay=10,
|
243
243
|
std_regen_delay=1,
|
244
244
|
)
|
245
|
+
BROWN_MOREL_UNIFORM = DefaultForagaxObject(
|
246
|
+
name="brown_morel",
|
247
|
+
reward=10.0,
|
248
|
+
collectable=True,
|
249
|
+
color=(63, 30, 25),
|
250
|
+
regen_delay=(90, 110),
|
251
|
+
)
|
252
|
+
BROWN_OYSTER_UNIFORM = DefaultForagaxObject(
|
253
|
+
name="brown_oyster",
|
254
|
+
reward=1.0,
|
255
|
+
collectable=True,
|
256
|
+
color=(63, 30, 25),
|
257
|
+
regen_delay=(9, 11),
|
258
|
+
)
|
259
|
+
GREEN_DEATHCAP_UNIFORM = DefaultForagaxObject(
|
260
|
+
name="green_deathcap",
|
261
|
+
reward=-5.0,
|
262
|
+
collectable=True,
|
263
|
+
color=(0, 255, 0),
|
264
|
+
regen_delay=(9, 11),
|
265
|
+
)
|
266
|
+
GREEN_FAKE_UNIFORM = DefaultForagaxObject(
|
267
|
+
name="green_fake",
|
268
|
+
reward=0.0,
|
269
|
+
collectable=True,
|
270
|
+
color=(0, 255, 0),
|
271
|
+
regen_delay=(9, 11),
|
272
|
+
)
|
245
273
|
|
246
274
|
|
247
275
|
def create_weather_objects(
|
foragax/registry.py
CHANGED
@@ -12,12 +12,16 @@ from foragax.env import (
|
|
12
12
|
from foragax.objects import (
|
13
13
|
BROWN_MOREL,
|
14
14
|
BROWN_MOREL_2,
|
15
|
+
BROWN_MOREL_UNIFORM,
|
15
16
|
BROWN_OYSTER,
|
17
|
+
BROWN_OYSTER_UNIFORM,
|
16
18
|
GREEN_DEATHCAP,
|
17
19
|
GREEN_DEATHCAP_2,
|
18
20
|
GREEN_DEATHCAP_3,
|
21
|
+
GREEN_DEATHCAP_UNIFORM,
|
19
22
|
GREEN_FAKE,
|
20
23
|
GREEN_FAKE_2,
|
24
|
+
GREEN_FAKE_UNIFORM,
|
21
25
|
LARGE_MOREL,
|
22
26
|
LARGE_OYSTER,
|
23
27
|
MEDIUM_MOREL,
|
@@ -147,6 +151,18 @@ ENV_CONFIGS: Dict[str, Dict[str, Any]] = {
|
|
147
151
|
"biomes": None,
|
148
152
|
"nowrap": True,
|
149
153
|
},
|
154
|
+
"ForagaxTwoBiome-v8": {
|
155
|
+
"size": None,
|
156
|
+
"aperture_size": None,
|
157
|
+
"objects": (
|
158
|
+
BROWN_MOREL_UNIFORM,
|
159
|
+
BROWN_OYSTER_UNIFORM,
|
160
|
+
GREEN_DEATHCAP_UNIFORM,
|
161
|
+
GREEN_FAKE_UNIFORM,
|
162
|
+
),
|
163
|
+
"biomes": None,
|
164
|
+
"nowrap": True,
|
165
|
+
},
|
150
166
|
"ForagaxTwoBiomeSmall-v1": {
|
151
167
|
"size": (16, 8),
|
152
168
|
"aperture_size": None,
|
@@ -217,7 +233,7 @@ def make(
|
|
217
233
|
if nowrap is not None:
|
218
234
|
config["nowrap"] = nowrap
|
219
235
|
|
220
|
-
if env_id
|
236
|
+
if env_id in ("ForagaxTwoBiome-v7", "ForagaxTwoBiome-v8"):
|
221
237
|
margin = aperture_size[1] // 2 + 1
|
222
238
|
width = 2 * margin + 9
|
223
239
|
config["size"] = (width, 15)
|
File without changes
|
File without changes
|
File without changes
|