cogames 0.3.59.post1.dev2__tar.gz → 0.3.65__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.
- {cogames-0.3.59.post1.dev2/src/cogames.egg-info → cogames-0.3.65}/PKG-INFO +19 -3
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/README.ipynb +36 -2
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/README.md +17 -1
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/TECHNICAL_MANUAL.md +13 -2
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/pyproject.toml +1 -1
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/scripts/run_evaluation.py +5 -9
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cli/client.py +12 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cli/leaderboard.py +40 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cli/mission.py +31 -34
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cli/submit.py +1 -1
- cogames-0.3.65/src/cogames/cogs_vs_clips/clips.py +86 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cogs_vs_clips/cog.py +14 -7
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cogs_vs_clips/cogsguard_tutorial.py +10 -11
- cogames-0.3.65/src/cogames/cogs_vs_clips/config.py +38 -0
- {cogames-0.3.59.post1.dev2/src/cogames/cogs_vs_clips → cogames-0.3.65/src/cogames/cogs_vs_clips/docs}/cogs_vs_clips_mapgen.md +6 -7
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cogs_vs_clips/evals/README.md +4 -4
- cogames-0.3.65/src/cogames/cogs_vs_clips/evals/cogsguard_evals.py +96 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cogs_vs_clips/evals/diagnostic_evals.py +13 -100
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cogs_vs_clips/evals/difficulty_variants.py +9 -18
- cogames-0.3.65/src/cogames/cogs_vs_clips/evals/integrated_evals.py +53 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cogs_vs_clips/evals/spanning_evals.py +48 -54
- cogames-0.3.65/src/cogames/cogs_vs_clips/mission.py +124 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cogs_vs_clips/missions.py +16 -24
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cogs_vs_clips/sites.py +35 -25
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cogs_vs_clips/stations.py +33 -82
- cogames-0.3.65/src/cogames/cogs_vs_clips/team.py +44 -0
- cogames-0.3.59.post1.dev2/src/cogames/cogs_vs_clips/procedural.py → cogames-0.3.65/src/cogames/cogs_vs_clips/terrain.py +12 -6
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cogs_vs_clips/variants.py +41 -118
- cogames-0.3.65/src/cogames/core.py +87 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/main.py +5 -1
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/evals/eval_balanced_spread.map +7 -3
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/evals/eval_clip_oxygen.map +7 -3
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/evals/eval_collect_resources.map +7 -3
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/evals/eval_collect_resources_hard.map +7 -3
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/evals/eval_collect_resources_medium.map +7 -3
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/evals/eval_divide_and_conquer.map +7 -3
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/evals/eval_energy_starved.map +7 -3
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/evals/eval_multi_coordinated_collect_hard.map +7 -3
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/evals/eval_oxygen_bottleneck.map +7 -3
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/evals/eval_single_use_world.map +7 -3
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/evals/extractor_hub_100x100.map +7 -3
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/evals/extractor_hub_30x30.map +7 -3
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/evals/extractor_hub_50x50.map +7 -3
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/evals/extractor_hub_70x70.map +7 -3
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/evals/extractor_hub_80x80.map +7 -3
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/verbose.py +2 -2
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65/src/cogames.egg-info}/PKG-INFO +19 -3
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames.egg-info/SOURCES.txt +8 -5
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames.egg-info/requires.txt +1 -1
- cogames-0.3.65/tests/test_cogs_vs_clips.py +29 -0
- cogames-0.3.65/tests/test_cogsguard_eval_missions.py +51 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tests/test_procedural_maps.py +1 -1
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tests/test_upload_cli.py +10 -0
- cogames-0.3.59.post1.dev2/src/cogames/cogs_vs_clips/cogsguard_reward_variants.py +0 -138
- cogames-0.3.59.post1.dev2/src/cogames/cogs_vs_clips/evals/integrated_evals.py +0 -105
- cogames-0.3.59.post1.dev2/src/cogames/cogs_vs_clips/mission.py +0 -336
- cogames-0.3.59.post1.dev2/src/cogames/cogs_vs_clips/mission_utils.py +0 -19
- cogames-0.3.59.post1.dev2/src/cogames/cogs_vs_clips/tutorial_missions.py +0 -25
- cogames-0.3.59.post1.dev2/tests/test_cogs_vs_clips.py +0 -13
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/CHANGELOG.md +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/LICENSE +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/MISSION.md +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/README.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/assets/charger.png +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/assets/cvc-reel.gif +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/assets/cvc-snap.png +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/assets/extractor.png +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/assets/hub.png +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/assets/showoff.gif +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/setup.cfg +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/__init__.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/auth.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cli/base.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cli/docsync/__init__.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cli/docsync/_nb_md_directive_processing.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cli/docsync/_nb_md_sync.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cli/docsync/_nb_py_sync.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cli/docsync/_three_way_sync.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cli/docsync/_utils.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cli/docsync/docsync.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cli/login.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cli/policy.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cli/utils.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/cogs_vs_clips/__init__.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/curricula.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/device.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/docs/SCRIPTED_AGENT.md +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/evaluate.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/game.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/canidate1_1000.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/canidate1_1000_stations.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/canidate1_500.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/canidate1_500_stations.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/canidate2_1000.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/canidate2_1000_stations.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/canidate2_500.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/canidate2_500_stations.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/canidate3_1000.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/canidate3_1000_stations.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/canidate3_500.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/canidate3_500_stations.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/canidate4_500.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/canidate4_500_stations.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/cave_base_50.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/diagnostic_evals/diagnostic_agile.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/diagnostic_evals/diagnostic_agile_hard.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/diagnostic_evals/diagnostic_charge_up.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/diagnostic_evals/diagnostic_charge_up_hard.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/diagnostic_evals/diagnostic_chest_navigation1.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/diagnostic_evals/diagnostic_chest_navigation1_hard.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/diagnostic_evals/diagnostic_chest_navigation2.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/diagnostic_evals/diagnostic_chest_navigation2_hard.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/diagnostic_evals/diagnostic_chest_navigation3.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/diagnostic_evals/diagnostic_chest_navigation3_hard.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/diagnostic_evals/diagnostic_chest_near.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/diagnostic_evals/diagnostic_chest_search.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/diagnostic_evals/diagnostic_chest_search_hard.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/diagnostic_evals/diagnostic_extract_lab.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/diagnostic_evals/diagnostic_extract_lab_hard.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/diagnostic_evals/diagnostic_memory.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/diagnostic_evals/diagnostic_memory_hard.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/diagnostic_evals/diagnostic_radial.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/diagnostic_evals/diagnostic_radial_hard.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/diagnostic_evals/diagnostic_resource_lab.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/diagnostic_evals/diagnostic_unclip.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/machina_100_stations.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/machina_200_stations.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/machina_200_stations_small.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/machina_eval_exp01.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/machina_eval_template_large.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/machinatrainer4agents.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/machinatrainer4agentsbase.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/machinatrainerbig.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/machinatrainersmall.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/planky_evals/aligner_avoid_aoe.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/planky_evals/aligner_full_cycle.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/planky_evals/aligner_gear.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/planky_evals/aligner_hearts.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/planky_evals/aligner_junction.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/planky_evals/exploration_distant.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/planky_evals/maze.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/planky_evals/miner_best_resource.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/planky_evals/miner_deposit.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/planky_evals/miner_extract.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/planky_evals/miner_full_cycle.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/planky_evals/miner_gear.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/planky_evals/multi_role.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/planky_evals/resource_chain.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/planky_evals/scout_explore.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/planky_evals/scout_gear.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/planky_evals/scrambler_full_cycle.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/planky_evals/scrambler_gear.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/planky_evals/scrambler_target.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/planky_evals/stuck_corridor.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/planky_evals/survive_retreat.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/training_facility_clipped.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/training_facility_open_1.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/training_facility_open_2.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/training_facility_open_3.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/training_facility_tight_4.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/training_facility_tight_5.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/vanilla_large.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/vanilla_small.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/maps/zelda.map +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/pickup.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/play.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/policy/__init__.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/policy/chaos_monkey.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/policy/nim_agents/__init__.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/policy/nim_agents/agents.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/policy/nim_agents/thinky_eval.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/policy/pufferlib_policy.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/policy/signal_handler.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/policy/starter_agent.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/policy/trainable_policy_template.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/py.typed +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames/train.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames.egg-info/dependency_links.txt +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames.egg-info/entry_points.txt +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/cogames.egg-info/top_level.txt +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/metta_alo/__init__.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/metta_alo/job_specs.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/metta_alo/policy.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/metta_alo/pure_single_episode_runner.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/metta_alo/py.typed +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/metta_alo/rollout.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/src/metta_alo/scoring.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tests/docsync/conftest.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tests/docsync/helpers.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tests/docsync/test_docsync_all.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tests/docsync/test_docsync_check.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tests/docsync/test_docsync_nb_to_md.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tests/docsync/test_docsync_nb_to_py.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tests/docsync/test_docsync_py_to_nb.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tests/metta_alo/test_scoring.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tests/test_all_games_describe.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tests/test_all_games_eval.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tests/test_all_games_play.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tests/test_chaos_monkey.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tests/test_cli.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tests/test_policy_cli_parsing.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tests/test_train_integration.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tests/test_train_vector_alignment.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tests/test_upload_policy_bundles.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tutorials/01_MAKE_POLICY.ipynb +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tutorials/01_MAKE_POLICY.md +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tutorials/01_MAKE_POLICY.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tutorials/02_TRAIN.ipynb +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tutorials/02_TRAIN.md +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tutorials/02_TRAIN.py +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tutorials/03_SUBMIT.ipynb +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tutorials/03_SUBMIT.md +0 -0
- {cogames-0.3.59.post1.dev2 → cogames-0.3.65}/tutorials/03_SUBMIT.py +0 -0
|
@@ -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>
|
|
@@ -2609,13 +2609,13 @@
|
|
|
2609
2609
|
"data": {
|
|
2610
2610
|
"text/html": [
|
|
2611
2611
|
"<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>\n",
|
|
2612
|
-
"<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]
|
|
2612
|
+
"<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>\n",
|
|
2613
2613
|
"<span style=\"font-weight: bold\"> </span>\n",
|
|
2614
2614
|
"</pre>\n"
|
|
2615
2615
|
],
|
|
2616
2616
|
"text/plain": [
|
|
2617
2617
|
"\u001b[1m \u001b[0m\n",
|
|
2618
|
-
"\u001b[1m \u001b[0m\u001b[1;33mUsage: \u001b[0m\u001b[1mcogames seasons [OPTIONS]\u001b[0m\u001b[1m
|
|
2618
|
+
"\u001b[1m \u001b[0m\u001b[1;33mUsage: \u001b[0m\u001b[1mcogames seasons [OPTIONS] [SEASON_NAME]\u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0m\n",
|
|
2619
2619
|
"\u001b[1m \u001b[0m\n"
|
|
2620
2620
|
]
|
|
2621
2621
|
},
|
|
@@ -2637,6 +2637,40 @@
|
|
|
2637
2637
|
"metadata": {},
|
|
2638
2638
|
"output_type": "display_data"
|
|
2639
2639
|
},
|
|
2640
|
+
{
|
|
2641
|
+
"data": {
|
|
2642
|
+
"text/html": [
|
|
2643
|
+
"<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>\n",
|
|
2644
|
+
"<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>\n",
|
|
2645
|
+
"<span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</span>\n",
|
|
2646
|
+
"</pre>\n"
|
|
2647
|
+
],
|
|
2648
|
+
"text/plain": [
|
|
2649
|
+
"\u001b[2m╭─\u001b[0m\u001b[2m Arguments \u001b[0m\u001b[2m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[2m─╮\u001b[0m\n",
|
|
2650
|
+
"\u001b[2m│\u001b[0m season_name \u001b[1;2;33m[\u001b[0m\u001b[1;33mSEASON_NAME\u001b[0m\u001b[1;2;33m]\u001b[0m Show versions of a specific season \u001b[2m│\u001b[0m\n",
|
|
2651
|
+
"\u001b[2m╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\u001b[0m\n"
|
|
2652
|
+
]
|
|
2653
|
+
},
|
|
2654
|
+
"metadata": {},
|
|
2655
|
+
"output_type": "display_data"
|
|
2656
|
+
},
|
|
2657
|
+
{
|
|
2658
|
+
"data": {
|
|
2659
|
+
"text/html": [
|
|
2660
|
+
"<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>\n",
|
|
2661
|
+
"<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>\n",
|
|
2662
|
+
"<span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</span>\n",
|
|
2663
|
+
"</pre>\n"
|
|
2664
|
+
],
|
|
2665
|
+
"text/plain": [
|
|
2666
|
+
"\u001b[2m╭─\u001b[0m\u001b[2m Options \u001b[0m\u001b[2m──────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[2m─╮\u001b[0m\n",
|
|
2667
|
+
"\u001b[2m│\u001b[0m \u001b[1;36m-\u001b[0m\u001b[1;36m-versions\u001b[0m \u001b[1;32m-v\u001b[0m List all versions of the season \u001b[2m│\u001b[0m\n",
|
|
2668
|
+
"\u001b[2m╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\u001b[0m\n"
|
|
2669
|
+
]
|
|
2670
|
+
},
|
|
2671
|
+
"metadata": {},
|
|
2672
|
+
"output_type": "display_data"
|
|
2673
|
+
},
|
|
2640
2674
|
{
|
|
2641
2675
|
"data": {
|
|
2642
2676
|
"text/html": [
|
|
@@ -1270,7 +1270,7 @@ cogames [COMMAND] --help
|
|
|
1270
1270
|
|
|
1271
1271
|
|
|
1272
1272
|
<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>
|
|
1273
|
-
<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]
|
|
1273
|
+
<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>
|
|
1274
1274
|
<span style="font-weight: bold"> </span>
|
|
1275
1275
|
</pre>
|
|
1276
1276
|
|
|
@@ -1284,6 +1284,22 @@ cogames [COMMAND] --help
|
|
|
1284
1284
|
|
|
1285
1285
|
|
|
1286
1286
|
|
|
1287
|
+
<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>
|
|
1288
|
+
<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>
|
|
1289
|
+
<span style="color: #7f7f7f; text-decoration-color: #7f7f7f">╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</span>
|
|
1290
|
+
</pre>
|
|
1291
|
+
|
|
1292
|
+
|
|
1293
|
+
|
|
1294
|
+
|
|
1295
|
+
<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>
|
|
1296
|
+
<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>
|
|
1297
|
+
<span style="color: #7f7f7f; text-decoration-color: #7f7f7f">╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</span>
|
|
1298
|
+
</pre>
|
|
1299
|
+
|
|
1300
|
+
|
|
1301
|
+
|
|
1302
|
+
|
|
1287
1303
|
<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>
|
|
1288
1304
|
<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>
|
|
1289
1305
|
<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>
|
|
@@ -37,6 +37,17 @@ Each token encodes a single feature value at a specific location within your obs
|
|
|
37
37
|
Your sensors use a special marker value `0xFF` (255) to indicate empty or invalid tokens. When `location == 0xFF`, the
|
|
38
38
|
token should be ignored. Empty tokens are used to pad observation arrays to a fixed size for efficient batch processing.
|
|
39
39
|
|
|
40
|
+
### Global Tokens
|
|
41
|
+
|
|
42
|
+
Global tokens use a dedicated location marker `0xFE` (254) to indicate non-spatial, agent-wide state. These include:
|
|
43
|
+
|
|
44
|
+
- `episode_completion_pct`: How far through the episode you are (0-255)
|
|
45
|
+
- `last_action`: The action you took last step
|
|
46
|
+
- `last_reward`: The reward you received last step
|
|
47
|
+
- Local position observations (lp:north, lp:south, lp:east, lp:west)
|
|
48
|
+
|
|
49
|
+
Global tokens can be detected by position alone: `location == 0xFE` means it's a global token.
|
|
50
|
+
|
|
40
51
|
### Coordinate Encoding
|
|
41
52
|
|
|
42
53
|
Your observation window uses a packed coordinate system to efficiently encode spatial information:
|
|
@@ -44,6 +55,7 @@ Your observation window uses a packed coordinate system to efficiently encode sp
|
|
|
44
55
|
- **Upper 4 bits (high nibble)**: Row coordinate (0-14)
|
|
45
56
|
- **Lower 4 bits (low nibble)**: Column coordinate (0-14)
|
|
46
57
|
- **Special value `0xFF`**: Empty/invalid coordinate
|
|
58
|
+
- **Special value `0xFE`**: Global token (non-spatial observation)
|
|
47
59
|
|
|
48
60
|
Observation windows are typically 11x11 centered on your position; you are located at `0x55` (row 5, column 5).
|
|
49
61
|
Coordinates are **egocentric** (relative to your position), not absolute map coordinates.
|
|
@@ -52,7 +64,7 @@ Coordinates are **egocentric** (relative to your position), not absolute map coo
|
|
|
52
64
|
|
|
53
65
|
- **Row (r/y)**: Vertical coordinate, increases downward
|
|
54
66
|
- **Column (c/x)**: Horizontal coordinate, increases rightward
|
|
55
|
-
- **Center location**: Used for cog-specific features (inventory
|
|
67
|
+
- **Center location**: Used for cog-specific features (inventory)
|
|
56
68
|
|
|
57
69
|
### Observation Features
|
|
58
70
|
|
|
@@ -98,7 +110,6 @@ feature IDs for your configuration.
|
|
|
98
110
|
| `last_action` | Last action taken by the cog | self | |
|
|
99
111
|
| `last_reward` | Last reward received by the cog | self | |
|
|
100
112
|
| `vibe` | Cog's current vibe | any object | Values can be found in `vibes.VIBES` |
|
|
101
|
-
| `agent:compass` | Compass direction toward hub | self | |
|
|
102
113
|
| `tag` | Tags associated with an object (e.g., "wall", "oxygen_extractor", "blue") | any object | Values can be found in `IdMap.tag_names()`. Multiple tags emit multiple tokens. |
|
|
103
114
|
| `cooldown_remaining` | Remaining cooldown time for objects | hub, extractors | Value capped at 255 |
|
|
104
115
|
| `clipped` | Whether an hub is clipped or not | extractors | |
|
|
@@ -9,7 +9,7 @@ readme = "README.md"
|
|
|
9
9
|
requires-python = ">=3.12,<3.13"
|
|
10
10
|
classifiers = ["Programming Language :: Python :: 3", "Programming Language :: Python :: 3.12"]
|
|
11
11
|
dependencies = [
|
|
12
|
-
"mettagrid==0.2.0.
|
|
12
|
+
"mettagrid==0.2.0.75",
|
|
13
13
|
"packaging>=24.0.0",
|
|
14
14
|
"pufferlib-core",
|
|
15
15
|
"pydantic>=2.11.5",
|
|
@@ -25,7 +25,7 @@ from collections import defaultdict
|
|
|
25
25
|
from concurrent.futures import ThreadPoolExecutor, as_completed
|
|
26
26
|
from dataclasses import asdict, dataclass
|
|
27
27
|
from pathlib import Path
|
|
28
|
-
from typing import
|
|
28
|
+
from typing import Dict, List, Optional
|
|
29
29
|
|
|
30
30
|
import matplotlib
|
|
31
31
|
|
|
@@ -36,9 +36,12 @@ from safetensors.torch import load_file as load_safetensors_file
|
|
|
36
36
|
|
|
37
37
|
from cogames.cli.policy import parse_policy_spec
|
|
38
38
|
from cogames.cogs_vs_clips.evals.diagnostic_evals import DIAGNOSTIC_EVALS
|
|
39
|
-
from cogames.cogs_vs_clips.mission import
|
|
39
|
+
from cogames.cogs_vs_clips.mission import CvCMission as AnyMission
|
|
40
|
+
from cogames.cogs_vs_clips.mission import CvCMission as Mission
|
|
41
|
+
from cogames.cogs_vs_clips.mission import NumCogsVariant
|
|
40
42
|
from cogames.cogs_vs_clips.missions import MISSIONS as ALL_MISSIONS
|
|
41
43
|
from cogames.cogs_vs_clips.variants import VARIANTS
|
|
44
|
+
from cogames.core import CoGameMissionVariant as MissionVariant
|
|
42
45
|
from metta_alo.rollout import run_single_episode_rollout
|
|
43
46
|
from mettagrid.config.reward_config import statReward
|
|
44
47
|
from mettagrid.policy.policy import PolicySpec
|
|
@@ -170,13 +173,6 @@ def _run_case(
|
|
|
170
173
|
if env_config.game.actions.attack:
|
|
171
174
|
env_config.game.actions.attack.enabled = False
|
|
172
175
|
|
|
173
|
-
allowed_vibes = set(vibe_names)
|
|
174
|
-
chest = env_config.game.objects.get("chest")
|
|
175
|
-
if chest:
|
|
176
|
-
vibe_transfers = getattr(chest, "vibe_transfers", None)
|
|
177
|
-
if isinstance(vibe_transfers, dict):
|
|
178
|
-
cast(Any, chest).vibe_transfers = {v: t for v, t in vibe_transfers.items() if v in allowed_vibes}
|
|
179
|
-
|
|
180
176
|
if variant is None or getattr(variant, "max_steps_override", None) is None:
|
|
181
177
|
env_config.game.max_steps = max_steps
|
|
182
178
|
|
|
@@ -51,6 +51,8 @@ class PoolInfo(BaseModel):
|
|
|
51
51
|
|
|
52
52
|
class SeasonInfo(BaseModel):
|
|
53
53
|
name: str
|
|
54
|
+
version: int
|
|
55
|
+
canonical: bool
|
|
54
56
|
summary: str
|
|
55
57
|
entry_pool: str | None = None
|
|
56
58
|
leaderboard_pool: str | None = None
|
|
@@ -58,6 +60,13 @@ class SeasonInfo(BaseModel):
|
|
|
58
60
|
pools: list[PoolInfo]
|
|
59
61
|
|
|
60
62
|
|
|
63
|
+
class SeasonVersionInfo(BaseModel):
|
|
64
|
+
version: int
|
|
65
|
+
canonical: bool
|
|
66
|
+
disabled_at: str | None
|
|
67
|
+
created_at: str
|
|
68
|
+
|
|
69
|
+
|
|
61
70
|
class LeaderboardEntry(BaseModel):
|
|
62
71
|
rank: int
|
|
63
72
|
policy: PolicyVersionSummary
|
|
@@ -174,6 +183,9 @@ class TournamentServerClient:
|
|
|
174
183
|
def get_config(self, config_id: str) -> dict[str, Any]:
|
|
175
184
|
return self._get(f"/tournament/configs/{config_id}")
|
|
176
185
|
|
|
186
|
+
def get_season_versions(self, season_name: str) -> list[SeasonVersionInfo]:
|
|
187
|
+
return self._get(f"/tournament/seasons/{season_name}/versions", list[SeasonVersionInfo])
|
|
188
|
+
|
|
177
189
|
def get_leaderboard(self, season_name: str, include_hidden_seasons: bool = False) -> list[LeaderboardEntry]:
|
|
178
190
|
return self._get(
|
|
179
191
|
f"/tournament/seasons/{season_name}/leaderboard",
|
|
@@ -36,6 +36,22 @@ def parse_policy_identifier(identifier: str) -> tuple[str, int | None]:
|
|
|
36
36
|
return identifier, None
|
|
37
37
|
|
|
38
38
|
|
|
39
|
+
def parse_season_ref(season_ref: str) -> tuple[str, int | None]:
|
|
40
|
+
if ":v" in season_ref:
|
|
41
|
+
name, version_str = season_ref.rsplit(":v", 1)
|
|
42
|
+
try:
|
|
43
|
+
return name, int(version_str)
|
|
44
|
+
except ValueError:
|
|
45
|
+
return season_ref, None
|
|
46
|
+
if ":" in season_ref:
|
|
47
|
+
name, version_str = season_ref.rsplit(":", 1)
|
|
48
|
+
try:
|
|
49
|
+
return name, int(version_str)
|
|
50
|
+
except ValueError:
|
|
51
|
+
return season_ref, None
|
|
52
|
+
return season_ref, None
|
|
53
|
+
|
|
54
|
+
|
|
39
55
|
def _format_timestamp(value: Optional[str]) -> str:
|
|
40
56
|
"""Format ISO timestamps for CLI output."""
|
|
41
57
|
if not value:
|
|
@@ -321,6 +337,8 @@ def leaderboard_cmd(
|
|
|
321
337
|
|
|
322
338
|
|
|
323
339
|
def seasons_cmd(
|
|
340
|
+
season_name: Optional[str] = typer.Argument(None, help="Show versions of a specific season"),
|
|
341
|
+
versions: bool = typer.Option(False, "--versions", "-v", help="List all versions of the season"),
|
|
324
342
|
login_server: str = typer.Option(
|
|
325
343
|
DEFAULT_COGAMES_SERVER,
|
|
326
344
|
"--login-server",
|
|
@@ -358,6 +376,28 @@ def seasons_cmd(
|
|
|
358
376
|
|
|
359
377
|
try:
|
|
360
378
|
with client:
|
|
379
|
+
if season_name and versions:
|
|
380
|
+
season_versions = client.get_season_versions(season_name)
|
|
381
|
+
if json_output:
|
|
382
|
+
console.print(json.dumps([v.model_dump() for v in season_versions], indent=2))
|
|
383
|
+
return
|
|
384
|
+
|
|
385
|
+
if not season_versions:
|
|
386
|
+
console.print(f"[yellow]No versions found for season '{season_name}'.[/yellow]")
|
|
387
|
+
return
|
|
388
|
+
|
|
389
|
+
table = Table(title=f"Versions: {season_name}", box=box.SIMPLE_HEAVY, show_lines=False, pad_edge=False)
|
|
390
|
+
table.add_column("Version", style="bold cyan")
|
|
391
|
+
table.add_column("Status", style="white")
|
|
392
|
+
table.add_column("Created", style="dim")
|
|
393
|
+
|
|
394
|
+
for v in season_versions:
|
|
395
|
+
status = "[green]canonical[/green]" if v.canonical else "[dim]historical[/dim]"
|
|
396
|
+
table.add_row(f"v{v.version}", status, _format_timestamp(v.created_at))
|
|
397
|
+
|
|
398
|
+
console.print(table)
|
|
399
|
+
return
|
|
400
|
+
|
|
361
401
|
seasons = client.get_seasons()
|
|
362
402
|
except httpx.HTTPError as exc:
|
|
363
403
|
console.print(f"[red]Failed to reach server:[/red] {exc}")
|
|
@@ -9,53 +9,48 @@ from rich.table import Table
|
|
|
9
9
|
|
|
10
10
|
from cogames.cli.base import console
|
|
11
11
|
from cogames.cogs_vs_clips.mission import (
|
|
12
|
-
|
|
13
|
-
AnyMission,
|
|
14
|
-
Mission,
|
|
15
|
-
MissionVariant,
|
|
12
|
+
CvCMission,
|
|
16
13
|
NumCogsVariant,
|
|
17
|
-
Site,
|
|
18
14
|
)
|
|
19
|
-
from cogames.cogs_vs_clips.procedural import MachinaArena
|
|
20
15
|
from cogames.cogs_vs_clips.sites import SITES
|
|
16
|
+
from cogames.cogs_vs_clips.terrain import MachinaArena
|
|
21
17
|
from cogames.cogs_vs_clips.variants import HIDDEN_VARIANTS, VARIANTS
|
|
18
|
+
from cogames.core import (
|
|
19
|
+
MAP_MISSION_DELIMITER,
|
|
20
|
+
CoGameMissionVariant,
|
|
21
|
+
CoGameSite,
|
|
22
|
+
)
|
|
22
23
|
from cogames.game import load_mission_config, load_mission_config_from_python
|
|
23
24
|
from mettagrid import MettaGridConfig
|
|
24
25
|
from mettagrid.mapgen.mapgen import MapGen
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
@lru_cache(maxsize=1)
|
|
28
|
-
def _get_core_missions() -> list[
|
|
29
|
+
def _get_core_missions() -> list[CvCMission]:
|
|
29
30
|
from cogames.cogs_vs_clips.missions import get_core_missions
|
|
30
31
|
|
|
31
32
|
return get_core_missions()
|
|
32
33
|
|
|
33
34
|
|
|
34
35
|
@lru_cache(maxsize=1)
|
|
35
|
-
def
|
|
36
|
-
from cogames.cogs_vs_clips.missions import get_legacy_missions
|
|
37
|
-
|
|
38
|
-
return get_legacy_missions()
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
@lru_cache(maxsize=1)
|
|
42
|
-
def _get_eval_missions_all() -> list[Mission]:
|
|
36
|
+
def _get_eval_missions_all() -> list[CvCMission]:
|
|
43
37
|
from cogames.cogs_vs_clips.evals.diagnostic_evals import DIAGNOSTIC_EVALS
|
|
44
38
|
from cogames.cogs_vs_clips.evals.integrated_evals import EVAL_MISSIONS as INTEGRATED_EVAL_MISSIONS
|
|
45
39
|
from cogames.cogs_vs_clips.evals.spanning_evals import EVAL_MISSIONS as SPANNING_EVAL_MISSIONS
|
|
46
40
|
|
|
47
|
-
missions: list[
|
|
41
|
+
missions: list[CvCMission] = []
|
|
48
42
|
missions.extend(INTEGRATED_EVAL_MISSIONS)
|
|
49
43
|
missions.extend(SPANNING_EVAL_MISSIONS)
|
|
50
44
|
missions.extend(mission_cls() for mission_cls in DIAGNOSTIC_EVALS) # type: ignore[call-arg]
|
|
51
45
|
return missions
|
|
52
46
|
|
|
53
47
|
|
|
54
|
-
def load_mission_set(mission_set: str) -> list[
|
|
48
|
+
def load_mission_set(mission_set: str) -> list[CvCMission]:
|
|
55
49
|
"""Load a predefined set of evaluation missions.
|
|
56
50
|
|
|
57
51
|
Args:
|
|
58
52
|
mission_set: Name of mission set to load. Options:
|
|
53
|
+
- "cogsguard_evals": CogsGuard evaluation missions (map-based)
|
|
59
54
|
- "integrated_evals": Integrated evaluation missions
|
|
60
55
|
- "spanning_evals": Spanning evaluation missions
|
|
61
56
|
- "diagnostic_evals": Diagnostic evaluation missions
|
|
@@ -67,7 +62,7 @@ def load_mission_set(mission_set: str) -> list[AnyMission]:
|
|
|
67
62
|
Raises:
|
|
68
63
|
ValueError: If mission_set name is unknown
|
|
69
64
|
"""
|
|
70
|
-
missions_list: list[
|
|
65
|
+
missions_list: list[CvCMission]
|
|
71
66
|
if mission_set == "all":
|
|
72
67
|
# All missions: eval missions + integrated + spanning + diagnostic + core missions
|
|
73
68
|
missions_list = list(_get_eval_missions_all())
|
|
@@ -82,6 +77,10 @@ def load_mission_set(mission_set: str) -> list[AnyMission]:
|
|
|
82
77
|
from cogames.cogs_vs_clips.evals.diagnostic_evals import DIAGNOSTIC_EVALS
|
|
83
78
|
|
|
84
79
|
missions_list = [mission_cls() for mission_cls in DIAGNOSTIC_EVALS] # type: ignore[call-arg]
|
|
80
|
+
elif mission_set == "cogsguard_evals":
|
|
81
|
+
from cogames.cogs_vs_clips.evals.cogsguard_evals import COGSGUARD_EVAL_MISSIONS
|
|
82
|
+
|
|
83
|
+
missions_list = list(COGSGUARD_EVAL_MISSIONS)
|
|
85
84
|
elif mission_set == "integrated_evals":
|
|
86
85
|
from cogames.cogs_vs_clips.evals.integrated_evals import EVAL_MISSIONS as INTEGRATED_EVAL_MISSIONS
|
|
87
86
|
|
|
@@ -91,20 +90,20 @@ def load_mission_set(mission_set: str) -> list[AnyMission]:
|
|
|
91
90
|
|
|
92
91
|
missions_list = list(SPANNING_EVAL_MISSIONS)
|
|
93
92
|
else:
|
|
94
|
-
available = "integrated_evals, spanning_evals, diagnostic_evals, all"
|
|
93
|
+
available = "cogsguard_evals, integrated_evals, spanning_evals, diagnostic_evals, all"
|
|
95
94
|
raise ValueError(f"Unknown mission set: {mission_set}\nAvailable sets: {available}")
|
|
96
95
|
|
|
97
96
|
return missions_list
|
|
98
97
|
|
|
99
98
|
|
|
100
|
-
def parse_variants(variants_arg: Optional[list[str]]) -> list[
|
|
99
|
+
def parse_variants(variants_arg: Optional[list[str]]) -> list[CoGameMissionVariant]:
|
|
101
100
|
"""Parse variant specifications from command line.
|
|
102
101
|
|
|
103
102
|
Args:
|
|
104
103
|
variants_arg: List of variant names like ["solar_flare", "dark_side"]
|
|
105
104
|
|
|
106
105
|
Returns:
|
|
107
|
-
List of configured
|
|
106
|
+
List of configured CoGameMissionVariant instances
|
|
108
107
|
|
|
109
108
|
Raises:
|
|
110
109
|
ValueError: If variant name is unknown
|
|
@@ -112,11 +111,11 @@ def parse_variants(variants_arg: Optional[list[str]]) -> list[MissionVariant]:
|
|
|
112
111
|
if not variants_arg:
|
|
113
112
|
return []
|
|
114
113
|
|
|
115
|
-
variants: list[
|
|
114
|
+
variants: list[CoGameMissionVariant] = []
|
|
116
115
|
all_variants = [*VARIANTS, *HIDDEN_VARIANTS]
|
|
117
116
|
for name in variants_arg:
|
|
118
117
|
# Find matching variant class by instantiating and checking the name
|
|
119
|
-
variant:
|
|
118
|
+
variant: CoGameMissionVariant | None = None
|
|
120
119
|
for v in all_variants:
|
|
121
120
|
if v.name == name:
|
|
122
121
|
variant = v
|
|
@@ -143,7 +142,7 @@ def get_all_eval_missions() -> list[str]:
|
|
|
143
142
|
return [mission.full_name() for mission in _get_eval_missions_all()]
|
|
144
143
|
|
|
145
144
|
|
|
146
|
-
def get_site_by_name(site_name: str) ->
|
|
145
|
+
def get_site_by_name(site_name: str) -> CoGameSite:
|
|
147
146
|
"""Get a site by name.
|
|
148
147
|
|
|
149
148
|
Raises:
|
|
@@ -159,7 +158,7 @@ def get_site_by_name(site_name: str) -> Site:
|
|
|
159
158
|
|
|
160
159
|
def get_mission_name_and_config(
|
|
161
160
|
ctx: typer.Context, mission_arg: Optional[str], variants_arg: Optional[list[str]] = None, cogs: Optional[int] = None
|
|
162
|
-
) -> tuple[str, MettaGridConfig, Optional[
|
|
161
|
+
) -> tuple[str, MettaGridConfig, Optional[CvCMission]]:
|
|
163
162
|
if not mission_arg:
|
|
164
163
|
console.print(ctx.get_help())
|
|
165
164
|
console.print("[yellow]Missing: --mission / -m[/yellow]\n")
|
|
@@ -246,12 +245,10 @@ def find_mission(
|
|
|
246
245
|
*,
|
|
247
246
|
include_evals: bool = False,
|
|
248
247
|
include_legacy: bool = False,
|
|
249
|
-
) ->
|
|
250
|
-
missions: list[
|
|
248
|
+
) -> CvCMission:
|
|
249
|
+
missions: list[CvCMission] = list(_get_core_missions())
|
|
251
250
|
if include_evals:
|
|
252
251
|
missions = [*missions, *_get_eval_missions_all()]
|
|
253
|
-
if include_legacy:
|
|
254
|
-
missions = [*missions, *_get_legacy_missions()]
|
|
255
252
|
|
|
256
253
|
found_site = False
|
|
257
254
|
for mission in missions:
|
|
@@ -281,7 +278,7 @@ def get_mission(
|
|
|
281
278
|
variants_arg: Optional[list[str]] = None,
|
|
282
279
|
cogs: Optional[int] = None,
|
|
283
280
|
include_legacy: bool = False,
|
|
284
|
-
) -> tuple[str, MettaGridConfig, Optional[
|
|
281
|
+
) -> tuple[str, MettaGridConfig, Optional[CvCMission]]:
|
|
285
282
|
"""Get a specific mission configuration by name or file path.
|
|
286
283
|
|
|
287
284
|
Args:
|
|
@@ -291,7 +288,7 @@ def get_mission(
|
|
|
291
288
|
include_legacy: Whether to include legacy (pre-CogsGuard) missions
|
|
292
289
|
|
|
293
290
|
Returns:
|
|
294
|
-
Tuple of (mission name, MettaGridConfig,
|
|
291
|
+
Tuple of (mission name, MettaGridConfig, CvCMission or None)
|
|
295
292
|
|
|
296
293
|
Raises:
|
|
297
294
|
ValueError: If mission not found or file cannot be loaded
|
|
@@ -323,7 +320,7 @@ def get_mission(
|
|
|
323
320
|
else:
|
|
324
321
|
site_name, mission_name = mission_arg.split(MAP_MISSION_DELIMITER)
|
|
325
322
|
|
|
326
|
-
mission:
|
|
323
|
+
mission: CvCMission = find_mission(site_name, mission_name, include_evals=True, include_legacy=include_legacy)
|
|
327
324
|
|
|
328
325
|
if variants:
|
|
329
326
|
mission = mission.with_variants(variants)
|
|
@@ -447,7 +444,7 @@ def list_evals() -> None:
|
|
|
447
444
|
return
|
|
448
445
|
|
|
449
446
|
# Group missions by site
|
|
450
|
-
missions_by_site: dict[str, list[
|
|
447
|
+
missions_by_site: dict[str, list[CvCMission]] = {}
|
|
451
448
|
for m in evals:
|
|
452
449
|
missions_by_site.setdefault(m.site.name, []).append(m)
|
|
453
450
|
|
|
@@ -499,7 +496,7 @@ def list_evals() -> None:
|
|
|
499
496
|
console.print(" [bold]cogames play[/bold] --mission [blue]evals.divide_and_conquer[/blue]")
|
|
500
497
|
|
|
501
498
|
|
|
502
|
-
def describe_mission(mission_name: str, game_config: MettaGridConfig, mission_cfg:
|
|
499
|
+
def describe_mission(mission_name: str, game_config: MettaGridConfig, mission_cfg: CvCMission | None = None) -> None:
|
|
503
500
|
"""Print detailed information about a specific mission.
|
|
504
501
|
|
|
505
502
|
Args:
|
|
@@ -290,6 +290,7 @@ def validate_policy_in_isolation(
|
|
|
290
290
|
"run",
|
|
291
291
|
"cogames",
|
|
292
292
|
"validate-policy",
|
|
293
|
+
"--policy",
|
|
293
294
|
policy_arg,
|
|
294
295
|
"--season",
|
|
295
296
|
season,
|
|
@@ -298,7 +299,6 @@ def validate_policy_in_isolation(
|
|
|
298
299
|
]
|
|
299
300
|
if setup_script:
|
|
300
301
|
validate_cmd.extend(["--setup-script", setup_script])
|
|
301
|
-
validate_cmd.extend(["--policy", policy_arg])
|
|
302
302
|
|
|
303
303
|
_run_from_tmp_dir(validate_cmd)
|
|
304
304
|
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"""Clips behavior events for CogsGuard missions.
|
|
2
|
+
|
|
3
|
+
Clips are a non-player faction that gradually takes over neutral junctions.
|
|
4
|
+
These events create the spreading/scrambling behavior that pressures players.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from pydantic import Field
|
|
8
|
+
|
|
9
|
+
from mettagrid.base_config import Config
|
|
10
|
+
from mettagrid.config.event_config import EventConfig, once, periodic
|
|
11
|
+
from mettagrid.config.filter import isAlignedTo, isNear
|
|
12
|
+
from mettagrid.config.filter.alignment_filter import isNeutral, isNotAlignedTo, isNotNeutral
|
|
13
|
+
from mettagrid.config.mettagrid_config import CollectiveConfig
|
|
14
|
+
from mettagrid.config.mutation import alignTo, removeAlignment
|
|
15
|
+
from mettagrid.config.tag import typeTag
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class ClipsConfig(Config):
|
|
19
|
+
"""Configuration for clips behavior in CogsGuard game mode."""
|
|
20
|
+
|
|
21
|
+
# Clips Behavior - scramble cogs junctions to neutral
|
|
22
|
+
initial_clips_start: int = Field(default=10)
|
|
23
|
+
initial_clips_spots: int = Field(default=1)
|
|
24
|
+
|
|
25
|
+
scramble_start: int = Field(default=50)
|
|
26
|
+
scramble_interval: int = Field(default=100)
|
|
27
|
+
scramble_radius: int = Field(default=25)
|
|
28
|
+
|
|
29
|
+
# Clips Behavior - align neutral junctions to clips
|
|
30
|
+
align_start: int = Field(default=100)
|
|
31
|
+
align_interval: int = Field(default=100)
|
|
32
|
+
align_radius: int = Field(default=25)
|
|
33
|
+
|
|
34
|
+
def events(self, max_steps: int) -> dict[str, EventConfig]:
|
|
35
|
+
"""Create all clips events for a mission.
|
|
36
|
+
|
|
37
|
+
Returns:
|
|
38
|
+
Dictionary of event name to EventConfig.
|
|
39
|
+
"""
|
|
40
|
+
return {
|
|
41
|
+
"initial_clips": EventConfig(
|
|
42
|
+
name="initial_clips",
|
|
43
|
+
target_tag=typeTag("junction"),
|
|
44
|
+
timesteps=once(self.initial_clips_start),
|
|
45
|
+
mutations=[alignTo("clips")],
|
|
46
|
+
max_targets=self.initial_clips_spots,
|
|
47
|
+
),
|
|
48
|
+
"cogs_to_neutral": EventConfig(
|
|
49
|
+
name="cogs_to_neutral",
|
|
50
|
+
target_tag=typeTag("junction"),
|
|
51
|
+
timesteps=periodic(start=self.scramble_start, period=self.scramble_interval, end=max_steps),
|
|
52
|
+
# near a clips-aligned junction
|
|
53
|
+
filters=[
|
|
54
|
+
isNear(typeTag("junction"), [isAlignedTo("clips")], radius=self.scramble_radius),
|
|
55
|
+
isNotAlignedTo("clips"),
|
|
56
|
+
isNotNeutral(),
|
|
57
|
+
],
|
|
58
|
+
mutations=[removeAlignment()],
|
|
59
|
+
max_targets=1,
|
|
60
|
+
),
|
|
61
|
+
"neutral_to_clips": EventConfig(
|
|
62
|
+
name="neutral_to_clips",
|
|
63
|
+
target_tag=typeTag("junction"),
|
|
64
|
+
timesteps=periodic(start=self.align_start, period=self.align_interval, end=max_steps),
|
|
65
|
+
# neutral junctions near a clips-aligned junction
|
|
66
|
+
filters=[
|
|
67
|
+
isNear(typeTag("junction"), [isAlignedTo("clips")], radius=self.align_radius),
|
|
68
|
+
isNeutral(),
|
|
69
|
+
],
|
|
70
|
+
mutations=[alignTo("clips")],
|
|
71
|
+
max_targets=1,
|
|
72
|
+
),
|
|
73
|
+
# If there are no clips-aligned junctions, re-invade
|
|
74
|
+
"presence_check": EventConfig(
|
|
75
|
+
name="presence_check",
|
|
76
|
+
target_tag=typeTag("junction"),
|
|
77
|
+
timesteps=periodic(start=self.initial_clips_start, period=self.scramble_interval * 2, end=max_steps),
|
|
78
|
+
filters=[isNear(typeTag("junction"), [isAlignedTo("clips")], radius=1000)],
|
|
79
|
+
max_targets=1,
|
|
80
|
+
fallback="initial_clips",
|
|
81
|
+
),
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
def collective_config(self) -> CollectiveConfig:
|
|
85
|
+
"""Create a CollectiveConfig for this clips configuration."""
|
|
86
|
+
return CollectiveConfig(name="clips")
|