cogames 0.3.59.post1.dev2__py3-none-any.whl → 0.3.65__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.
- cogames/cli/client.py +12 -0
- cogames/cli/leaderboard.py +40 -0
- cogames/cli/mission.py +31 -34
- cogames/cli/submit.py +1 -1
- cogames/cogs_vs_clips/clips.py +86 -0
- cogames/cogs_vs_clips/cog.py +14 -7
- cogames/cogs_vs_clips/cogsguard_tutorial.py +10 -11
- cogames/cogs_vs_clips/config.py +38 -0
- cogames/cogs_vs_clips/{cogs_vs_clips_mapgen.md → docs/cogs_vs_clips_mapgen.md} +6 -7
- cogames/cogs_vs_clips/evals/README.md +4 -4
- cogames/cogs_vs_clips/evals/cogsguard_evals.py +96 -0
- cogames/cogs_vs_clips/evals/diagnostic_evals.py +13 -100
- cogames/cogs_vs_clips/evals/difficulty_variants.py +9 -18
- cogames/cogs_vs_clips/evals/integrated_evals.py +8 -60
- cogames/cogs_vs_clips/evals/spanning_evals.py +48 -54
- cogames/cogs_vs_clips/mission.py +65 -277
- cogames/cogs_vs_clips/missions.py +16 -24
- cogames/cogs_vs_clips/sites.py +35 -25
- cogames/cogs_vs_clips/stations.py +33 -82
- cogames/cogs_vs_clips/team.py +44 -0
- cogames/cogs_vs_clips/{procedural.py → terrain.py} +12 -6
- cogames/cogs_vs_clips/variants.py +41 -118
- cogames/core.py +87 -0
- cogames/main.py +5 -1
- cogames/maps/evals/eval_balanced_spread.map +7 -3
- cogames/maps/evals/eval_clip_oxygen.map +7 -3
- cogames/maps/evals/eval_collect_resources.map +7 -3
- cogames/maps/evals/eval_collect_resources_hard.map +7 -3
- cogames/maps/evals/eval_collect_resources_medium.map +7 -3
- cogames/maps/evals/eval_divide_and_conquer.map +7 -3
- cogames/maps/evals/eval_energy_starved.map +7 -3
- cogames/maps/evals/eval_multi_coordinated_collect_hard.map +7 -3
- cogames/maps/evals/eval_oxygen_bottleneck.map +7 -3
- cogames/maps/evals/eval_single_use_world.map +7 -3
- cogames/maps/evals/extractor_hub_100x100.map +7 -3
- cogames/maps/evals/extractor_hub_30x30.map +7 -3
- cogames/maps/evals/extractor_hub_50x50.map +7 -3
- cogames/maps/evals/extractor_hub_70x70.map +7 -3
- cogames/maps/evals/extractor_hub_80x80.map +7 -3
- cogames/verbose.py +2 -2
- {cogames-0.3.59.post1.dev2.dist-info → cogames-0.3.65.dist-info}/METADATA +19 -3
- {cogames-0.3.59.post1.dev2.dist-info → cogames-0.3.65.dist-info}/RECORD +46 -44
- cogames/cogs_vs_clips/cogsguard_reward_variants.py +0 -138
- cogames/cogs_vs_clips/mission_utils.py +0 -19
- cogames/cogs_vs_clips/tutorial_missions.py +0 -25
- {cogames-0.3.59.post1.dev2.dist-info → cogames-0.3.65.dist-info}/WHEEL +0 -0
- {cogames-0.3.59.post1.dev2.dist-info → cogames-0.3.65.dist-info}/entry_points.txt +0 -0
- {cogames-0.3.59.post1.dev2.dist-info → cogames-0.3.65.dist-info}/licenses/LICENSE +0 -0
- {cogames-0.3.59.post1.dev2.dist-info → cogames-0.3.65.dist-info}/top_level.txt +0 -0
|
@@ -40,10 +40,10 @@ map_data: |-
|
|
|
40
40
|
##########..............#....#....@....@.....@...##.#...#....#....#.......######
|
|
41
41
|
##########..............#.............................##..........#.##.....#####
|
|
42
42
|
#########.############..#............@.&.@...........####.#....#...##.#....#####
|
|
43
|
-
|
|
43
|
+
########...................##..........m.............########....#.##.....######
|
|
44
44
|
#######.............S......###.........@.........#.....######...........+.######
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
######..#...#######...###..###........a=r........#.....#...#.....#...#....######
|
|
46
|
+
#######.##..#.....#.....#..###.........t.........#..#......#.......#.....#######
|
|
47
47
|
#######.##..#.....#.....#....#.....@........@....#....##.#.##...........########
|
|
48
48
|
######..#...#.+...####..#...G#...................##.....##..##.#.....#.#########
|
|
49
49
|
######...............#.......#...................###....######.###...###########
|
|
@@ -91,3 +91,7 @@ char_to_map_name:
|
|
|
91
91
|
"S": silicon_extractor
|
|
92
92
|
"O": oxygen_extractor
|
|
93
93
|
"C": carbon_extractor
|
|
94
|
+
"a": aligner_station
|
|
95
|
+
"r": scrambler_station
|
|
96
|
+
"m": miner_station
|
|
97
|
+
"t": scout_station
|
|
@@ -45,10 +45,10 @@ map_data: |-
|
|
|
45
45
|
#########.#####..........#.......##.........@.........###.#.....#.#.C......##...##########
|
|
46
46
|
#######......##.##....#......#..........................#......#..............#####.######
|
|
47
47
|
#######......#.####.G.##..##.#............@.&.@.........###..#...........##.O.###....#####
|
|
48
|
-
|
|
48
|
+
#######.........###....#.##.................m...........#.###..##.............###....#####
|
|
49
49
|
#######.S...#.....##.....#####.#..#.........@.........#.#.###.#.#...#.C...G.#####...######
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
######....##......#.........####.##........a=r........#.............#...#...####.....#####
|
|
51
|
+
#####...#.#.....#.##.####.###.....#.........t.........##........+..##...#####........#####
|
|
52
52
|
#####..##....######.###...###.....#...................#....#........#..#.##..#.......#####
|
|
53
53
|
#########.C.###...#.###..##.......#...................#....####.+.G............##...######
|
|
54
54
|
#########...###.....###.........#.#...................#.#######..............#.##...######
|
|
@@ -101,3 +101,7 @@ char_to_map_name:
|
|
|
101
101
|
"S": silicon_extractor
|
|
102
102
|
"O": oxygen_extractor
|
|
103
103
|
"C": carbon_extractor
|
|
104
|
+
"a": aligner_station
|
|
105
|
+
"r": scrambler_station
|
|
106
|
+
"m": miner_station
|
|
107
|
+
"t": scout_station
|
cogames/verbose.py
CHANGED
|
@@ -4,14 +4,14 @@ import json
|
|
|
4
4
|
|
|
5
5
|
from rich.console import Console
|
|
6
6
|
|
|
7
|
-
from cogames.cogs_vs_clips.mission import
|
|
7
|
+
from cogames.cogs_vs_clips.mission import CvCMission
|
|
8
8
|
from mettagrid.config.mettagrid_config import MettaGridConfig
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
def print_configs(
|
|
12
12
|
console: Console,
|
|
13
13
|
env_cfg: MettaGridConfig,
|
|
14
|
-
mission_cfg:
|
|
14
|
+
mission_cfg: CvCMission | None = None,
|
|
15
15
|
print_cvc_config: bool = False,
|
|
16
16
|
print_mg_config: bool = False,
|
|
17
17
|
) -> None:
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cogames
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.65
|
|
4
4
|
Summary: Multi-agent cooperative games
|
|
5
5
|
Classifier: Programming Language :: Python :: 3
|
|
6
6
|
Classifier: Programming Language :: Python :: 3.12
|
|
7
7
|
Requires-Python: <3.13,>=3.12
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
9
|
License-File: LICENSE
|
|
10
|
-
Requires-Dist: mettagrid==0.2.0.
|
|
10
|
+
Requires-Dist: mettagrid==0.2.0.75
|
|
11
11
|
Requires-Dist: packaging>=24.0.0
|
|
12
12
|
Requires-Dist: pufferlib-core
|
|
13
13
|
Requires-Dist: pydantic>=2.11.5
|
|
@@ -1306,7 +1306,7 @@ cogames [COMMAND] --help
|
|
|
1306
1306
|
|
|
1307
1307
|
|
|
1308
1308
|
<pre style="white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace"><span style="font-weight: bold"> </span>
|
|
1309
|
-
<span style="font-weight: bold"> </span><span style="color: #808000; text-decoration-color: #808000; font-weight: bold">Usage: </span><span style="font-weight: bold">cogames seasons [OPTIONS]
|
|
1309
|
+
<span style="font-weight: bold"> </span><span style="color: #808000; text-decoration-color: #808000; font-weight: bold">Usage: </span><span style="font-weight: bold">cogames seasons [OPTIONS] [SEASON_NAME] </span>
|
|
1310
1310
|
<span style="font-weight: bold"> </span>
|
|
1311
1311
|
</pre>
|
|
1312
1312
|
|
|
@@ -1320,6 +1320,22 @@ cogames [COMMAND] --help
|
|
|
1320
1320
|
|
|
1321
1321
|
|
|
1322
1322
|
|
|
1323
|
+
<pre style="white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace"><span style="color: #7f7f7f; text-decoration-color: #7f7f7f">╭─ Arguments ─────────────────────────────────────────────────────────────────────────────────────────────────────╮</span>
|
|
1324
|
+
<span style="color: #7f7f7f; text-decoration-color: #7f7f7f">│</span> season_name <span style="color: #bfbf7f; text-decoration-color: #bfbf7f; font-weight: bold">[</span><span style="color: #808000; text-decoration-color: #808000; font-weight: bold">SEASON_NAME</span><span style="color: #bfbf7f; text-decoration-color: #bfbf7f; font-weight: bold">]</span> Show versions of a specific season <span style="color: #7f7f7f; text-decoration-color: #7f7f7f">│</span>
|
|
1325
|
+
<span style="color: #7f7f7f; text-decoration-color: #7f7f7f">╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</span>
|
|
1326
|
+
</pre>
|
|
1327
|
+
|
|
1328
|
+
|
|
1329
|
+
|
|
1330
|
+
|
|
1331
|
+
<pre style="white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace"><span style="color: #7f7f7f; text-decoration-color: #7f7f7f">╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────╮</span>
|
|
1332
|
+
<span style="color: #7f7f7f; text-decoration-color: #7f7f7f">│</span> <span style="color: #008080; text-decoration-color: #008080; font-weight: bold">--versions</span> <span style="color: #008000; text-decoration-color: #008000; font-weight: bold">-v</span> List all versions of the season <span style="color: #7f7f7f; text-decoration-color: #7f7f7f">│</span>
|
|
1333
|
+
<span style="color: #7f7f7f; text-decoration-color: #7f7f7f">╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</span>
|
|
1334
|
+
</pre>
|
|
1335
|
+
|
|
1336
|
+
|
|
1337
|
+
|
|
1338
|
+
|
|
1323
1339
|
<pre style="white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace"><span style="color: #7f7f7f; text-decoration-color: #7f7f7f">╭─ Server ────────────────────────────────────────────────────────────────────────────────────────────────────────╮</span>
|
|
1324
1340
|
<span style="color: #7f7f7f; text-decoration-color: #7f7f7f">│</span> <span style="color: #008080; text-decoration-color: #008080; font-weight: bold">--login-server</span> <span style="color: #808000; text-decoration-color: #808000; font-weight: bold">URL</span> Authentication server URL <span style="color: #7f7f7f; text-decoration-color: #7f7f7f">[default: https://softmax.com/api]</span> <span style="color: #7f7f7f; text-decoration-color: #7f7f7f">│</span>
|
|
1325
1341
|
<span style="color: #7f7f7f; text-decoration-color: #7f7f7f">│</span> <span style="color: #008080; text-decoration-color: #008080; font-weight: bold">--server</span> <span style="color: #008000; text-decoration-color: #008000; font-weight: bold">-s</span> <span style="color: #808000; text-decoration-color: #808000; font-weight: bold">URL</span> Tournament server URL <span style="color: #7f7f7f; text-decoration-color: #7f7f7f">[default: https://api.observatory.softmax-research.net]</span> <span style="color: #7f7f7f; text-decoration-color: #7f7f7f">│</span>
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
cogames/__init__.py,sha256=Loao4kW7AqCRVKcQuA7lKEsyKl9k_Zf1oVlPXvgqjbw,23
|
|
2
2
|
cogames/auth.py,sha256=W7BgRhrCTKob68p6HHTKVFjPayySaBG03eIgcGjw_jI,15852
|
|
3
|
+
cogames/core.py,sha256=ISoWiRQXuqJhMyN-tROvmIU0_c9s5H__pJVE8BLQCyw,2859
|
|
3
4
|
cogames/curricula.py,sha256=a7Nd-av4epAjmoqlefyU4q5eAitpYjCEGDCF_tS_iaY,825
|
|
4
5
|
cogames/device.py,sha256=GVC7g4tNVySn_rSbHJB0jGKvpYBL8-VmeYEQXWXtvy0,1680
|
|
5
6
|
cogames/evaluate.py,sha256=xm4dCLAXZFhfygDeC_617QXRa5DQYB_6EENEeeDAiWQ,9287
|
|
6
7
|
cogames/game.py,sha256=Qpyd4UOv97S-PCcEb422XFVbuXk46qhEx7_FlAr8ayA,3331
|
|
7
|
-
cogames/main.py,sha256=
|
|
8
|
+
cogames/main.py,sha256=zYiY_cB0kiRproN4-Xa6MSwlff3-9hpFZLOZ-YfSwEg,79367
|
|
8
9
|
cogames/pickup.py,sha256=gCm-BLMSKN4iflyn2EdsxE7ywKYzMgjozep5o_306yE,6545
|
|
9
10
|
cogames/play.py,sha256=SV_gKg5kNj68m7bavmEYomLmmWxVGbc50ZhwAEMDy5E,8014
|
|
10
11
|
cogames/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
12
|
cogames/train.py,sha256=C4ZP00fxHspiQK-p00EPXyfcwiFKNIBUF1iBe2EE0GE,17894
|
|
12
|
-
cogames/verbose.py,sha256=
|
|
13
|
+
cogames/verbose.py,sha256=cqdGgSjoTQFektxfDglEZgobm1zfWsxReG2jLborzqI,2916
|
|
13
14
|
cogames/cli/base.py,sha256=UpMqeJ0C8i0pkue1AHnnyyX0bFJ9zZeJ7HBR6yhuA8A,54
|
|
14
|
-
cogames/cli/client.py,sha256=
|
|
15
|
-
cogames/cli/leaderboard.py,sha256=
|
|
15
|
+
cogames/cli/client.py,sha256=UFWn6Kjbp6nCYjeC5wMwIJAM5o_hngNdZ_yv24aeiOI,9025
|
|
16
|
+
cogames/cli/leaderboard.py,sha256=eIbiSBOkvoi5IL2weiKBOJAjWGHquDk1PWoHKA8uu3g,13941
|
|
16
17
|
cogames/cli/login.py,sha256=_i1Hdbp_wAMsX0NLbCTSr7GmOFbzSqwyNP79OqLOg40,1237
|
|
17
|
-
cogames/cli/mission.py,sha256=
|
|
18
|
+
cogames/cli/mission.py,sha256=GyHDSDjLnQ0zRp-zk5kOO90IUZE9_860uAfCb_4L1v0,21354
|
|
18
19
|
cogames/cli/policy.py,sha256=JI_aX0lcY-kaZWl-RhUfFu0vknF2mXHS8y0CQRRhpao,8743
|
|
19
|
-
cogames/cli/submit.py,sha256=
|
|
20
|
+
cogames/cli/submit.py,sha256=jH0ZLdypL43UkrqXmix1-QwwJhv0G_WVVqsiLNaJ1n0,20897
|
|
20
21
|
cogames/cli/utils.py,sha256=K4eb-RL73HtavNGxZjn_SVDLAwfFamLCEQNTCNVdmPU,895
|
|
21
22
|
cogames/cli/docsync/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
23
|
cogames/cli/docsync/_nb_md_directive_processing.py,sha256=A920oS21mw9ZU2vp-cILzq5Sa-AMtmwMSayZKcQwX9M,6365
|
|
@@ -26,23 +27,24 @@ cogames/cli/docsync/_three_way_sync.py,sha256=fug-HXNYqJhJvusWHnGmLQewtiAUKhCBOd
|
|
|
26
27
|
cogames/cli/docsync/_utils.py,sha256=zPfXzVa0XbqZReGvMUvxl4yLWc2oFeJJiefOBjOHaCA,2616
|
|
27
28
|
cogames/cli/docsync/docsync.py,sha256=dtGG91Co89VdiwRwKk57kYd-qnHiFIgIkS1OI12AYyQ,5664
|
|
28
29
|
cogames/cogs_vs_clips/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
|
-
cogames/cogs_vs_clips/
|
|
30
|
-
cogames/cogs_vs_clips/
|
|
31
|
-
cogames/cogs_vs_clips/
|
|
32
|
-
cogames/cogs_vs_clips/
|
|
33
|
-
cogames/cogs_vs_clips/mission.py,sha256=
|
|
34
|
-
cogames/cogs_vs_clips/
|
|
35
|
-
cogames/cogs_vs_clips/
|
|
36
|
-
cogames/cogs_vs_clips/
|
|
37
|
-
cogames/cogs_vs_clips/
|
|
38
|
-
cogames/cogs_vs_clips/
|
|
39
|
-
cogames/cogs_vs_clips/
|
|
40
|
-
cogames/cogs_vs_clips/
|
|
41
|
-
cogames/cogs_vs_clips/evals/README.md,sha256=
|
|
42
|
-
cogames/cogs_vs_clips/evals/
|
|
43
|
-
cogames/cogs_vs_clips/evals/
|
|
44
|
-
cogames/cogs_vs_clips/evals/
|
|
45
|
-
cogames/cogs_vs_clips/evals/
|
|
30
|
+
cogames/cogs_vs_clips/clips.py,sha256=FlaG2GNx605eSgf3dU2G5GbgtgnG0rAIrhsdjuvKkKs,3611
|
|
31
|
+
cogames/cogs_vs_clips/cog.py,sha256=rcFwpG24MHjHx6Erk9sj-bHTvAKgSfExB0YZbFnRwvk,3596
|
|
32
|
+
cogames/cogs_vs_clips/cogsguard_tutorial.py,sha256=FjVep1F2q2W9pieCbbJZIR21ImT4ylMiR87P9r98zFI,1577
|
|
33
|
+
cogames/cogs_vs_clips/config.py,sha256=TbDGpU_tS0ClG92uvBNzWh-VzFPMko2tt8r_QYj5R7U,1178
|
|
34
|
+
cogames/cogs_vs_clips/mission.py,sha256=NRidQF81g0pVcZzGnlTpjXZRcMuojP0-tNMwdJdSzR0,4413
|
|
35
|
+
cogames/cogs_vs_clips/missions.py,sha256=feOLCwkpEIcBP6-HeKlo_AyP0-eZmdV58LdG-4gkTLw,2116
|
|
36
|
+
cogames/cogs_vs_clips/sites.py,sha256=2GTKwJweipbKVKIameMZYEO2hTixBoEtrVpyjSGHGX8,5446
|
|
37
|
+
cogames/cogs_vs_clips/stations.py,sha256=pZCA2_AAcAhV0QjLpFg1rqgLS9LEsID60lTGcMNARw8,7800
|
|
38
|
+
cogames/cogs_vs_clips/team.py,sha256=o3FceRfRqiOdwKkO8SGAMw4kCnEOPE9OGrjm_ucZYN8,1480
|
|
39
|
+
cogames/cogs_vs_clips/terrain.py,sha256=TeKIydkdZ4prrPfRPy8pE-_5OiNSzh2g5Pjt31gZA40,26105
|
|
40
|
+
cogames/cogs_vs_clips/variants.py,sha256=0AuwIx9IQjxMSRtp5OUeQw9qDqCtdAjRpmAQGkzBnoE,7899
|
|
41
|
+
cogames/cogs_vs_clips/docs/cogs_vs_clips_mapgen.md,sha256=5vgdYPKWryeh6qEV8nY1bKyDdqriQXGwh8JuGnSoQqE,13198
|
|
42
|
+
cogames/cogs_vs_clips/evals/README.md,sha256=sHlK2XDOPK0L3kphSvYWeKqVUjEg9p6TjAa8yhMtKlw,7053
|
|
43
|
+
cogames/cogs_vs_clips/evals/cogsguard_evals.py,sha256=LiV6J8WIoUf6pWoWN1DcP9UdyNo7XHGzhhuraw4ZNQ8,2952
|
|
44
|
+
cogames/cogs_vs_clips/evals/diagnostic_evals.py,sha256=29sIV_sOC3XWA7s77_dPE0MEbFhqFYQ71rmckx5e9iU,10123
|
|
45
|
+
cogames/cogs_vs_clips/evals/difficulty_variants.py,sha256=tm5cFdOzE_HoaOKZ_Mqb0I1vnmNOEpWfjZoYTRGz-14,3803
|
|
46
|
+
cogames/cogs_vs_clips/evals/integrated_evals.py,sha256=SfR-VTzEjLIViqpbeCnVHDqQMocK6cBstXD7CshdI6g,1433
|
|
47
|
+
cogames/cogs_vs_clips/evals/spanning_evals.py,sha256=PtHABzA_rlM_uyqo-RTLl3lCC84GZZdjrnPevRfT1Ts,7340
|
|
46
48
|
cogames/docs/SCRIPTED_AGENT.md,sha256=MDvYQ1Xccexnr_HjCnF5hNsZtqGAy2s0VA3tdgZHego,10918
|
|
47
49
|
cogames/maps/canidate1_1000.map,sha256=DjLOgWDX9e9bmnA7oXcyIR-yilpoWufW0tsU12wSMmI,1023273
|
|
48
50
|
cogames/maps/canidate1_1000_stations.map,sha256=RXqSceZiEf6TmEfeFO8vsNiAnyhox4zCLp77xPwSO7g,1023402
|
|
@@ -98,21 +100,21 @@ cogames/maps/diagnostic_evals/diagnostic_radial.map,sha256=RxVoYmm6U_qUwmmgXZqB2
|
|
|
98
100
|
cogames/maps/diagnostic_evals/diagnostic_radial_hard.map,sha256=PPAxa97Eb5LQaDlKaPhJoWxnw31ADLh_soXhOTJ-zlA,24525
|
|
99
101
|
cogames/maps/diagnostic_evals/diagnostic_resource_lab.map,sha256=CEZlD1OGnOP9VEksGbxnfSWAZ-JV1hrGF16FtDJTRY0,1798
|
|
100
102
|
cogames/maps/diagnostic_evals/diagnostic_unclip.map,sha256=Qj3Slpl7hCP5Xa84A1Ek6wWl0dI_8U7Etm1DMitDyxs,1798
|
|
101
|
-
cogames/maps/evals/eval_balanced_spread.map,sha256=
|
|
102
|
-
cogames/maps/evals/eval_clip_oxygen.map,sha256=
|
|
103
|
-
cogames/maps/evals/eval_collect_resources.map,sha256=
|
|
104
|
-
cogames/maps/evals/eval_collect_resources_hard.map,sha256=
|
|
105
|
-
cogames/maps/evals/eval_collect_resources_medium.map,sha256=
|
|
106
|
-
cogames/maps/evals/eval_divide_and_conquer.map,sha256=
|
|
107
|
-
cogames/maps/evals/eval_energy_starved.map,sha256=
|
|
108
|
-
cogames/maps/evals/eval_multi_coordinated_collect_hard.map,sha256=
|
|
109
|
-
cogames/maps/evals/eval_oxygen_bottleneck.map,sha256=
|
|
110
|
-
cogames/maps/evals/eval_single_use_world.map,sha256
|
|
111
|
-
cogames/maps/evals/extractor_hub_100x100.map,sha256=
|
|
112
|
-
cogames/maps/evals/extractor_hub_30x30.map,sha256=
|
|
113
|
-
cogames/maps/evals/extractor_hub_50x50.map,sha256=
|
|
114
|
-
cogames/maps/evals/extractor_hub_70x70.map,sha256=
|
|
115
|
-
cogames/maps/evals/extractor_hub_80x80.map,sha256=
|
|
103
|
+
cogames/maps/evals/eval_balanced_spread.map,sha256=Ix-NFCndwvJds3JTSam7HtYJjiuXJRoR8c33SDwUdZc,2162
|
|
104
|
+
cogames/maps/evals/eval_clip_oxygen.map,sha256=a3RqOglzbNScOhsN-WDBuZY0CgmgFwKgSwTginmpbT4,2164
|
|
105
|
+
cogames/maps/evals/eval_collect_resources.map,sha256=6rQpYwqDHR-bmA3sW-XHBDP9n09uorv8yQLTaBUWmfA,2164
|
|
106
|
+
cogames/maps/evals/eval_collect_resources_hard.map,sha256=6LLWYSvdByGqqi-x9-w-akbpz_I--upLTTfmy7uXRvU,2164
|
|
107
|
+
cogames/maps/evals/eval_collect_resources_medium.map,sha256=avNWaX3TfSxyKveRb6dfymUKq390PXzGvP1D0c4GlN8,2164
|
|
108
|
+
cogames/maps/evals/eval_divide_and_conquer.map,sha256=p_Aw_g2GoAD1zlf45FR4fNjvBAdngpaqV6KZmEiFxxk,2162
|
|
109
|
+
cogames/maps/evals/eval_energy_starved.map,sha256=1R5K0XHFHG_sJF3jgDQt5vkEd2S0Xoqc5H3iSq_4QVQ,2162
|
|
110
|
+
cogames/maps/evals/eval_multi_coordinated_collect_hard.map,sha256=2ED8sqV9RHPdFEo5F3DBUwC9T0DqcGNTmJbF9iprMLY,2165
|
|
111
|
+
cogames/maps/evals/eval_oxygen_bottleneck.map,sha256=XlUTquPT4V3YpbVc5sLpQBm8HVTeeq0W6pRX-dTpXEU,2164
|
|
112
|
+
cogames/maps/evals/eval_single_use_world.map,sha256=Hj1KX5Fa4FAmhI8wIR2opRXqn5uUFbDLRthkiZA0ie4,2164
|
|
113
|
+
cogames/maps/evals/extractor_hub_100x100.map,sha256=knCtQaQjHV5hwOn95JEfXbusB9NvODGG2u6lIHKZmSY,12792
|
|
114
|
+
cogames/maps/evals/extractor_hub_30x30.map,sha256=RM4ZDkThW1emXOPwyKBr_3TB1JsQ0_NVSr7Ma8AHLdQ,2082
|
|
115
|
+
cogames/maps/evals/extractor_hub_50x50.map,sha256=Y3BhaSqUNXmas-5ESWVmceeKIX4tbHdbCHG5UkWLvy0,4142
|
|
116
|
+
cogames/maps/evals/extractor_hub_70x70.map,sha256=nB-GV-DDDZcUZLciCga5WJJYh932M8xgL7aZiU1OwmI,7002
|
|
117
|
+
cogames/maps/evals/extractor_hub_80x80.map,sha256=hPL2bjISsayK7slBPQkGyQBvkDkWFrxd7jbNSNupXE8,8732
|
|
116
118
|
cogames/maps/planky_evals/aligner_avoid_aoe.map,sha256=9C2pJsASv7rVUfqpLdoMTA1K01wGRJrBXBvbRRXaGqE,648
|
|
117
119
|
cogames/maps/planky_evals/aligner_full_cycle.map,sha256=0ONRKlUI7XSI3L6PhglzNHup_SuNHzsHxl9bNYdmxUw,604
|
|
118
120
|
cogames/maps/planky_evals/aligner_gear.map,sha256=5bK9MwJ3HGzB1sWmRol5AdxZ9rwjPp6-OsfFPPQSdDw,460
|
|
@@ -143,7 +145,7 @@ cogames/policy/trainable_policy_template.py,sha256=GbB4vi0wsIiuh_APtfjnavvh9ZVUx
|
|
|
143
145
|
cogames/policy/nim_agents/__init__.py,sha256=q22rmDMKHMO2A4Cqt0P-kuH3f6yaldlaBaRuGydeEKM,1247
|
|
144
146
|
cogames/policy/nim_agents/agents.py,sha256=2uxzs8yxcz3obdA_gaWf0qgojFbXSIU0W3cS-9XD0AI,5038
|
|
145
147
|
cogames/policy/nim_agents/thinky_eval.py,sha256=NqIZng30MpyZD5hF03uoje4potd873hWyHOb3AZdeZk,1154
|
|
146
|
-
cogames-0.3.
|
|
148
|
+
cogames-0.3.65.dist-info/licenses/LICENSE,sha256=NG4hf0NHdGZhkabVCK1MKX8RAJmWaEm4eaGcUsONZ_E,1065
|
|
147
149
|
metta_alo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
148
150
|
metta_alo/job_specs.py,sha256=_QT23tGb7V8W1jqiUijeQUQh6ZvKfW5-KYiYSuNTdVI,450
|
|
149
151
|
metta_alo/policy.py,sha256=RnBwDzQ7abFiQSJe6MYr_JtsyHlKBES1CkDN6mZuvQI,613
|
|
@@ -151,8 +153,8 @@ metta_alo/pure_single_episode_runner.py,sha256=VsSBEn2BVWWHtiZ0SdL9_QMTom_vbbIyP
|
|
|
151
153
|
metta_alo/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
152
154
|
metta_alo/rollout.py,sha256=hc7JRQD4ilfqTO57BvKav2v_JW1Vbcc-oYcEmoWVlB4,10192
|
|
153
155
|
metta_alo/scoring.py,sha256=7ikuP6Vnvv57bAc_ARbTadDSf6wm5dCY49xX9QjD_fs,5809
|
|
154
|
-
cogames-0.3.
|
|
155
|
-
cogames-0.3.
|
|
156
|
-
cogames-0.3.
|
|
157
|
-
cogames-0.3.
|
|
158
|
-
cogames-0.3.
|
|
156
|
+
cogames-0.3.65.dist-info/METADATA,sha256=MmW7r978aI0QKGZoD7J47oVHGGz9mmIu8P26htS2ZCY,234991
|
|
157
|
+
cogames-0.3.65.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
158
|
+
cogames-0.3.65.dist-info/entry_points.txt,sha256=GTHdgj-RC2hQYmjUMSp9RHX8kbru19k0LS2lAj8DnLE,45
|
|
159
|
+
cogames-0.3.65.dist-info/top_level.txt,sha256=YErBkYWJd3-eksLpbgbMrETni1MPBNL4mqEyhZUa0UE,18
|
|
160
|
+
cogames-0.3.65.dist-info/RECORD,,
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
"""Reward preset wiring for the CogsGuard (Cogs vs Clips) mission.
|
|
2
|
-
|
|
3
|
-
The mission has a single "true" objective signal, plus optional shaping variants.
|
|
4
|
-
Reward variants are stackable; each one adds additional shaping signals on top of the
|
|
5
|
-
mission's default objective rewards.
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
from __future__ import annotations
|
|
9
|
-
|
|
10
|
-
from typing import Literal, Sequence, cast
|
|
11
|
-
|
|
12
|
-
from mettagrid.config.game_value import stat
|
|
13
|
-
from mettagrid.config.mettagrid_config import MettaGridConfig
|
|
14
|
-
from mettagrid.config.reward_config import AgentReward, reward
|
|
15
|
-
|
|
16
|
-
CogsGuardRewardVariant = Literal["credit", "milestones", "no_objective", "objective"]
|
|
17
|
-
|
|
18
|
-
AVAILABLE_REWARD_VARIANTS: tuple[CogsGuardRewardVariant, ...] = ("objective", "no_objective", "milestones", "credit")
|
|
19
|
-
|
|
20
|
-
_OBJECTIVE_STAT_KEY = "aligned_junction_held"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
def _apply_milestones(rewards: dict[str, AgentReward], *, max_junctions: int = 100) -> None:
|
|
24
|
-
"""Add milestone shaping rewards onto an existing baseline.
|
|
25
|
-
|
|
26
|
-
Args:
|
|
27
|
-
rewards: Rewards dict to modify in-place.
|
|
28
|
-
max_junctions: Maximum expected number of junctions for capping rewards.
|
|
29
|
-
Defaults to 100 as a reasonable upper bound for most maps.
|
|
30
|
-
"""
|
|
31
|
-
w_junction_aligned = 1.0
|
|
32
|
-
w_scramble_act = 0.5
|
|
33
|
-
w_align_act = 1.0
|
|
34
|
-
|
|
35
|
-
# Max caps based on expected junction counts
|
|
36
|
-
max_junction_aligned = w_junction_aligned * max_junctions
|
|
37
|
-
max_scramble = w_scramble_act * max_junctions
|
|
38
|
-
max_align = w_align_act * max_junctions
|
|
39
|
-
|
|
40
|
-
rewards["aligned_junctions"] = reward(
|
|
41
|
-
stat("collective.junction"),
|
|
42
|
-
weight=w_junction_aligned,
|
|
43
|
-
max=max_junction_aligned,
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
rewards["junction_scrambled_by_agent"] = reward(
|
|
47
|
-
stat("junction.scrambled_by_agent"),
|
|
48
|
-
weight=w_scramble_act,
|
|
49
|
-
max=max_scramble,
|
|
50
|
-
)
|
|
51
|
-
rewards["junction_aligned_by_agent"] = reward(
|
|
52
|
-
stat("junction.aligned_by_agent"),
|
|
53
|
-
weight=w_align_act,
|
|
54
|
-
max=max_align,
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
def _apply_credit(rewards: dict[str, AgentReward]) -> None:
|
|
59
|
-
"""Add dense precursor shaping rewards onto an existing baseline."""
|
|
60
|
-
w_heart = 0.05
|
|
61
|
-
cap_heart = 0.5
|
|
62
|
-
w_align_gear = 0.2
|
|
63
|
-
cap_align_gear = 0.4
|
|
64
|
-
w_scramble_gear = 0.2
|
|
65
|
-
cap_scramble_gear = 0.4
|
|
66
|
-
w_element_gain = 0.001
|
|
67
|
-
cap_element_gain = 0.1
|
|
68
|
-
|
|
69
|
-
# Stats rewards for gains as a single map
|
|
70
|
-
gain_rewards: dict[str, AgentReward] = {
|
|
71
|
-
"heart_gained": reward(stat("heart.gained"), weight=w_heart, max=cap_heart),
|
|
72
|
-
"aligner_gained": reward(stat("aligner.gained"), weight=w_align_gear, max=cap_align_gear),
|
|
73
|
-
"scrambler_gained": reward(stat("scrambler.gained"), weight=w_scramble_gear, max=cap_scramble_gear),
|
|
74
|
-
"carbon_gained": reward(stat("carbon.gained"), weight=w_element_gain, max=cap_element_gain),
|
|
75
|
-
"oxygen_gained": reward(stat("oxygen.gained"), weight=w_element_gain, max=cap_element_gain),
|
|
76
|
-
"germanium_gained": reward(stat("germanium.gained"), weight=w_element_gain, max=cap_element_gain),
|
|
77
|
-
"silicon_gained": reward(stat("silicon.gained"), weight=w_element_gain, max=cap_element_gain),
|
|
78
|
-
}
|
|
79
|
-
rewards.update(gain_rewards)
|
|
80
|
-
|
|
81
|
-
# Collective deposit rewards
|
|
82
|
-
w_deposit = 0.002
|
|
83
|
-
cap_deposit = 0.2
|
|
84
|
-
deposit_rewards: dict[str, AgentReward] = {
|
|
85
|
-
f"collective_{element}_deposited": reward(
|
|
86
|
-
stat(f"collective.{element}.deposited"), weight=w_deposit, max=cap_deposit
|
|
87
|
-
)
|
|
88
|
-
for element in ["carbon", "oxygen", "germanium", "silicon"]
|
|
89
|
-
}
|
|
90
|
-
rewards.update(deposit_rewards)
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
def apply_reward_variants(env: MettaGridConfig, *, variants: str | Sequence[str] | None = None) -> None:
|
|
94
|
-
"""Apply CogsGuard reward variants to `env`.
|
|
95
|
-
|
|
96
|
-
Variants are stackable:
|
|
97
|
-
- `objective`: no-op marker; keeps the mission's default objective reward wiring.
|
|
98
|
-
- `no_objective`: disables the objective stat reward (`junction.held`).
|
|
99
|
-
- `milestones`: adds shaped rewards for aligning/scrambling junctions and holding more junctions.
|
|
100
|
-
- `credit`: adds additional dense shaping for precursor behaviors (resources/gear/deposits).
|
|
101
|
-
"""
|
|
102
|
-
if not variants:
|
|
103
|
-
return
|
|
104
|
-
|
|
105
|
-
variant_names = [variants] if isinstance(variants, str) else list(variants)
|
|
106
|
-
|
|
107
|
-
reward_variants: list[CogsGuardRewardVariant] = []
|
|
108
|
-
for variant_name in variant_names:
|
|
109
|
-
if variant_name not in AVAILABLE_REWARD_VARIANTS:
|
|
110
|
-
available = ", ".join(AVAILABLE_REWARD_VARIANTS)
|
|
111
|
-
raise ValueError(f"Unknown Cogsguard reward variant '{variant_name}'. Available: {available}")
|
|
112
|
-
variant = cast(CogsGuardRewardVariant, variant_name)
|
|
113
|
-
if variant in reward_variants:
|
|
114
|
-
continue
|
|
115
|
-
reward_variants.append(variant)
|
|
116
|
-
|
|
117
|
-
enabled = set(reward_variants)
|
|
118
|
-
if enabled <= {"objective"}:
|
|
119
|
-
return
|
|
120
|
-
|
|
121
|
-
# Start from the mission's existing objective baseline to preserve its scaling.
|
|
122
|
-
rewards = dict(env.game.agent.rewards)
|
|
123
|
-
|
|
124
|
-
if "no_objective" in enabled:
|
|
125
|
-
rewards.pop(_OBJECTIVE_STAT_KEY, None)
|
|
126
|
-
if "milestones" in enabled:
|
|
127
|
-
_apply_milestones(rewards)
|
|
128
|
-
if "credit" in enabled:
|
|
129
|
-
_apply_credit(rewards)
|
|
130
|
-
|
|
131
|
-
env.game.agent.rewards = rewards
|
|
132
|
-
|
|
133
|
-
# Deterministic label suffix order (exclude "objective").
|
|
134
|
-
for variant in AVAILABLE_REWARD_VARIANTS:
|
|
135
|
-
if variant == "objective":
|
|
136
|
-
continue
|
|
137
|
-
if variant in enabled:
|
|
138
|
-
env.label += f".{variant}"
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"""Utility functions for mission configuration."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from pathlib import Path
|
|
6
|
-
|
|
7
|
-
from mettagrid.map_builder.map_builder import MapBuilderConfig
|
|
8
|
-
from mettagrid.mapgen.mapgen import MapGen
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
def get_map(map_name: str, fixed_spawn_order: bool = False) -> MapBuilderConfig:
|
|
12
|
-
"""Load a map by name from the maps directory."""
|
|
13
|
-
maps_dir = Path(__file__).parent.parent / "maps"
|
|
14
|
-
map_path = maps_dir / map_name
|
|
15
|
-
return MapGen.Config(
|
|
16
|
-
instance=MapBuilderConfig.from_uri(str(map_path)),
|
|
17
|
-
fixed_spawn_order=fixed_spawn_order,
|
|
18
|
-
instance_border_width=0, # Don't add border - maps already have borders built in
|
|
19
|
-
)
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
from typing import override
|
|
2
|
-
|
|
3
|
-
from cogames.cogs_vs_clips.mission import Mission, MissionVariant
|
|
4
|
-
from cogames.cogs_vs_clips.sites import TRAINING_FACILITY
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class TutorialVariant(MissionVariant):
|
|
8
|
-
name: str = "tutorial_mode"
|
|
9
|
-
description: str = "High energy regen for learning."
|
|
10
|
-
|
|
11
|
-
@override
|
|
12
|
-
def modify_mission(self, mission: Mission) -> None:
|
|
13
|
-
mission.cog.energy_regen = 1
|
|
14
|
-
|
|
15
|
-
@override
|
|
16
|
-
def modify_env(self, mission: Mission, env) -> None:
|
|
17
|
-
env.game.max_steps = max(env.game.max_steps, 1000)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
TutorialMission = Mission(
|
|
21
|
-
name="tutorial",
|
|
22
|
-
description="Learn the basics of CoGames: Gather, Craft, and Deposit.",
|
|
23
|
-
site=TRAINING_FACILITY,
|
|
24
|
-
variants=[TutorialVariant()],
|
|
25
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|