Spaces:
Paused
Paused
| """Diplomacy game constants from the canonical spec. | |
| Used by Cicero plugin for step generation. Not config β these are fixed game rules. | |
| """ | |
| from __future__ import annotations | |
| # βββ Powers (7 Great Powers) ββββββββββββββββββββββββββββββββββββββββββ | |
| POWERS = [ | |
| "England", | |
| "France", | |
| "Germany", | |
| "Italy", | |
| "Austria-Hungary", | |
| "Russia", | |
| "Turkey", | |
| ] | |
| # βββ Phases per year ββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| PHASES = [ | |
| "Spring Diplomacy", | |
| "Spring Movement", | |
| "Spring Retreat", | |
| "Fall Diplomacy", | |
| "Fall Movement", | |
| "Fall Retreat", | |
| "Winter Adjustment", | |
| ] | |
| # Phases where negotiation happens (before orders) | |
| NEGOTIATION_PHASES = ["Spring Diplomacy", "Fall Diplomacy"] | |
| # βββ Years (game starts 1901) ββββββββββββββββββββββββββββββββββββββββββ | |
| DEFAULT_YEAR_RANGE = (1901, 1905) # inclusive | |
| # βββ Run defaults (no config) ββββββββββββββββββββββββββββββββββββββββββ | |
| NUM_STEPS = 5 | |
| # βββ Key regions for negotiation context βββββββββββββββββββββββββββββββ | |
| # Strategic inland provinces (armies only) | |
| INLAND_REGIONS = [ | |
| "Bohemia", | |
| "Budapest", | |
| "Galicia", | |
| "Moscow", | |
| "Munich", | |
| "Serbia", | |
| "Ukraine", | |
| "Vienna", | |
| "Warsaw", | |
| ] | |
| # Strategic coastal provinces (armies + fleets) | |
| COASTAL_REGIONS = [ | |
| "Constantinople", | |
| "London", | |
| "Paris", | |
| "Berlin", | |
| "Rome", | |
| "Bulgaria", | |
| "Rumania", | |
| "St. Petersburg", | |
| "Naples", | |
| ] | |
| # Key sea zones | |
| SEA_REGIONS = [ | |
| "North Sea", | |
| "English Channel", | |
| "Mediterranean", | |
| "Black Sea", | |
| "Baltic Sea", | |
| ] | |
| # All regions for random selection (inland + coastal + sea) | |
| ALL_REGIONS = INLAND_REGIONS + COASTAL_REGIONS + SEA_REGIONS | |
| # βββ Supply centers (34 total) βββββββββββββββββββββββββββββββββββββββββ | |
| HOME_SCS: dict[str, list[str]] = { | |
| "England": ["London", "Edinburgh", "Liverpool"], | |
| "France": ["Paris", "Marseilles", "Brest"], | |
| "Germany": ["Berlin", "Munich", "Kiel"], | |
| "Italy": ["Rome", "Venice", "Naples"], | |
| "Austria-Hungary": ["Vienna", "Budapest", "Trieste"], | |
| "Russia": ["Moscow", "St. Petersburg", "Warsaw", "Sevastopol"], | |
| "Turkey": ["Constantinople", "Ankara", "Smyrna"], | |
| } | |
| NEUTRAL_SCS = [ | |
| "Norway", | |
| "Sweden", | |
| "Denmark", | |
| "Holland", | |
| "Belgium", | |
| "Spain", | |
| "Portugal", | |
| "Tunis", | |
| "Serbia", | |
| "Greece", | |
| "Romania", | |
| "Bulgaria", | |
| ] | |
| # βββ Negotiation domains (topics for LLM prompts) βββββββββββββββββββββββ | |
| NEGOTIATION_DOMAINS: list[tuple[str, str]] = [ | |
| ("alliance_negotiation", "proposing or renewing an alliance for mutual support"), | |
| ("move_coordination", "coordinating army/fleet moves for the coming season"), | |
| ("supply_center_deal", "negotiating who gets which Supply Center or territory"), | |
| ("support_request", "asking for support on a specific move or defense"), | |
| ("threat_assessment", "discussing a rival power's moves or a potential stab"), | |
| ] | |
| # βββ Game context string for LLM system prompt βββββββββββββββββββββββββ | |
| GAME_CONTEXT = """ | |
| Diplomacy is a strategic board game set in 1914 Europe. 7 players, 34 supply centers, 18 to win. | |
| Powers: England, France, Germany, Italy, Austria-Hungary, Russia, Turkey. | |
| Board: 75 provinces (22 inland, 14 coastal, 19 sea). Units: Army (A), Fleet (F). | |
| Phases: Spring/Fall (Diplomacy β Movement β Retreat), Winter Adjustment. | |
| All orders are simultaneous; negotiation happens before each movement phase. | |
| Key regions: Vienna, Warsaw, Moscow, Constantinople, London, Paris, Berlin, Rome, Serbia, Bulgaria, Galicia, Ukraine. | |
| """.strip() | |