## New File - PolicyControllerAi.java (840 lines): Extends Forge's PlayerControllerAi to intercept AI decisions at chooseSpellAbilityToPlay() and route them through the Python policy server. Falls back to Forge built-in AI on any failure. Inner PolicyAiController overrides AiController with full legal action gathering via ComputerUtilAbility. ## Wiring - GameSession.java: Import + Javadoc for PolicyControllerAi decision flow. Logs decision pipeline when policy server connects. End-of-game reward submission via PolicyControllerAi lifecycle. - BatchRunner.java: New setPolicyServer(url) method. Appends --policy midrange --policyServer <url> to Forge subprocess command when policy server URL is configured. ## Path Updates (Forge-Repo rename) - README.md: Forge link → KoalaTrapLord/Forge-Repo, build path updated - .env.example: FORGE_JAR_PATH and FORGE_WORKING_DIR → Forge-Repo - lab_api.py: Auto-detect paths try Forge-Repo first, forge-repo as legacy ## MacroActionExecutor - Added public isRemovalCard(), isDrawCard(), isRampCard() wrappers so PolicyControllerAi can consult the same card-role databases. Refs: Issue #83 Phase 2.4
28 lines
1.7 KiB
Bash
28 lines
1.7 KiB
Bash
# Commander AI Lab — Environment Variables
|
|
# Copy this file to .env and fill in your values.
|
|
# start-lab.bat will auto-load .env if it exists.
|
|
|
|
# ── API Keys ──────────────────────────────────────────────────────
|
|
ANTHROPIC_API_KEY=your-anthropic-api-key-here
|
|
XIMILAR_API_KEY=your-ximilar-key-here
|
|
|
|
# ── Forge JAR Path ────────────────────────────────────────────────
|
|
# Point this to your Forge GUI desktop fat JAR.
|
|
FORGE_JAR_PATH=D:/ForgeCommander/Forge-Repo/forge-gui-desktop/target/forge-gui-desktop-2.0.12-SNAPSHOT-jar-with-dependencies.jar
|
|
|
|
# IMPORTANT: Forge MUST be launched from the forge-gui directory (not forge-gui-desktop/target).
|
|
# The JAR looks for res/ relative to its working directory. Without this, you get
|
|
# ExceptionInInitializerError on startup.
|
|
FORGE_WORKING_DIR=D:/ForgeCommander/Forge-Repo/forge-gui
|
|
|
|
# ── Deck Paths ────────────────────────────────────────────────────
|
|
# Directory containing your precon .dck files.
|
|
# Forge reads deck files directly from this folder.
|
|
#
|
|
# IMPORTANT: lab_api.py reads PRECON_DIR (not PRECON_DECKS_DIR).
|
|
# PRECON_DECKS_DIR is kept below for backwards compat but is NOT used by the server.
|
|
PRECON_DIR=D:\ForgeCommander\commander-ai-lab\precon-decks
|
|
PRECON_DECKS_DIR=D:\ForgeCommander\commander-ai-lab\precon-decks
|
|
USER_DECKS_DIR=D:\ForgeCommander\commander-ai-lab\user-decks
|
|
FORGE_DECKS_DIR=D:\ForgeCommander\commander-ai-lab\user-decks
|