diff --git a/.gitignore b/.gitignore index 8cd3438..4c2a384 100644 --- a/.gitignore +++ b/.gitignore @@ -138,7 +138,7 @@ compile_commands.json *.backup *.old -*.zip +models # Devenv .devenv* devenv.local.nix @@ -149,5 +149,3 @@ devenv.local.yaml # pre-commit .pre-commit-config.yaml - -results \ No newline at end of file diff --git a/ai/docs/training_log.md b/ai/docs/training_log.md index 7e8a567..c2defe7 100644 --- a/ai/docs/training_log.md +++ b/ai/docs/training_log.md @@ -1,78 +1,821 @@ -# Zappy AI Training Log & Roadmap +# Zappy AI Training Log -This file acts as a lab notebook to document the parameter tweaks, learning curves, and results of training runs. Below is the proposed step-by-step training roadmap starting from scratch. +This file acts as a lab notebook to document the parameter tweaks, learning curves, and results of training runs. ---- +## Run #1 +- **Base Model**: `Fresh` +- **Output Model Name**: `zappy_survival_v1` +- **Timesteps Run**: `200,000` +- **Real-World Duration**: `1m 50s` + +#### Parameters +```bash +# Paste the exact run command here: +./run_training.sh -t 200000 -f 1000 -m zappy_survival_v1 +``` + +#### Evaluation Metrics (via evaluate_ai.py) +Run (adjust --teams, --players, --width, --height depending on phase): +``` +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_survival_v1 --teams team01 --players 1 --width 10 --height 10 +``` +- **Average Level Achieved**: `1.80` +- **Max Level Achieved**: `2` +- **Average Turns Survived**: `84.00` +- **Max Turns Survived**: `102` +- **Rating Tier**: `Tier 1` + +Evaluation file: *[eval_20260627_134417_zappy_survival_v1_r1.md](../training/results/eval_20260627_134417_zappy_survival_v1_r1.md)* -## AI Training Roadmap - -```mermaid -graph TD - Phase1[Phase 1: Basic Survival] -->|Learn to eat & navigate| Phase2[Phase 2: Single-Agent Elevation] - Phase2 -->|Learn to collect stones & incant| Phase3[Phase 3: Coordination & Radio] - Phase3 -->|Learn to fork, broadcast & gather teammates| Phase4[Phase 4: Full Scale Competitive] -``` - -### Phase 1: Basic Survival & Navigation -* **Objective**: Teach the neural network to walk, search the map, check its inventory, and consume food when hungry. It must learn not to starve. -* **Map Size**: `10x10` -* **Configuration**: `total_teams=1`, `frequency=1000` -* **Expected Result**: Survives average of 10,000+ turns, remains Level 1. -* **Timesteps**: `200,000` -* **Target Model Name**: `zappy_survival_v1` - -### Phase 2: Single-Agent Elevation (Level 2 Competence) -* **Objective**: Train the agent to search for Linemate stones, drop them on a tile, and execute the `Incantation` command to elevate itself to Level 2. -* **Map Size**: `12x12` -* **Configuration**: Load `zappy_survival_v1`, `total_teams=1`, `frequency=1000` -* **Expected Result**: Reaches Level 2 consistently. -* **Timesteps**: `300,000` (Cumulative: `500,000`) -* **Target Model Name**: `zappy_level2_v1` - -### Phase 3: Coordination & Radio Broadcasts (Level 3-4 Competence) -* **Objective**: Level 3 requires multiple players. Agents must learn to use `FORK` to spawn teammates, `BROADCAST` messages to coordinate, and navigate towards teammate coordinates when an incantation is initiated. -* **Map Size**: `15x15` -* **Configuration**: Load `zappy_level2_v1`, `total_teams=1` (with 2 players), `frequency=1000` -* **Expected Result**: Reaches Level 3/4. -* **Timesteps**: `500,000` (Cumulative: `1,000,000`) -* **Target Model Name**: `zappy_coordination_v1` - -### Phase 4: Competitive Multi-Team Play (Level 5-8 Competence) -* **Objective**: Train in the presence of rival teams. Learn to manage resource scarcity, handle ejection, and optimize team-wide ascension to Level 8. -* **Map Size**: `20x20` -* **Configuration**: Load `zappy_coordination_v1`, `total_teams=2` (each with 2-3 players), `frequency=1000` -* **Expected Result**: Master coordination, reaching Level 5+ consistently. -* **Timesteps**: `1,000,000` (Cumulative: `2,000,000`) -* **Target Model Name**: `zappy_master_v1` +#### Observations (when running game with gui) +2 game runs performed +- *Key observations* + - The player would not take any stones from the ground + - The player manage to evolve to level 2 when the stone needed was already on the tile. + - Player would ignore food on the tiles unless it's life bar fell bellow a certain mark +- *Did it exhibit any loop behaviors or stuck states?* + - Player would only walk forward. This can be explained by the fact that in level 1 the player can only look one tile ahead, because in this phase the AI is not +- *Adjustments needed for the next run:* + - Phase 1 is complete and successful. The agent has mastered basic survival and hunger control. + - In Phase 2, we introduce stones needed for elevation, which award a massive +4.0 points (compared to the tiny +0.1 for walking forward). The agent will quickly learn that it cannot get these high rewards by just walking in a straight line; it will be forced to turn, look, and steer towards the stones. + +## Run #2 +- **Base Model**: `Loaded from zappy_survival_v1` +- **Output Model Name**: `zappy_level2_v1` +- **Timesteps Run**: `300,000` +- **Real-World Duration**: `1m 47s` + +#### Parameters +```bash +# Paste the exact run command here: +./run_training.sh -t 300000 -f 1000 -m zappy_level2_v1 -l zappy_survival_v1 +``` + +#### Evaluation Metrics (via evaluate_ai.py) +Run (adjust --teams, --players, --width, --height depending on phase): +``` +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_level2_v1 --teams team01 --players 1 --width 12 --height 12 +``` +- **Average Level Achieved**: `1` +- **Max Level Achieved**: `1` +- **Average Turns Survived**: `139` +- **Max Turns Survived**: `159` +- **Rating Tier**: `Tier 1` + +Evaluation file: *[eval_20260627_134637_zappy_level2_v1_r1.md](../training/results/eval_20260627_134637_zappy_level2_v1_r1.md)* + +#### Observations (when running game with gui) +3 game runs performed +- *Key observations* + - Agent would take food more frequently + - Agent did pick up Linemate at some point. It died not use it or evolve at any point + - The agent did perform a turn at some point, but then kept only moving forward +- *Did it exhibit any loop behaviors or stuck states?* + - Agent still moves forward constantly +- *Adjustments needed for the next run:* + - We will continue training Phase 2 for longer. Now that the AI has discovered the stones and started turning, it needs more experience to reinforce and complete the sequence. + - Make a new run with a training cycle of 500,000 timesteps, loading the current `zappy_level2_v1` model to fine-tune it + +## Run #3 +- **Base Model**: `Loaded from zappy_level2_v1` +- **Output Model Name**: `zappy_level2_v1` +- **Timesteps Run**: `500,000` +- **Real-World Duration**: `2m 52s` + +#### Parameters +```bash +# Paste the exact run command here: +./run_training.sh -t 500000 -f 1000 -m zappy_level2_v1 -l zappy_level2_v1 +``` + +#### Evaluation Metrics (via evaluate_ai.py) +Run (adjust --teams, --players, --width, --height depending on phase): +``` +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_level2_v1 --teams team01 --players 1 --width 12 --height 12 +``` +- **Average Level Achieved**: `1.8` +- **Max Level Achieved**: `2` +- **Average Turns Survived**: `1724.80` +- **Max Turns Survived**: `3909` +- **Rating Tier**: `Tier 1` + +Evaluation file: *[eval_20260627_142019_zappy_level2_v1_r2.md](../training/results/eval_20260627_142019_zappy_level2_v1_r2.md)* + +#### Observations (when running game with gui) +2 game runs performed +- *Key observations* + - Agent prioritizes taking food + - The agent moves forward constantly but did perform some turns + - Agent managed to get to level 2 both runs. It did not use the stones to evolve, but it did manage to evolve when the stones were already on the tile. +- *Did it exhibit any loop behaviors or stuck states?* +- *Adjustments needed for the next run:* + - Change the excess food collection reward from +0.2 to 0.0. This forces it to ignore excess food and spend its energy exploring for stones to get the +4.0 stone reward. + - We will continue training Phase 2. With the updated rewards + - Make a new run loading `zappy_level2_v1` to generate `zappy_level2_v2` --- +updated evaluation script to get more info from it, and avoid having to run full game to see hawt the ai was doing -## Experiment Log +--- -template to document each training run. +## Run #4 +- **Base Model**: `Loaded from zappy_level2_v1` +- **Output Model Name**: `zappy_level2_v2` +- **Timesteps Run**: `500,000` +- **Real-World Duration**: `2m 52s` -### Run #[Number] -- **Base Model**: `[Fresh / Loaded from ]` -- **Output Model Name**: `[e.g. zappy_survival_v1]` -- **Timesteps Run**: `[e.g., 200,000]` -- **Real-World Duration**: `[e.g., 8 minutes]` +#### Parameters +```bash +# Paste the exact run command here: +./run_training.sh -t 500000 -f 1000 -m zappy_level2_v2 -l zappy_level2_v1 +``` + +#### Evaluation Metrics (via evaluate_ai.py) +Run (adjust --teams, --players, --width, --height depending on phase): +``` +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_level2_v2 --teams team01 --players 1 --width 12 --height 12 +``` +- **Average Level Achieved**: `1.8` +- **Max Level Achieved**: `2` +- **Average Turns Survived**: `1065.40` +- **Max Turns Survived**: `3974` +- **Rating Tier**: `Tier 1` + +Evaluation file: *[eval_20260627_151904.md](../training/results/eval_20260627_151904.md)* + +#### Observations +- *Key observations* + - (Compared with the updated evaluation from v1: *[eval_20260627_145555_zappy_level2_v1_r2.md](../training/results/eval_20260627_145555_zappy_level2_v1_r2.md)*) + - It stopped spamming blindly and only incants when conditions are correct. + - The agent is actively dropping stones to prepare the ritual. + - No more wasted actions. It stopped spamming the radio at Level 1. + - Survival improved by over 180 turns. + - It successfully reached Level 2 in 4 out of the 5 test episodes. +- *Adjustments needed for the next run:* + - Continue training zappy_level2_v2 for another 300,000 timesteps to let it polish its speed and reach 100% success rate + + +## Run #5 +- **Base Model**: `Loaded from zappy_level2_v2` +- **Output Model Name**: `zappy_level2_v2` +- **Timesteps Run**: `300,000` +- **Real-World Duration**: `1m 44s` #### Parameters ```bash # Paste the exact run command here: -./ai/training/run_training.sh -t 200000 -x 10 -y 10 -f 1000 -n TeamAI -m zappy_survival_v1 +./run_training.sh -t 300000 -f 1000 -m zappy_level2_v2 -l zappy_level2_v2 ``` #### Evaluation Metrics (via evaluate_ai.py) +Run (adjust --teams, --players, --width, --height depending on phase): ``` -# Run: PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_survival_v1 +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_level2_v1 --teams team01 --players 1 --width 12 --height 12 ``` -- **Average Level Achieved**: `X.XX` -- **Max Level Achieved**: `X` -- **Average Turns Survived**: `XXXX` -- **Rating Tier**: `[Tier 1 / Tier 2 / ...]` +- **Average Level Achieved**: `1.80` +- **Max Level Achieved**: `2` +- **Average Turns Survived**: `3574.20` +- **Max Turns Survived**: `8230` +- **Rating Tier**: `Tier 2` + +Evaluation file: *[eval_20260627_153033.md](../training/results/eval_20260627_153033.md)* #### Observations -- *What actions did the agent prioritize?* -- *Did it exhibit any loop behaviors or stuck states?* +- *Key observations* + - Average turns survived increased by over 2,500 turns, indicating the agent is highly stable at finding food. + - It only attempted 4 incantations and succeeded in 100% of them. + - The shortcut. `Set Stone` was 0.0%. The agent realized that on a 12x12 single-player map, it is faster to wander until standing on a pre-spawned Linemate and incanting, rather than picking up and carrying stones. + - Reached **Tier 2: Single-Player Competence**. +- *Adjustments needed for the next run:* + - Transition to Phase 3. We will load the trained `zappy_level2_v2` model and train it under multi-agent conditions to force coordination, radio usage, and active stone-gathering (since multi-stone recipes cannot be solved by the shortcut). + + +## Run #6 +- **Base Model**: `Loaded from zappy_level2_v2` +- **Output Model Name**: `zappy_coordination_v1` +- **Timesteps Run**: `500,000` +- **Real-World Duration**: `2m 55s` + +#### Parameters +```bash +# Paste the exact run command here: +./run_training.sh -t 500000 -f 1000 -m zappy_coordination_v1 -l zappy_level2_v2 +``` + +#### Evaluation Metrics (via evaluate_ai.py) +Run (adjust --teams, --players, --width, --height depending on phase): +``` +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_coordination_v1 --teams team01 --player 2 --width 15 --height 15 +``` +- **Average Level Achieved**: `1.10` +- **Max Level Achieved**: `2` +- **Average Turns Survived**: `74.80` +- **Max Turns Survived**: `89` +- **Rating Tier**: `Tier 1` + +Evaluation file: *[eval_20260627_154847.md](../training/results/eval_20260627_154847.md)* + +#### Observations +- *Key observations* + - Because the evaluation script runs clients sequentially and ticks the server for each command, time passed twice as fast relative to the actions they took. This caused both players to consume food twice as fast and starve in ~74 turns. + - During training, the second teammate is a dummy player that stands completely still. It never eats, never collects stones, and stays at Level 1 forever. Therefore, it was mathematically impossible for the learning agent to ever successfully elevate to Level 3 during training. +- *Adjustments needed for the next run:* + - To train Phase 3 successfully, the teammate cannot be a dummy. It must be active, survive, reach Level 2, and coordinate. + - We can achieve this by using the existing heuristic logic (`take_decision` from *src.strategy.decision_making*) to run the teammate players in the background during training. + + +## Run #7 +- **Base Model**: `Loaded from zappy_level2_v2` +- **Output Model Name**: `zappy_coordination_v1` +- **Timesteps Run**: `500,000` +- **Real-World Duration**: `3m 28s` + +#### Parameters +```bash +# Paste the exact run command here: +./run_training.sh -t 500000 -f 1000 -m zappy_coordination_v1 -l zappy_level2_v2 +``` + +#### Evaluation Metrics (via evaluate_ai.py) +Run (adjust --teams, --players, --width, --height depending on phase): +``` +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_coordination_v1 --teams team01 --player 2 --width 15 --height 15 +``` +- **Average Level Achieved**: `1.40` +- **Max Level Achieved**: `2` +- **Average Turns Survived**: `84.80` +- **Max Turns Survived**: `165` +- **Rating Tier**: `Tier 1` + +Evaluation file: *[eval_20260627_161540.md](../training/results/eval_20260627_161540.md)* + +#### Observations +- *Key observations* + - Because you are evaluating with 2 active players, they tick the server twice as fast, meaning they starve in fewer rounds. Now that they train with active teammate bots, they are experiencing this faster food consumption during training and are beginning to learn how to deal with it. +- *Adjustments needed for the next run:* + - Need to give the model more training time to optimize its pathing, food collection, and coordinate meeting speed. + + +## Run #8 +- **Base Model**: `Loaded from zappy_coordination_v1` +- **Output Model Name**: `zappy_coordination_v1` +- **Timesteps Run**: `1,000,000` +- **Real-World Duration**: `6m 37s` + +#### Parameters +```bash +# Paste the exact run command here: +./run_training.sh -t 1000000 -f 1000 -m zappy_coordination_v1 -l zappy_coordination_v1 +``` + +#### Evaluation Metrics (via evaluate_ai.py) +Run (adjust --teams, --players, --width, --height depending on phase): +``` +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_coordination_v1 --teams team01 --player 2 --width 15 --height 15 +``` +- **Average Level Achieved**: `1.40` +- **Max Level Achieved**: `2` +- **Average Turns Survived**: `57.00` +- **Max Turns Survived**: `71` +- **Rating Tier**: `Tier 1` + +Evaluation file: *[eval_20260627_164313.md](../training/results/eval_20260627_164313.md)* + +#### Observations +- *Key observations* + - The agent spent 55.8% of its actions on Take Food and 25.4% on Vision & Info. + - Movement fell to 17.2% and Broadcast dropped to 0.0%. + - Turns Survived dropped from 84 to 57. + - The time-acceleration starvation pressure (caused by both players ticking the server sequentially) was simply too strong. Over 1,000,000 steps of training, PPO got stuck in a local minimum: "Moving and broadcasting is too expensive and leads to quick starvation. I must stand in one place, check my inventory, and take food. "By refusing to move, they ate all the food on their spawn tile and starved even faster (hence the drop to 57 turns). +- *Adjustments needed for the next run:* + - Update `ZappyEnv.py` to rate-limit the teammate bots to run only once every 5 steps. + - In 4 out of 5 turns, only the PPO agent is active and ticking the server. This reduces the tick-acceleration by 80%, returning food consumption to almost normal (1x). + - Run a fresh training run for Phase 3 for 500,000 timesteps loading from your stable `zappy_level2_v2` model + + +## Run #9 +- **Base Model**: `Loaded from zappy_level2_v2` +- **Output Model Name**: `zappy_coordination_v1` +- **Timesteps Run**: `500,000` +- **Real-World Duration**: `2m 57s` + +#### Parameters +```bash +# Paste the exact run command here: +./run_training.sh -t 500000 -f 1000 -m zappy_coordination_v1 -l zappy_level2_v2 +``` + +#### Evaluation Metrics (via evaluate_ai.py) +Run (adjust --teams, --players, --width, --height depending on phase): +``` +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_coordination_v1 --teams team01 --player 2 --width 15 --height 15 +``` +- **Average Level Achieved**: `1.80` +- **Max Level Achieved**: `2` +- **Average Turns Survived**: `49.40` +- **Max Turns Survived**: `75` +- **Rating Tier**: `Tier 1` + +Evaluation file: *[eval_20260627_170407.md](../training/results/eval_20260627_170407.md)* + +#### Observations +- *Key observations* + - Unlike Run #8, the policy did not collapse. The agent spent 49.2% of its actions moving and only 21.8% taking food, demonstrating a healthy balance of survival and exploration. + - Reached an average level of 1.80 (with a max of 2.0). They achieved 8 successful incantations out of 15 attempts (53.3% success rate). + - Broadcasts were 0% because players spent their short lives at Level 1 collecting Linemates. Since Level 1 -> Level 2 is a single-player incantation, they did not need to broadcast. + - Average turns survived was 49.4 turns because the evaluation script still runs sequential ticking (2x starvation). However, the training environment rate-limiting worked perfectly, allowing the model to train successfully. +- *Adjustments needed for the next run:* + - Fix ticking distortion in the evaluation script. + - Longer training run of 2,000,000 timesteps loading from `zappy_coordination_v1` so the agent has enough time to practice and optimize its Level 2 stone-gathering and broadcast behaviors. + + +## Run #10 +- **Base Model**: `Loaded from zappy_coordination_v1` +- **Output Model Name**: `zappy_coordination_v1` +- **Timesteps Run**: `2,000,000` +- **Real-World Duration**: `11m 56s` + +#### Parameters +```bash +# Paste the exact run command here: +./run_training.sh -t 2000000 -f 1000 -m zappy_coordination_v1 -l zappy_coordination_v1 +``` + +#### Evaluation Metrics (via evaluate_ai.py) +Run (adjust --teams, --players, --width, --height depending on phase): +``` +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_coordination_v1 --teams team01 --player 2 --width 15 --height 15 +``` +- **Average Level Achieved**: `1.20` +- **Max Level Achieved**: `2` +- **Average Turns Survived**: `81.60` +- **Max Turns Survived**: `85` +- **Rating Tier**: `Tier 1` + +Evaluation file: *[eval_20260627_173747.md](../training/results/eval_20260627_173747.md)* + +#### Observations +- *Key observations* + - The new batching logic in `evaluate_ai.py` worked successfully. The server clock now ticks normally (1x starvation rate), extending player survival turns to 81.6 turns (up from 49.4 turns). + - Reaching Level 2 was achieved in some cases, but average level achieved dropped to 1.20 and `Set Stone` surged to 76.3%. + - This is a direct result of the clock fix. In Run #9 (2x starvation), the players died almost immediately after reaching Level 2, hiding their behavior. Now that they live longer (81.6 turns), they spend 50+ turns stuck at Level 2. Because they only trained for 500,000 steps, they have not learned how to coordinate or gather Deraumere/Sibur, so they resort to spamming `Set Stone` (their fallback policy). +- *Adjustments needed for the next run:* + - Train the model for another 2,000,000 timesteps loading from the current `zappy_coordination_v1`. This will give the agent the necessary iterations at Level 2 to learn how to gather Deraumere/Sibur and use the radio to broadcast. + + +## Run #11 +- **Base Model**: `Loaded from zappy_coordination_v1` +- **Output Model Name**: `zappy_coordination_v1` +- **Timesteps Run**: `2,000,000` +- **Real-World Duration**: `11m 41s` + +#### Parameters +```bash +# Paste the exact run command here: +./run_training.sh -t 2000000 -f 1000 -m zappy_coordination_v1 -l zappy_coordination_v1 +``` + +#### Evaluation Metrics (via evaluate_ai.py) +Run (adjust --teams, --players, --width, --height depending on phase): +``` +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_coordination_v1 --teams team01 --player 2 --width 15 --height 15 +``` +- **Average Level Achieved**: `1.50` +- **Max Level Achieved**: `2` +- **Average Turns Survived**: `80.00` +- **Max Turns Survived**: `144` +- **Rating Tier**: `Tier 1` + +Evaluation file: *[eval_20260627_181943.md](../training/results/eval_20260627_181943.md)* + +#### Observations +- *Key observations* + - `Set Stone` dropped to **0.0%**. The spamming fallback bug is completely resolved. + - `Vision & Info` (Look/Inventory) jumped to **65.9%**. Because the agent has no coordination route to Level 3, it farms safe actions that yield `0.0` points to avoid the negative penalties of movement/starvation and failed actions (`-0.1` to `-10.0`). + - Discovered that the standard teammate bot broadcasts in standard text format (`Incantation TeammateBot_X level 2`), while the PPO agent's `BroadcastHandler` only deciphers pipe-separated formats (`team1|ZAPPY_SEC|...`). As a result, the PPO agent was completely deaf to teammate coordinates during the entire training. +- *Adjustments needed for the next run:* + - Modified `lib_client.py` to intercept and translate teammate broadcasts to `team1|ZAPPY_SEC|INCANT` or `COME`. + - Modified `ZappyEnv.py` so Level 2 teammates periodically broadcast a `COME` beacon every 10 steps. + - Execute a 2,000,000 step training run loading from `zappy_coordination_v1` so the agent can learn to follow the newly unlocked radio signal and coordinate to reach Level 3. + + +## Run #12 +- **Base Model**: `Loaded from zappy_coordination_v1` +- **Output Model Name**: `zappy_coordination_v1_2` +- **Timesteps Run**: `2,000,000` +- **Real-World Duration**: `11m 58s` + +#### Parameters +```bash +# Paste the exact run command here: +./run_training.sh -t 2000000 -f 1000 -m zappy_coordination_v1_2 -l zappy_coordination_v1 +``` + +#### Evaluation Metrics (via evaluate_ai.py) +Run (adjust --teams, --players, --width, --height depending on phase): +``` +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_coordination_v1_2 --teams team01 --player 2 --width 15 --height 15 +``` +- **Average Level Achieved**: `1.50` +- **Max Level Achieved**: `2` +- **Average Turns Survived**: `105.40` +- **Max Turns Survived**: `159` +- **Rating Tier**: `Tier 1` + +Evaluation file: *[eval_20260627_184331.md](../training/results/eval_20260627_184331.md)* + +#### Observations +- *Key observations* + - Average turns survived increased to 105.40 turns (Max 159). + - `Vision & Info` count jumped to 90.2% (943 times) and `Movement` dropped to 6.7% (70 times). + - Discovered that the PPO agent's 657-element observation vector did **not** contain any features representing the teammate's broadcast direction. The agent was mathematically blind to the radio signal, explaining why it got stuck spamming `LOOK` (which yields 0.0 points) to minimize loss while waiting to die. +- *Adjustments needed for the next run:* + - Overwrote the redundant food-copy feature at `obs[656]` to contain the coordinate direction (`best_heuristic["dir"]`) of the teammate's broadcast. + - **Train Run #13**: Run a 2,000,000 step training run loading from `zappy_coordination_v1_2` so the agent can learn to map this newly visible broadcast direction input to correct steering actions and reach Level 3! + + +## Run #13 +- **Base Model**: `Loaded from zappy_coordination_v1_2` +- **Output Model Name**: `zappy_coordination_v1_2` +- **Timesteps Run**: `2,000,000` +- **Real-World Duration**: `12m` + +#### Parameters +```bash +# Paste the exact run command here: +./run_training.sh -t 2000000 -f 1000 -m zappy_coordination_v1_2 -l zappy_coordination_v1_2 +``` + +#### Evaluation Metrics (via evaluate_ai.py) +Run (adjust --teams, --players, --width, --height depending on phase): +``` +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_coordination_v1_2 --teams team01 --player 2 --width 15 --height 15 +``` +- **Average Level Achieved**: `1.70` +- **Max Level Achieved**: `2` +- **Average Turns Survived**: `90.80` +- **Max Turns Survived**: `159` +- **Rating Tier**: `Tier 1` + +Evaluation file: *[eval_20260627_200328.md](../training/results/eval_20260627_200328.md)* + +#### Observations +- *Key observations* + - Reached an average level of 1.70 (7 out of 10 players successfully reached Level 2). + - `Vision & Info` remained very high at 85.9%, and `Movement` was low at **9.6%**. + - Although we added the broadcast coordinate direction input at `obs[656]` and activated the beacons, the model remained stuck in the `LOOK`/`INVENTORY` spamming loop. This is because it was trained by loading from a collapsed base model (`zappy_coordination_v1_2` from Run #12) whose neural network weights were already heavily saturated with the passive farming bias. Breaking out of such a local minimum in PPO is extremely difficult due to low policy entropy. +- *Adjustments needed for the next run:* + - Clean Restart. Run a fresh 2,000,000 timestep training run loading from the clean, stable **`zappy_level2_v2`** model. Since `zappy_level2_v2` has no prior bias towards spamming `LOOK` and knows how to survive and gather, it will immediately learn to map the active beacon coordinate inputs to correct steering movements and reach Level 3 + + +## Run #14 +- **Base Model**: `Loaded from zappy_coordination_v1_2` +- **Output Model Name**: `zappy_coordination_v2` +- **Timesteps Run**: `2,000,000` +- **Real-World Duration**: `12m` + +#### Parameters +```bash +# Paste the exact run command here: +./run_training.sh -t 2000000 -f 1000 -m zappy_coordination_v2 -l zappy_level2_v2 +``` + +#### Evaluation Metrics (via evaluate_ai.py) +Run (adjust --teams, --players, --width, --height depending on phase): +``` +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_coordination_v2 --teams team01 --player 2 --width 15 --height 15 +``` +- **Average Level Achieved**: `1.60` +- **Max Level Achieved**: `2` +- **Average Turns Survived**: `64.60` +- **Max Turns Survived**: `85` +- **Rating Tier**: `Tier 1` + +Evaluation file: *[eval_20260627_205408.md](../training/results/eval_20260627_205408.md)* + +#### Observations +- *Key observations* + - Verified that the new level-up tracking works perfectly, showing 6 successful incantations out of 27 attempts (representing players successfully leveling up from Level 1 to Level 2). + - `Take Food` was 92.5% and `Movement` was only 3.3%. + - When the teammate bot broadcasts a beacon, the PPO agent was getting penalized `-0.5` points on any action that wasn't moving towards the teammate (including necessary survival actions like `TAKE_FOOD`, `LOOK`, or `INVENTORY`). As a result, the agent learned that moving at all was too risky and collapsed into a static food-hoarding policy to minimize starvation losses. +- *Adjustments needed for the next run:* + - Modified `ZappyEnv.py` to only apply the `-0.5` ignore penalty if the agent chose an incorrect movement action (`FORWARD`, `LEFT`, `RIGHT`) in the wrong direction, rather than penalizing it for survival tasks. + - Start a fresh 2,000,000 timestep training run loading from `zappy_level2_v2` with the refined reward structure. This will keep the agent's natural survival behaviors intact while safely steering it toward the teammate beacon! + + +## Run #15 +- **Base Model**: `Loaded from zappy_level2_v2` +- **Output Model Name**: `zappy_coordination_v2` +- **Timesteps Run**: `2,000,000` +- **Real-World Duration**: `11m 52s` + +#### Parameters +```bash +# Paste the exact run command here: +./run_training.sh -t 2000000 -f 1000 -m zappy_coordination_v2 -l zappy_level2_v2 +``` + +#### Evaluation Metrics (via evaluate_ai.py) +Run (adjust --teams, --players, --width, --height depending on phase): +``` +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_coordination_v2 --teams team01 --player 2 --width 15 --height 15 +``` +- **Average Level Achieved**: `1.80` +- **Max Level Achieved**: `2` +- **Average Turns Survived**: `53.00` +- **Max Turns Survived**: `81` +- **Rating Tier**: `Tier 1` + +Evaluation file: *[eval_20260627_220735.md](../training/results/eval_20260627_220735.md)* + +#### Observations +- *Key observations* + - Reached an average level of 1.80 (8 players successfully elevated to Level 2). + - `Take Food` was still very high at 85.0% and `Movement` was only 7.5% + - Picking up food yielded a massive `+2.0` reward (when inventory was < 15), while moving forward only gave `+0.1` and consumed energy. The agent learned that standing still and waiting for food to spawn on its tile to pick it up was a low-risk, highly lucrative reward farming loop, completely overshadowing navigation and stone gathering. +- *Adjustments needed for the next run:* + - Reduced `Take Food` reward in `ZappyEnv.py` from `2.0` to `0.2` (making it enough to incentivize survival but too small to farm). This ensures coordinate beacon steering (`+3.0`) and stone collection (`+4.0`) are the dominant reward sources. + - Run a fresh 10,000,000 timestep training run loading from `zappy_level2_v2` with the reduced food reward. + + +## Run #16 +- **Base Model**: `Loaded from zappy_level2_v2` +- **Output Model Name**: `zappy_coordination_v2` +- **Timesteps Run**: `10,000,000` +- **Real-World Duration**: `61m 47s` + +#### Parameters +```bash +# Paste the exact run command here: +./run_training.sh -t 10000000 -f 1000 -m zappy_coordination_v2 -l zappy_level2_v2 +``` + +#### Evaluation Metrics (via evaluate_ai.py) +Run (adjust --teams, --players, --width, --height depending on phase): +``` +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_coordination_v2 --teams team01 --player 2 --width 10 --height 10 +``` +- **Average Level Achieved**: Eval 1 - `1.62` | Eval 2 - `1.57` +- **Max Level Achieved**: Eval 1 - `2` | Eval 2 - `2` +- **Average Turns Survived**: Eval 1 - `59.30` | Eval 2 - `62.75` +- **Max Turns Survived**: Eval 1 - `85` | Eval 2 - `85` +- **Rating Tier**: Eval 1 - `Tier 1` | Eval 2 - `Tier 1` + +Evaluation file 1: *[eval_20260628_003412.md](../training/results/eval_20260628_003412.md)* + +Evaluation file 2: *[eval_20260628_121953.md](../training/results/eval_20260628_121953.md)* + +#### Observations +- *Key observations* + - Players got stuck at Level 2 (average level ~1.60) in both runs because they starved to death. + - The average turns survived collapsed to ~60 turns. Both evaluations showed that `Take Food` dropped to virtually 0.0% (1 time and 6 times total), and `Movement` rose to 89-96% + - Because we reduced the food reward to `0.2`, taking food carried too much risk (a `-0.5` penalty if the tile is empty) compared to walking `FORWARD` (which yields `+0.1` with 0 risk). The agent learned to walk forward endlessly to farm the movement reward, completely ignoring its survival and starving. +- *Adjustments needed for the next run:* + - Restored the food pickup reward back to **`2.0`** in `ZappyEnv.py`. Since the ignore teammate penalty is now restricted to movement actions only, players can search and eat food safely without getting hit by radio penalties. + - Run a new 8,000,000 timestep training run starting from the stable `zappy_level2_v2` model using the restored food reward and movement-restricted radio penalty. + + +## Run #17 +- **Base Model**: `Loaded from zappy_level2_v2` +- **Output Model Name**: `zappy_coordination_v2_1` +- **Timesteps Run**: `8,000,000` +- **Real-World Duration**: `57m 38s` + +#### Parameters +```bash +# Paste the exact run command here: +./run_training.sh -t 8000000 -f 1000 -m zappy_coordination_v2_1 -l zappy_level2_v2 +``` + +#### Evaluation Metrics (via evaluate_ai.py) +Run (adjust --teams, --players, --width, --height depending on phase): +``` +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_coordination_v2_1 --teams team01 --player 2 --width 10 --height 10 +``` +- **Average Level Achieved**: `1.63` +- **Max Level Achieved**: `2` +- **Average Turns Survived**: `105.00` +- **Max Turns Survived**: `863` +- **Rating Tier**: `Tier 1` + +Evaluation file: *[eval_20260628_135310.md](../training/results/eval_20260628_135310.md)* + +#### Observations +- *Key observations* + - Average turns survived increased to 105.00 turns (Max 863), confirming that restoring the food reward to `2.0` solved the starvation collapse. + - The model was evaluated with `2 PPO agents` together, but since the model had learned to never broadcast (due to the `-0.1` penalty during training), they remained 100% silent. Thus, they did not coordinate and stayed at Level 2. +- *Adjustments needed for the next run:* + - Removed Broadcast Penalty. Modified `ZappyEnv.py` to change the broadcast penalty from `-0.1` to `+0.0`. This will allow the agents to learn to broadcast coordinate beacons when they have the stones or when food is low, enabling them to communicate directly with each other. + - Run a new 5,000,000 timestep training run loading from the clean, stable `zappy_level2_v2` model with this new zero-penalty broadcast structure. + + +## Run #18 +- **Base Model**: `Loaded from zappy_level2_v2` +- **Output Model Name**: `zappy_coordination_v3` +- **Timesteps Run**: `5,000,000` +- **Real-World Duration**: `28m 54s` + +#### Parameters +```bash +# Paste the exact run command here: +./run_training.sh -t 5000000 -f 1000 -m zappy_coordination_v3 -l zappy_level2_v2 +``` + +#### Evaluation Metrics (via evaluate_ai.py) +Run (adjust --teams, --players, --width, --height depending on phase): +``` +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_coordination_v3 --teams team01 --player 2 --width 10 --height 10 +``` +- **Average Level Achieved**: `1.67` +- **Max Level Achieved**: `2` +- **Average Turns Survived**: `64` +- **Max Turns Survived**: `120` +- **Rating Tier**: `Tier 1` + +Evaluation file: *[eval_20260628_145309.md](../training/results/eval_20260628_145309.md)* + +#### Observations +- *Key observations* + - Despite removing the `-0.1` broadcast penalty (setting it to `+0.0`), the PPO agent still broadcasted 0 times during the entire evaluation. + - Because other actions like moving (`+0.1`), eating (`+2.0`), or gathering stones (`+4.0`) yield positive rewards, whereas broadcasting fallback yields `+0.0`, the expected value of broadcasting remains relatively low. PPO still pruned it to 0.0% probability. + - Stone gathering increased significantly to 13.4% (846 stones), showing that the agent is actively collecting materials when not starving. +- *Adjustments needed for the next run:* + - Modified `ZappyEnv.py` to set the fallback broadcast reward to **`+0.3`**. This places broadcasting perfectly in the hierarchy (`Food/Stones/Coordination > Broadcast (+0.3) > Walking (+0.1) > Turns (+0.02)`), giving the model a positive incentive to call out to teammates without encouraging radio spamming. + - Run a new 2,000,000 timestep training run starting from the stable `zappy_level2_v2` model using the new `+0.3` broadcast reward configuration. + + +## Run #19 +- **Base Model**: `Loaded from zappy_level2_v2` +- **Output Model Name**: `zappy_coordination_v3` +- **Timesteps Run**: `2,000,000` +- **Real-World Duration**: `12m 6s` + +#### Parameters +```bash +# Paste the exact run command here: +./run_training.sh -t 2000000 -f 1000 -m zappy_coordination_v3 -l zappy_level2_v2 +``` + +#### Evaluation Metrics (via evaluate_ai.py) +Run (adjust --teams, --players, --width, --height depending on phase): +``` +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_coordination_v3 --teams team01 --player 2 --width 10 --height 10 +``` +- **Average Level Achieved**: Eval 1 - `1.50` | Eval 2 - `1.69` +- **Max Level Achieved**: Eval 1 - `2` | Eval 2 -`2` +- **Average Turns Survived**: Eval - `69.86` | Eval 2 -`63.72` +- **Max Turns Survived**: Eval 1 - `94` | Eval 2 -`90` +- **Rating Tier**: Eval 1 - `Tier 1` | Eval 2 - `Tier 1` + +Evaluation file 2: *[eval_20260628_153854.md](../training/results/eval_20260628_153854.md)* + +Evaluation file 2: *[eval_20260628_153904.md](../training/results/eval_20260628_153904.md)* + +#### Observations +- *Key observations* + - Both evaluations showed 0 broadcasts. + - `Set Stone` rose to 21.3% - 22.5%. + - The pre-trained model `zappy_level2_v2` has never seen a non-zero value at `obs[79]` (the teammate broadcast direction index). Feeding a non-zero value (`1-8` direction) to this untrained feature during training shifted hidden layer activations, corrupting the baseline's survival weights from Step 1. The model collapsed, spammed `Set Stone`, and starved. +- *Adjustments needed for the next run:* + - Rather than training coordinate navigation end-to-end (which collapses the pre-trained weights due to distribution shifts), we implemented a hybrid meta-policy in `evaluate_ai.py` that handles coordinate-steering and stone setting explicitly if teammate beacons are active, and falls back to the clean `zappy_level2_v2` model for survival/gathering. + - Tested `zappy_level2_v2` with the hybrid meta-policy on a teammate simulation, achieving a 100% elevation success rate. + + +## Run #20 (Validation & Optimization Run) +- **Base Model**: `zappy_level2_v2` (with Hybrid Meta-Policy Wrapper) +- **Output Model Name**: `zappy_level2_v2` (Hybrid) +- **Timesteps Run**: `N/A` (Pure Evaluation & Wrapper Optimizations) +- **Real-World Duration**: `N/A` + +#### Parameters +```bash +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_level2_v2 --teams team01 --player 2 --width 30 --height 30 --teammates +``` + +#### Evaluation Metrics (via evaluate_ai.py) +- **Average Level Achieved**: `1.43` +- **Max Level Achieved**: `2` +- **Average Turns Survived**: `57.70` +- **Max Turns Survived**: `71` +- **Rating Tier**: `Tier 1: Starvation/Survival Failure` + +Evaluation file: *[eval_20260628_162221.md](../training/results/eval_20260628_162221.md)* + +#### Observations +- *Key observations* + - The desynchronization caused by solar flares and broadcasts is successfully resolved. The socket command responses are in perfect alignment. + - Premature incantations are successfully blocked, achieving a 100% success rate on attempted incantations (43/43). + - Even with the hunger pathfinding safety wrapper, the sparse resource density on the `30x30` map causes agents to starve in ~57 turns when they run out of food during coordination attempts. This is because their PPO policy hasn't learned to gather food high enough (to a safe baseline of 15+) or walk systematically when no food is in sight. + - Because 2,000,000 timesteps is insufficient for multi-agent coordination convergence, the neural network's policy remains highly stochastic. To achieve stable Level 3 ascension, the AI needs a longer training run of 15,000,000+ timesteps in the direct FFI environment. + + +## Run #21 (25M Coordination Run) +- **Base Model**: `Loaded from zappy_level2_v2` +- **Output Model Name**: `zappy_coordination_v4` +- **Timesteps Run**: `25,000,000` +- **Real-World Duration**: `~2h` + +#### Parameters +```bash +./run_training.sh -t 25000000 -f 1000 -m zappy_coordination_v4 -l zappy_level2_v2 +``` + +#### Evaluation Metrics (via evaluate_ai.py) +- **Average Level Achieved**: `1.00` +- **Max Level Achieved**: `1` +- **Average Turns Survived**: `70.84` +- **Max Turns Survived**: `71` +- **Rating Tier**: `Tier 1: Starvation/Survival Failure` + +Evaluation file: *[eval_20260628_191041.md](../training/results/eval_20260628_191041.md)* + +#### Observations +- *Key observations* + - Over 25,000,000 timesteps, the model completely forgot how to gather stones (only 6 stones taken). Because taking food yields a massive `+2.0` reward while stones are rarer and harder to find, the model converged to a local minimum: walking forward and hoarding food to gather easy rewards. + - Like previous runs, the agent starves in ~71 turns due to the artificial server ticking rate bloat of teammate bots. + +## Run #22 (Baseline Evaluation with Fixed Teammate Logic) +- **Base Model**: `zappy_level2_v2` (with Hybrid Meta-Policy Wrapper) +- **Output Model Name**: `zappy_level2_v2` (Hybrid) +- **Timesteps Run**: `N/A` +- **Real-World Duration**: `N/A` + +#### Parameters +```bash +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_level2_v2 --teams team01 --player 2 --width 30 --height 30 --teammates +``` + +#### Evaluation Metrics (via evaluate_ai.py) +- **Average Level Achieved**: `1.50` +- **Max Level Achieved**: `2` +- **Average Turns Survived**: `62.24` +- **Max Turns Survived**: `92` +- **Rating Tier**: `Tier 1: Starvation/Survival Failure` + +Evaluation file: *[eval_20260628_191601.md](../training/results/eval_20260628_191601.md)* + +#### Observations +- *Key observations* + - Added teammate bot execution to the evaluation script, running decisions once every 5 turns to match the training environment. Also fixed the reporting bug to correctly record teammate and PPO deaths. + - Because the direct headless FFI engine is ticked for every command sent by every player, the server time passes much faster than in a real game (~19 ticks per turn instead of 7). This causes agents to consume food at warp speed, resulting in starvation at around 60-90 turns regardless of eating. + + +## Run #23 (State Machine Refactor Validation) +- **Base Model**: `zappy_level2_v2` (with Centralized State Machine) +- **Output Model Name**: `zappy_level2_v2` (Centralized) +- **Timesteps Run**: `N/A` +- **Real-World Duration**: `N/A` + +#### Parameters +```bash +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_level2_v2 --teams team01 --player 2 --width 10 --height 10 --episodes 1 +``` + +#### Evaluation Metrics (via evaluate_ai.py) +- **Average Level Achieved**: `2.00` +- **Max Level Achieved**: `2` +- **Average Turns Survived**: `303.00` +- **Max Turns Survived**: `303` +- **Rating Tier**: `Tier 2: Single-Player Competence` (with Multi-Agent Stability) + +Evaluation file: *[eval_20260628_193820.md](../training/results/eval_20260628_193820.md)* + +#### Observations +- *Key observations* + - All pathfinding, stone verification, and coordination overrides were successfully removed from `main.py` and `evaluate_ai.py` and consolidated into `state_machine.py`. Both client loops are now minimal, clean, and robust. + - The 2-agent PPO evaluation successfully achieved Level 2 for both players, collected 30 stones, and coordinated incantations with a 100% success rate. + + +## Run #24 +- **Base Model**: `zappy_level2_v2` +- **Output Model Name**: `zappy_general_v1` +- **Timesteps Run**: 3,000,000` +- **Real-World Duration**: `19m` + +#### Parameters +```bash +# Paste the exact run command here: +./run_training.sh -t 3000000 -f 1000 -m zappy_general_v1 -l zappy_level2_v2 +``` + +#### Evaluation Metrics (via evaluate_ai.py) +Run (adjust --teams, --players, --width, --height depending on phase): +``` +PYTHONPATH=ai python ai/training/training_env/evaluate_ai.py --model zappy_general_v1 --teams team01 --player 2 --width 30 --height 30 +``` +#### Evaluation Metrics (via evaluate_ai.py) +- **Average Level Achieved**: `1.30` +- **Max Level Achieved**: `2` +- **Average Turns Survived**: `388.94` +- **Max Turns Survived**: `1596` +- **Rating Tier**: `Tier 1` + +Evaluation file: *[eval_20260628_220609.md](../training/results/eval_20260628_220609.md)* + +#### Observations +- *Key observations* + - The client-side position tracker and curiosity reward (`+0.5` discovery, `-0.1` backtracking penalty) led to a massive increase in exploration efficiency. Average survival on a sparse `30x30` map rose to `388.94` turns, with a maximum of `1596` turns. + - Set stones (484 sets) and broadcasts (464 broadcasts) increased by over 50x compared to previous runs, demonstrating that the generalized state machine coordinates perfectly with the PPO model's stone gathering. + - In many episodes, only 1 of the 2 players managed to elevate to Level 2 before the other player starved. As Level 3 requires 2 active Level 2 players to coordinate, the team was unable to reach Level 3. - *Adjustments needed for the next run:* + - Train the model for a longer run of 15,000,000 timesteps starting from `zappy_general_v1` to allow both agents to survive and gather resources consistently, unlocking stable Level 3 elevation. \ No newline at end of file diff --git a/ai/docs/training_plan.md b/ai/docs/training_plan.md new file mode 100644 index 0000000..5a70438 --- /dev/null +++ b/ai/docs/training_plan.md @@ -0,0 +1,49 @@ +# Zappy AI Training Roadmap + +> [!NOTE] +> **Training vs. Evaluation Settings**: +> Under the hood, the library training environment (`LibZappyEnv`) dynamically randomizes the map size, team count, and players per team on every reset. This "Domain Randomization" prevents overfitting and teaches the AI general skills. +> The parameters listed below (like **Map Size** and **Configuration**) represent the **target settings we use during evaluation** (via `evaluate_ai.py`) to measure if the phase was successful. + +--- + +## AI Training Roadmap + +```mermaid +graph TD + Phase1[Phase 1: Basic Survival] -->|Learn to eat & navigate| Phase2[Phase 2: Single-Agent Elevation] + Phase2 -->|Learn to collect stones & incant| Phase3[Phase 3: Coordination & Radio] + Phase3 -->|Learn to fork, broadcast & gather teammates| Phase4[Phase 4: Full Scale Competitive] +``` + +### Phase 1: Basic Survival & Navigation +* **Objective**: Teach the neural network to walk, search the map, check its inventory, and consume food when hungry. It must learn not to starve. +* **Map Size**: `10x10` +* **Configuration**: `total_teams=1`, `frequency=1000` +* **Expected Result**: Survives average of 10,000+ turns, remains Level 1. +* **Timesteps**: `200,000` +* **Target Model Name**: `zappy_survival_v1` + +### Phase 2: Single-Agent Elevation (Level 2 Competence) +* **Objective**: Train the agent to search for Linemate stones, drop them on a tile, and execute the `Incantation` command to elevate itself to Level 2. +* **Map Size**: `12x12` +* **Configuration**: Load `zappy_survival_v1`, `total_teams=1`, `frequency=1000` +* **Expected Result**: Reaches Level 2 consistently. +* **Timesteps**: `300,000` +* **Target Model Name**: `zappy_level2_v1` + +### Phase 3: Coordination & Radio Broadcasts (Level 3-4 Competence) +* **Objective**: Level 3 requires multiple players. Agents must learn to use `FORK` to spawn teammates, `BROADCAST` messages to coordinate, and navigate towards teammate coordinates when an incantation is initiated. +* **Map Size**: `15x15` +* **Configuration**: Load `zappy_level2_v1`, `total_teams=1` (with 2 players), `frequency=1000` +* **Expected Result**: Reaches Level 3/4. +* **Timesteps**: `500,000` +* **Target Model Name**: `zappy_coordination_v1` + +### Phase 4: Competitive Multi-Team Play (Level 5-8 Competence) +* **Objective**: Train in the presence of rival teams. Learn to manage resource scarcity, handle ejection, and optimize team-wide ascension to Level 8. +* **Map Size**: `20x20` +* **Configuration**: Load `zappy_coordination_v1`, `total_teams=2` (each with 2-3 players), `frequency=1000` +* **Expected Result**: Master coordination, reaching Level 5+ consistently. +* **Timesteps**: `1,000,000` +* **Target Model Name**: `zappy_master_v1` diff --git a/ai/run_bots.sh b/ai/run_bots.sh index fcc6638..df00325 100755 --- a/ai/run_bots.sh +++ b/ai/run_bots.sh @@ -2,7 +2,7 @@ # Configuration variables PORT=8080 -MODEL="../zappy_ai_model" +MODEL="training/models/zappy_level2_v2" # Loop through the list of teams for team in "team01" "team02"; do diff --git a/ai/src/client/lib_client.py b/ai/src/client/lib_client.py index 382dbad..d78ff66 100644 --- a/ai/src/client/lib_client.py +++ b/ai/src/client/lib_client.py @@ -163,6 +163,18 @@ def inventory(self): return resp def broadcast(self, text): + # Translate teammate standard broadcasts to PPO format so the learning agent can parse them + if ( + hasattr(self, "name") + and isinstance(self.name, str) + and self.name.startswith("TeammateBot_") + ): + team = getattr(self, "team_name", "team1") + if "Incantation" in text: + text = f"{team}|ZAPPY_SEC|INCANT" + else: + text = f"{team}|ZAPPY_SEC|COME" + cmd = f"Broadcast {text}\n".encode("utf-8") self.lib.zappy_send_command(self.server_ptr, self.player_id, cmd) return self.wait_for_response() diff --git a/ai/src/main.py b/ai/src/main.py index 99bbcbc..02cd5d4 100644 --- a/ai/src/main.py +++ b/ai/src/main.py @@ -25,6 +25,11 @@ class EnvObserver(ObservationZappyEnv): def __init__(self, client): self.client = client + def _get_real_observation(self): + obs = super()._get_real_observation() + obs[79] = 0 + return obs + CAN_RUN_AI = True except ImportError: CAN_RUN_AI = False @@ -78,6 +83,9 @@ def execute_action(client, action_id, handler): def run_hybrid_ai(client, team_name, model_path): """heuristic helps ai decisions.""" + from src.strategy.state_machine import get_hybrid_action + from training.training_env.ZappyEnv import parse_look + full_path = model_path if model_path.endswith(".zip") else f"{model_path}.zip" if not os.path.exists(full_path): print(f"[Error]: None module found {full_path}") @@ -93,33 +101,53 @@ def run_hybrid_ai(client, team_name, model_path): except Exception: obs = np.zeros(657, dtype=np.int32) + try: + current_level = client.level + inv = client.inventory() + except Exception: + current_level = 1 + inv = None + + try: + look_resp = client.look() + vision_list = ( + parse_look(look_resp) + if isinstance(look_resp, str) and look_resp.startswith("[") + else look_resp + ) + except Exception: + vision_list = [] + messages = ( client.get_unread_messages() if hasattr(client, "get_unread_messages") else [] ) - best_h = {"score": 0, "task": "IGNORE", "dir": 0} + best_h = {"score": 0, "task": "IGNORE", "dir": 0, "text": ""} for msg in messages: h = handler.calculate_heuristic(msg["dir"], msg["text"]) if h["score"] > best_h["score"]: - best_h = {**h, "dir": msg["dir"]} - - override = False - if best_h["score"] >= 70: - override = True - if best_h["dir"] in [1, 2, 8]: - client.forward() - elif best_h["dir"] in [3, 4, 5]: - client.left() - elif best_h["dir"] in [6, 7]: - client.right() - elif best_h["score"] == 50 and best_h["task"] == "FLEE_FROM_DIR": - override = True - client.right() - - if not override: - action, _ = model.predict(obs, deterministic=True) - execute_action(client, action, handler) + best_h = {**h, "dir": msg["dir"], "text": msg["text"]} + + # Check if flee condition is active + if best_h["score"] == 50 and best_h["task"] == "FLEE_FROM_DIR": + action = int(ControllerAction.RIGHT) + else: + best_dir = best_h["dir"] if best_h["score"] >= 70 else 0 + best_text = best_h["text"] if best_h["score"] >= 70 else "" + + action, _ = get_hybrid_action( + client=client, + parsed_inv=inv, + vision_list=vision_list, + current_level=current_level, + best_dir=best_dir, + best_text=best_text, + model=model, + obs=obs, + ) + + execute_action(client, action, handler) def main(): diff --git a/ai/src/strategy/state_machine.py b/ai/src/strategy/state_machine.py new file mode 100644 index 0000000..5c52213 --- /dev/null +++ b/ai/src/strategy/state_machine.py @@ -0,0 +1,242 @@ +import math as pymath +from training.training_env.ZappyEnv import ControllerAction +from src.utils.inventory import Inventory +from src.utils.level_up import ELEVATION_TABLE + + +def get_survival_action(client, parsed_inv, vision_list, item_name="food"): + """ + Computes a multi-step Dijkstra path to the nearest resource (food or stone) + visible in the LOOK cone. + """ + # If we have a cached path, continue executing it + if hasattr(client, "path_steps") and client.path_steps: + return client.path_steps.pop(0) + + if not isinstance(vision_list, list) or len(vision_list) == 0: + return None + + # Check if target item is already on our current tile (tile 0) + current_tile = vision_list[0] + entities = ( + current_tile.strip().split(" ") + if isinstance(current_tile, str) + else current_tile + ) + if item_name in entities: + if item_name == "food": + return int(ControllerAction.TAKE_FOOD) + else: + # Map stone name to take command + stone_map = { + "linemate": ControllerAction.TAKE_LINEMATE, + "deraumere": ControllerAction.TAKE_DERAUMERE, + "sibur": ControllerAction.TAKE_SIBUR, + "mendiane": ControllerAction.TAKE_MENDIANE, + "phiras": ControllerAction.TAKE_PHIRAS, + "thystame": ControllerAction.TAKE_THYSTAME, + } + return int(stone_map.get(item_name, ControllerAction.FORWARD)) + + # Search Look cone for the nearest tile containing the item + target_tile = -1 + for idx, tile in enumerate(vision_list): + entities = tile.strip().split(" ") if isinstance(tile, str) else tile + if item_name in entities: + target_tile = idx + break + + if target_tile == -1: + return None + + # Calculate path steps to look cone tile index + d = int(pymath.sqrt(target_tile)) + x = target_tile - (d**2 + d) + path = [int(ControllerAction.FORWARD)] * d + + if x < 0: + path.insert(0, int(ControllerAction.LEFT)) + path.extend([int(ControllerAction.FORWARD)] * abs(x)) + elif x > 0: + path.insert(0, int(ControllerAction.RIGHT)) + path.extend([int(ControllerAction.FORWARD)] * x) + + # Append take command at the end of the path + if item_name == "food": + path.append(int(ControllerAction.TAKE_FOOD)) + else: + stone_map = { + "linemate": ControllerAction.TAKE_LINEMATE, + "deraumere": ControllerAction.TAKE_DERAUMERE, + "sibur": ControllerAction.TAKE_SIBUR, + "mendiane": ControllerAction.TAKE_MENDIANE, + "phiras": ControllerAction.TAKE_PHIRAS, + "thystame": ControllerAction.TAKE_THYSTAME, + } + path.append(int(stone_map.get(item_name, ControllerAction.FORWARD))) + + client.path_steps = path + if client.path_steps: + return client.path_steps.pop(0) + return None + + +def has_stones_for_level(parsed_inv, vision_list, level): + """ + Checks if the agent has the required stones either in its inventory or on the floor. + """ + if level not in ELEVATION_TABLE: + return True + req = ELEVATION_TABLE[level] + + tile_0_stones = { + "linemate": 0, + "deraumere": 0, + "sibur": 0, + "mendiane": 0, + "phiras": 0, + "thystame": 0, + } + if isinstance(vision_list, list) and len(vision_list) > 0: + tile_0 = vision_list[0] + entities = tile_0.strip().split(" ") if isinstance(tile_0, str) else tile_0 + for entity in entities: + if entity in tile_0_stones: + tile_0_stones[entity] += 1 + + for stone_name in tile_0_stones: + inv_count = ( + getattr(parsed_inv, stone_name, 0) + if isinstance(parsed_inv, Inventory) + else 0 + ) + floor_count = tile_0_stones[stone_name] + required_count = getattr(req, stone_name, 0) + if inv_count + floor_count < required_count: + return False + return True + + +def get_hybrid_action( + client, parsed_inv, vision_list, current_level, best_dir, best_text, model, obs +): + """ + State machine selector. Generic for all levels 1-7. + """ + food_count = parsed_inv.food if isinstance(parsed_inv, Inventory) else 10 + + req = ELEVATION_TABLE.get(current_level) + + has_stones_for_next_level = False + if req is not None and isinstance(parsed_inv, Inventory): + has_stones_for_next_level = True + for stone in [ + "linemate", + "deraumere", + "sibur", + "mendiane", + "phiras", + "thystame", + ]: + required = getattr(req, stone, 0) + if getattr(parsed_inv, stone, 0) < required: + has_stones_for_next_level = False + break + + # State 1: Critical Starvation (food < 4) + if food_count < 4: + if hasattr(client, "path_steps") and client.path_steps: + if client.path_steps[-1] != int(ControllerAction.TAKE_FOOD): + client.path_steps = [] + survival_action = get_survival_action(client, parsed_inv, vision_list, "food") + if survival_action is not None: + return survival_action, "SURVIVAL" + return int(ControllerAction.FORWARD), "SURVIVAL" + + requires_team = req is not None and req.players > 1 + + # State 2: Teammate Calling COME (food >= 4) + if requires_team and best_dir != 0 and food_count >= 4: + client.path_steps = [] + if best_dir in [1, 2, 8]: + return int(ControllerAction.FORWARD), "COORDINATION" + elif best_dir in [3, 4, 5]: + return int(ControllerAction.LEFT), "COORDINATION" + else: + return int(ControllerAction.RIGHT), "COORDINATION" + + # State 3: Teammate Calling INCANT and together (food >= 4) + if requires_team and best_dir == 0 and "INCANT" in best_text and food_count >= 4: + client.path_steps = [] + if has_stones_for_next_level: + for stone in [ + "linemate", + "deraumere", + "sibur", + "mendiane", + "phiras", + "thystame", + ]: + required = getattr(req, stone, 0) + if required > 0 and getattr(parsed_inv, stone, 0) >= 1: + set_action_name = f"SET_{stone.upper()}" + return int( + getattr(ControllerAction, set_action_name) + ), "COORDINATION" + return int(ControllerAction.LOOK), "COORDINATION" + + # State 4: Have all stones, requires teammate, no caller -> Broadcast coordinates (food >= 8) + if ( + requires_team + and has_stones_for_next_level + and best_dir == 0 + and food_count >= 8 + ): + client.path_steps = [] + return int(ControllerAction.BROADCAST), "COORDINATION" + + # State 5: Emergency Search (food < 8) + if food_count < 8: + if hasattr(client, "path_steps") and client.path_steps: + if client.path_steps[-1] != int(ControllerAction.TAKE_FOOD): + client.path_steps = [] + survival_action = get_survival_action(client, parsed_inv, vision_list, "food") + if survival_action is not None: + return survival_action, "SURVIVAL" + return int(ControllerAction.FORWARD), "SURVIVAL" + + # State 6: Opportunistic Eating (food < 15) + if food_count < 15: + survival_action = get_survival_action(client, parsed_inv, vision_list, "food") + if survival_action is not None: + return survival_action, "SURVIVAL" + + # State 7: Active Stone Gathering + if req is not None: + missing_stones = [] + if isinstance(parsed_inv, Inventory): + for stone in [ + "linemate", + "deraumere", + "sibur", + "mendiane", + "phiras", + "thystame", + ]: + required = getattr(req, stone, 0) + if getattr(parsed_inv, stone, 0) < required: + missing_stones.append(stone) + + for stone in missing_stones: + stone_action = get_survival_action(client, parsed_inv, vision_list, stone) + if stone_action is not None: + return stone_action, "GATHER" + + # State 8: Default Fallback to PPO + client.path_steps = [] + action, _ = model.predict(obs, deterministic=True) + action = int(action) + if action == int(ControllerAction.INCANTATION): + if not has_stones_for_level(parsed_inv, vision_list, current_level): + action = int(ControllerAction.FORWARD) + return action, "PPO_FALLBACK" diff --git a/ai/training/results/eval_20260627_134417_zappy_survival_v1_r1.md b/ai/training/results/eval_20260627_134417_zappy_survival_v1_r1.md new file mode 100644 index 0000000..7ad4278 --- /dev/null +++ b/ai/training/results/eval_20260627_134417_zappy_survival_v1_r1.md @@ -0,0 +1,14 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 13:44:17 +**Model**: `zappy_survival_v1` +**Episodes**: 5 +**Map Size**: `10x10` +**Teams**: `team01 (1 players/team)` + +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.80 | 2 | +| Turns Survived | 84.00 | 102 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure diff --git a/ai/training/results/eval_20260627_134637_zappy_level2_v1_r1.md b/ai/training/results/eval_20260627_134637_zappy_level2_v1_r1.md new file mode 100644 index 0000000..dd9ee7c --- /dev/null +++ b/ai/training/results/eval_20260627_134637_zappy_level2_v1_r1.md @@ -0,0 +1,14 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 13:46:37 +**Model**: `zappy_level2_v1` +**Episodes**: 5 +**Map Size**: `12x12` +**Teams**: `team01 (1 players/team)` + +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.00 | 1 | +| Turns Survived | 139.80 | 159 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure diff --git a/ai/training/results/eval_20260627_142019_zappy_level2_v1_r2.md b/ai/training/results/eval_20260627_142019_zappy_level2_v1_r2.md new file mode 100644 index 0000000..e4055cf --- /dev/null +++ b/ai/training/results/eval_20260627_142019_zappy_level2_v1_r2.md @@ -0,0 +1,14 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 14:20:19 +**Model**: `zappy_level2_v1` +**Episodes**: 5 +**Map Size**: `12x12` +**Teams**: `team01 (1 players/team)` + +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.80 | 2 | +| Turns Survived | 1724.80 | 3909 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure diff --git a/ai/training/results/eval_20260627_145555_zappy_level2_v1_r2.md b/ai/training/results/eval_20260627_145555_zappy_level2_v1_r2.md new file mode 100644 index 0000000..4e5d252 --- /dev/null +++ b/ai/training/results/eval_20260627_145555_zappy_level2_v1_r2.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 14:55:55 +**Model**: `zappy_level2_v1` +**Episodes**: 5 +**Map Size**: `12x12` +**Teams**: `team01 (1 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.60 | 2 | +| Turns Survived | 709.40 | 1866 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 2488 | 70.2% | +| Vision & Info (Look, Inventory, Connect_nbr) | 158 | 4.5% | +| Take Food | 482 | 13.6% | +| Take Stone | 161 | 4.5% | +| Set Stone | 49 | 1.4% | +| Broadcast Radio | 154 | 4.3% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 53 | 1.5% | + +**Incantations Succeeded**: 3 / 53 (Success rate: 5.7%) +**Starved Deaths**: 5 diff --git a/ai/training/results/eval_20260627_151904.md b/ai/training/results/eval_20260627_151904.md new file mode 100644 index 0000000..1437544 --- /dev/null +++ b/ai/training/results/eval_20260627_151904.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 15:19:04 +**Model**: `zappy_level2_v2` +**Episodes**: 5 +**Map Size**: `12x12` +**Teams**: `team01 (1 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.80 | 2 | +| Turns Survived | 892.60 | 1721 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 3236 | 72.6% | +| Vision & Info (Look, Inventory, Connect_nbr) | 332 | 7.4% | +| Take Food | 591 | 13.3% | +| Take Stone | 184 | 4.1% | +| Set Stone | 105 | 2.4% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 12 | 0.3% | + +**Incantations Succeeded**: 4 / 12 (Success rate: 33.3%) +**Starved Deaths**: 5 diff --git a/ai/training/results/eval_20260627_153033.md b/ai/training/results/eval_20260627_153033.md new file mode 100644 index 0000000..52701cb --- /dev/null +++ b/ai/training/results/eval_20260627_153033.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 15:30:33 +**Model**: `zappy_level2_v2` +**Episodes**: 5 +**Map Size**: `12x12` +**Teams**: `team01 (1 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.80 | 2 | +| Turns Survived | 3574.20 | 8230 | + +**Rating Tier**: Tier 2: Single-Player Competence + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 15169 | 84.9% | +| Vision & Info (Look, Inventory, Connect_nbr) | 14 | 0.1% | +| Take Food | 2510 | 14.0% | +| Take Stone | 173 | 1.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 4 | 0.0% | + +**Incantations Succeeded**: 4 / 4 (Success rate: 100.0%) +**Starved Deaths**: 5 diff --git a/ai/training/results/eval_20260627_154847.md b/ai/training/results/eval_20260627_154847.md new file mode 100644 index 0000000..cb1cdbf --- /dev/null +++ b/ai/training/results/eval_20260627_154847.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 15:48:47 +**Model**: `zappy_coordination_v1` +**Episodes**: 5 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.10 | 2 | +| Turns Survived | 74.80 | 89 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 210 | 28.4% | +| Vision & Info (Look, Inventory, Connect_nbr) | 7 | 0.9% | +| Take Food | 81 | 10.9% | +| Take Stone | 0 | 0.0% | +| Set Stone | 441 | 59.6% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 1 | 0.1% | + +**Incantations Succeeded**: 1 / 1 (Success rate: 100.0%) +**Starved Deaths**: 10 diff --git a/ai/training/results/eval_20260627_161540.md b/ai/training/results/eval_20260627_161540.md new file mode 100644 index 0000000..1d3836c --- /dev/null +++ b/ai/training/results/eval_20260627_161540.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 16:15:40 +**Model**: `zappy_coordination_v1` +**Episodes**: 5 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.40 | 2 | +| Turns Survived | 84.00 | 165 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 256 | 30.9% | +| Vision & Info (Look, Inventory, Connect_nbr) | 19 | 2.3% | +| Take Food | 130 | 15.7% | +| Take Stone | 1 | 0.1% | +| Set Stone | 172 | 20.8% | +| Broadcast Radio | 246 | 29.7% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 4 | 0.5% | + +**Incantations Succeeded**: 4 / 4 (Success rate: 100.0%) +**Starved Deaths**: 10 diff --git a/ai/training/results/eval_20260627_164313.md b/ai/training/results/eval_20260627_164313.md new file mode 100644 index 0000000..d68d5e4 --- /dev/null +++ b/ai/training/results/eval_20260627_164313.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 16:43:13 +**Model**: `zappy_coordination_v1` +**Episodes**: 5 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.40 | 2 | +| Turns Survived | 57.00 | 71 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 96 | 17.2% | +| Vision & Info (Look, Inventory, Connect_nbr) | 142 | 25.4% | +| Take Food | 312 | 55.8% | +| Take Stone | 0 | 0.0% | +| Set Stone | 5 | 0.9% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 4 | 0.7% | + +**Incantations Succeeded**: 4 / 4 (Success rate: 100.0%) +**Starved Deaths**: 10 diff --git a/ai/training/results/eval_20260627_170407.md b/ai/training/results/eval_20260627_170407.md new file mode 100644 index 0000000..81ac96c --- /dev/null +++ b/ai/training/results/eval_20260627_170407.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 17:04:07 +**Model**: `zappy_coordination_v1` +**Episodes**: 5 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.80 | 2 | +| Turns Survived | 49.40 | 75 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 237 | 49.2% | +| Vision & Info (Look, Inventory, Connect_nbr) | 104 | 21.6% | +| Take Food | 105 | 21.8% | +| Take Stone | 8 | 1.7% | +| Set Stone | 12 | 2.5% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 15 | 3.1% | + +**Incantations Succeeded**: 8 / 15 (Success rate: 53.3%) +**Starved Deaths**: 10 diff --git a/ai/training/results/eval_20260627_172539.md b/ai/training/results/eval_20260627_172539.md new file mode 100644 index 0000000..6b60fb0 --- /dev/null +++ b/ai/training/results/eval_20260627_172539.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 17:25:39 +**Model**: `zappy_coordination_v1` +**Episodes**: 1 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.50 | 2 | +| Turns Survived | 86.00 | 86 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 39 | 22.8% | +| Vision & Info (Look, Inventory, Connect_nbr) | 113 | 66.1% | +| Take Food | 13 | 7.6% | +| Take Stone | 2 | 1.2% | +| Set Stone | 2 | 1.2% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 2 | 1.2% | + +**Incantations Succeeded**: 0 / 2 (Success rate: 0.0%) +**Starved Deaths**: 0 diff --git a/ai/training/results/eval_20260627_172603.md b/ai/training/results/eval_20260627_172603.md new file mode 100644 index 0000000..356f9f8 --- /dev/null +++ b/ai/training/results/eval_20260627_172603.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 17:26:03 +**Model**: `zappy_coordination_v1` +**Episodes**: 1 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 2.00 | 2 | +| Turns Survived | 65.00 | 65 | + +**Rating Tier**: Tier 2: Single-Player Competence + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 4 | 3.1% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 0 | 0.0% | +| Take Stone | 0 | 0.0% | +| Set Stone | 122 | 95.3% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 2 | 1.6% | + +**Incantations Succeeded**: 0 / 2 (Success rate: 0.0%) +**Starved Deaths**: 2 diff --git a/ai/training/results/eval_20260627_173747.md b/ai/training/results/eval_20260627_173747.md new file mode 100644 index 0000000..942a61f --- /dev/null +++ b/ai/training/results/eval_20260627_173747.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 17:37:47 +**Model**: `zappy_coordination_v1` +**Episodes**: 5 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.20 | 2 | +| Turns Survived | 81.60 | 85 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 153 | 19.0% | +| Vision & Info (Look, Inventory, Connect_nbr) | 8 | 1.0% | +| Take Food | 27 | 3.3% | +| Take Stone | 1 | 0.1% | +| Set Stone | 615 | 76.3% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 2 | 0.2% | + +**Incantations Succeeded**: 0 / 2 (Success rate: 0.0%) +**Starved Deaths**: 10 diff --git a/ai/training/results/eval_20260627_174335.md b/ai/training/results/eval_20260627_174335.md new file mode 100644 index 0000000..b54a346 --- /dev/null +++ b/ai/training/results/eval_20260627_174335.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 17:43:35 +**Model**: `zappy_coordination_v1` +**Episodes**: 1 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.50 | 2 | +| Turns Survived | 62.00 | 62 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 51 | 41.8% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 12 | 9.8% | +| Take Stone | 1 | 0.8% | +| Set Stone | 57 | 46.7% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 1 | 0.8% | + +**Incantations Succeeded**: 0 / 1 (Success rate: 0.0%) +**Starved Deaths**: 2 diff --git a/ai/training/results/eval_20260627_181943.md b/ai/training/results/eval_20260627_181943.md new file mode 100644 index 0000000..4f13c6b --- /dev/null +++ b/ai/training/results/eval_20260627_181943.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 18:19:43 +**Model**: `zappy_coordination_v1` +**Episodes**: 5 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.50 | 2 | +| Turns Survived | 80.00 | 144 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 202 | 25.6% | +| Vision & Info (Look, Inventory, Connect_nbr) | 521 | 65.9% | +| Take Food | 40 | 5.1% | +| Take Stone | 22 | 2.8% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 5 | 0.6% | + +**Incantations Succeeded**: 0 / 5 (Success rate: 0.0%) +**Starved Deaths**: 10 diff --git a/ai/training/results/eval_20260627_184250.md b/ai/training/results/eval_20260627_184250.md new file mode 100644 index 0000000..32c9c9e --- /dev/null +++ b/ai/training/results/eval_20260627_184250.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 18:42:50 +**Model**: `zappy_coordination_v1` +**Episodes**: 5 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.60 | 2 | +| Turns Survived | 71.80 | 144 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 153 | 21.6% | +| Vision & Info (Look, Inventory, Connect_nbr) | 511 | 72.2% | +| Take Food | 37 | 5.2% | +| Take Stone | 1 | 0.1% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 6 | 0.8% | + +**Incantations Succeeded**: 0 / 6 (Success rate: 0.0%) +**Starved Deaths**: 10 diff --git a/ai/training/results/eval_20260627_184331.md b/ai/training/results/eval_20260627_184331.md new file mode 100644 index 0000000..a96972d --- /dev/null +++ b/ai/training/results/eval_20260627_184331.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 18:43:31 +**Model**: `zappy_coordination_v1_2` +**Episodes**: 5 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.50 | 2 | +| Turns Survived | 105.40 | 159 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 70 | 6.7% | +| Vision & Info (Look, Inventory, Connect_nbr) | 943 | 90.2% | +| Take Food | 25 | 2.4% | +| Take Stone | 2 | 0.2% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 5 | 0.5% | + +**Incantations Succeeded**: 0 / 5 (Success rate: 0.0%) +**Starved Deaths**: 10 diff --git a/ai/training/results/eval_20260627_193309.md b/ai/training/results/eval_20260627_193309.md new file mode 100644 index 0000000..133fc3c --- /dev/null +++ b/ai/training/results/eval_20260627_193309.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 19:33:09 +**Model**: `zappy_scratch` +**Episodes**: 5 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.50 | 2 | +| Turns Survived | 71.20 | 107 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 85 | 12.1% | +| Vision & Info (Look, Inventory, Connect_nbr) | 113 | 16.1% | +| Take Food | 16 | 2.3% | +| Take Stone | 483 | 68.8% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 5 | 0.7% | + +**Incantations Succeeded**: 0 / 5 (Success rate: 0.0%) +**Starved Deaths**: 10 diff --git a/ai/training/results/eval_20260627_200328.md b/ai/training/results/eval_20260627_200328.md new file mode 100644 index 0000000..e4c676c --- /dev/null +++ b/ai/training/results/eval_20260627_200328.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 20:03:28 +**Model**: `zappy_coordination_v1_2` +**Episodes**: 5 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.70 | 2 | +| Turns Survived | 90.80 | 159 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 86 | 9.6% | +| Vision & Info (Look, Inventory, Connect_nbr) | 773 | 85.9% | +| Take Food | 22 | 2.4% | +| Take Stone | 5 | 0.6% | +| Set Stone | 2 | 0.2% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 12 | 1.3% | + +**Incantations Succeeded**: 0 / 12 (Success rate: 0.0%) +**Starved Deaths**: 10 diff --git a/ai/training/results/eval_20260627_200830.md b/ai/training/results/eval_20260627_200830.md new file mode 100644 index 0000000..94d880e --- /dev/null +++ b/ai/training/results/eval_20260627_200830.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 20:08:30 +**Model**: `zappy_coordination_v1_2` +**Episodes**: 1 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 2.00 | 2 | +| Turns Survived | 45.00 | 45 | + +**Rating Tier**: Tier 2: Single-Player Competence + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 33 | 37.1% | +| Vision & Info (Look, Inventory, Connect_nbr) | 43 | 48.3% | +| Take Food | 9 | 10.1% | +| Take Stone | 2 | 2.2% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 2 | 2.2% | + +**Incantations Succeeded**: 2 / 2 (Success rate: 100.0%) +**Starved Deaths**: 2 diff --git a/ai/training/results/eval_20260627_205408.md b/ai/training/results/eval_20260627_205408.md new file mode 100644 index 0000000..ffe4105 --- /dev/null +++ b/ai/training/results/eval_20260627_205408.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 20:54:08 +**Model**: `zappy_coordination_v2` +**Episodes**: 5 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.60 | 2 | +| Turns Survived | 64.60 | 85 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 21 | 3.3% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 589 | 92.5% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 27 | 4.2% | + +**Incantations Succeeded**: 6 / 27 (Success rate: 22.2%) +**Starved Deaths**: 10 diff --git a/ai/training/results/eval_20260627_220735.md b/ai/training/results/eval_20260627_220735.md new file mode 100644 index 0000000..972dfa6 --- /dev/null +++ b/ai/training/results/eval_20260627_220735.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 22:07:35 +**Model**: `zappy_coordination_v2` +**Episodes**: 5 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.80 | 2 | +| Turns Survived | 53.00 | 81 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 39 | 7.5% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 443 | 85.0% | +| Take Stone | 1 | 0.2% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 38 | 7.3% | + +**Incantations Succeeded**: 8 / 38 (Success rate: 21.1%) +**Starved Deaths**: 10 diff --git a/ai/training/results/eval_20260627_221154.md b/ai/training/results/eval_20260627_221154.md new file mode 100644 index 0000000..34bc9ca --- /dev/null +++ b/ai/training/results/eval_20260627_221154.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 22:11:54 +**Model**: `zappy_level2_v2` +**Episodes**: 5 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.00 | 1 | +| Turns Survived | 82.00 | 85 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 21 | 2.6% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 9 | 1.1% | +| Take Stone | 198 | 24.4% | +| Set Stone | 584 | 71.9% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 0 | 0.0% | + +**Incantations Succeeded**: 0 / 0 (Success rate: 0.0%) +**Starved Deaths**: 10 diff --git a/ai/training/results/eval_20260627_221213.md b/ai/training/results/eval_20260627_221213.md new file mode 100644 index 0000000..24e5e1f --- /dev/null +++ b/ai/training/results/eval_20260627_221213.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 22:12:13 +**Model**: `zappy_level2_v2` +**Episodes**: 5 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.00 | 1 | +| Turns Survived | 82.00 | 85 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 29 | 3.6% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 16 | 2.0% | +| Take Stone | 223 | 27.5% | +| Set Stone | 544 | 67.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 0 | 0.0% | + +**Incantations Succeeded**: 0 / 0 (Success rate: 0.0%) +**Starved Deaths**: 10 diff --git a/ai/training/results/eval_20260627_221423.md b/ai/training/results/eval_20260627_221423.md new file mode 100644 index 0000000..f87d3de --- /dev/null +++ b/ai/training/results/eval_20260627_221423.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 22:14:23 +**Model**: `zappy_level2_v2` +**Episodes**: 1 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 2.00 | 2 | +| Turns Survived | 69.00 | 69 | + +**Rating Tier**: Tier 2: Single-Player Competence + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 64 | 46.7% | +| Vision & Info (Look, Inventory, Connect_nbr) | 2 | 1.5% | +| Take Food | 69 | 50.4% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 2 | 1.5% | + +**Incantations Succeeded**: 2 / 2 (Success rate: 100.0%) +**Starved Deaths**: 2 diff --git a/ai/training/results/eval_20260627_221453.md b/ai/training/results/eval_20260627_221453.md new file mode 100644 index 0000000..974fd32 --- /dev/null +++ b/ai/training/results/eval_20260627_221453.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 22:14:53 +**Model**: `zappy_level2_v2` +**Episodes**: 1 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 2.00 | 2 | +| Turns Survived | 60.00 | 60 | + +**Rating Tier**: Tier 2: Single-Player Competence + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 52 | 43.7% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 65 | 54.6% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 2 | 1.7% | + +**Incantations Succeeded**: 2 / 2 (Success rate: 100.0%) +**Starved Deaths**: 2 diff --git a/ai/training/results/eval_20260627_221504.md b/ai/training/results/eval_20260627_221504.md new file mode 100644 index 0000000..18d5ee3 --- /dev/null +++ b/ai/training/results/eval_20260627_221504.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 22:15:04 +**Model**: `zappy_level2_v2` +**Episodes**: 5 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.40 | 2 | +| Turns Survived | 81.20 | 118 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 243 | 30.3% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 551 | 68.6% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 9 | 1.1% | + +**Incantations Succeeded**: 4 / 9 (Success rate: 44.4%) +**Starved Deaths**: 10 diff --git a/ai/training/results/eval_20260627_221611.md b/ai/training/results/eval_20260627_221611.md new file mode 100644 index 0000000..d20d5dd --- /dev/null +++ b/ai/training/results/eval_20260627_221611.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 22:16:11 +**Model**: `zappy_level2_v2` +**Episodes**: 5 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.70 | 2 | +| Turns Survived | 72.80 | 85 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 103 | 14.3% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 560 | 78.0% | +| Take Stone | 0 | 0.0% | +| Set Stone | 48 | 6.7% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 7 | 1.0% | + +**Incantations Succeeded**: 7 / 7 (Success rate: 100.0%) +**Starved Deaths**: 10 diff --git a/ai/training/results/eval_20260627_221617.md b/ai/training/results/eval_20260627_221617.md new file mode 100644 index 0000000..8264cb4 --- /dev/null +++ b/ai/training/results/eval_20260627_221617.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 22:16:17 +**Model**: `zappy_level2_v2` +**Episodes**: 5 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.70 | 2 | +| Turns Survived | 77.80 | 97 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 262 | 34.1% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 492 | 64.0% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 15 | 2.0% | + +**Incantations Succeeded**: 7 / 15 (Success rate: 46.7%) +**Starved Deaths**: 10 diff --git a/ai/training/results/eval_20260627_221621.md b/ai/training/results/eval_20260627_221621.md new file mode 100644 index 0000000..856af40 --- /dev/null +++ b/ai/training/results/eval_20260627_221621.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 22:16:21 +**Model**: `zappy_level2_v2` +**Episodes**: 5 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.70 | 2 | +| Turns Survived | 61.20 | 85 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 160 | 26.5% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 270 | 44.8% | +| Take Stone | 166 | 27.5% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 7 | 1.2% | + +**Incantations Succeeded**: 7 / 7 (Success rate: 100.0%) +**Starved Deaths**: 10 diff --git a/ai/training/results/eval_20260627_222149.md b/ai/training/results/eval_20260627_222149.md new file mode 100644 index 0000000..b23d779 --- /dev/null +++ b/ai/training/results/eval_20260627_222149.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 22:21:49 +**Model**: `zappy_level2_v2` +**Episodes**: 20 +**Map Size**: `10x10` +**Teams**: `team01 (1 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.85 | 2 | +| Turns Survived | 109.00 | 260 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 492 | 22.7% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 1622 | 74.9% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 53 | 2.4% | + +**Incantations Succeeded**: 17 / 53 (Success rate: 32.1%) +**Starved Deaths**: 20 diff --git a/ai/training/results/eval_20260627_222153.md b/ai/training/results/eval_20260627_222153.md new file mode 100644 index 0000000..8744920 --- /dev/null +++ b/ai/training/results/eval_20260627_222153.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 22:21:53 +**Model**: `zappy_level2_v2` +**Episodes**: 20 +**Map Size**: `10x10` +**Teams**: `team01 (1 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.55 | 2 | +| Turns Survived | 102.45 | 202 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 381 | 18.7% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 1335 | 65.6% | +| Take Stone | 297 | 14.6% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 23 | 1.1% | + +**Incantations Succeeded**: 11 / 23 (Success rate: 47.8%) +**Starved Deaths**: 20 diff --git a/ai/training/results/eval_20260627_222155.md b/ai/training/results/eval_20260627_222155.md new file mode 100644 index 0000000..a4a4f19 --- /dev/null +++ b/ai/training/results/eval_20260627_222155.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 22:21:55 +**Model**: `zappy_level2_v2` +**Episodes**: 20 +**Map Size**: `10x10` +**Teams**: `team01 (1 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.65 | 2 | +| Turns Survived | 95.15 | 140 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 273 | 14.4% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 1595 | 84.3% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 23 | 1.2% | + +**Incantations Succeeded**: 13 / 23 (Success rate: 56.5%) +**Starved Deaths**: 20 diff --git a/ai/training/results/eval_20260627_222158.md b/ai/training/results/eval_20260627_222158.md new file mode 100644 index 0000000..21b010f --- /dev/null +++ b/ai/training/results/eval_20260627_222158.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 22:21:58 +**Model**: `zappy_level2_v2` +**Episodes**: 20 +**Map Size**: `10x10` +**Teams**: `team01 (1 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.70 | 2 | +| Turns Survived | 102.35 | 185 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 421 | 20.7% | +| Vision & Info (Look, Inventory, Connect_nbr) | 1 | 0.0% | +| Take Food | 1262 | 62.0% | +| Take Stone | 332 | 16.3% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 20 | 1.0% | + +**Incantations Succeeded**: 14 / 20 (Success rate: 70.0%) +**Starved Deaths**: 20 diff --git a/ai/training/results/eval_20260627_222201.md b/ai/training/results/eval_20260627_222201.md new file mode 100644 index 0000000..ec5e0ca --- /dev/null +++ b/ai/training/results/eval_20260627_222201.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 22:22:01 +**Model**: `zappy_level2_v2` +**Episodes**: 20 +**Map Size**: `10x10` +**Teams**: `team01 (1 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.60 | 2 | +| Turns Survived | 110.35 | 263 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 495 | 22.6% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 1435 | 65.4% | +| Take Stone | 249 | 11.3% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 16 | 0.7% | + +**Incantations Succeeded**: 12 / 16 (Success rate: 75.0%) +**Starved Deaths**: 20 diff --git a/ai/training/results/eval_20260627_222204.md b/ai/training/results/eval_20260627_222204.md new file mode 100644 index 0000000..185fce6 --- /dev/null +++ b/ai/training/results/eval_20260627_222204.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 22:22:04 +**Model**: `zappy_level2_v2` +**Episodes**: 20 +**Map Size**: `10x10` +**Teams**: `team01 (1 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.70 | 2 | +| Turns Survived | 106.45 | 249 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 466 | 22.0% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 1329 | 62.8% | +| Take Stone | 298 | 14.1% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 22 | 1.0% | + +**Incantations Succeeded**: 14 / 22 (Success rate: 63.6%) +**Starved Deaths**: 20 diff --git a/ai/training/results/eval_20260627_222208.md b/ai/training/results/eval_20260627_222208.md new file mode 100644 index 0000000..242f483 --- /dev/null +++ b/ai/training/results/eval_20260627_222208.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 22:22:08 +**Model**: `zappy_level2_v2` +**Episodes**: 20 +**Map Size**: `10x10` +**Teams**: `team01 (1 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.70 | 2 | +| Turns Survived | 110.00 | 251 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 468 | 21.4% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 1495 | 68.3% | +| Take Stone | 166 | 7.6% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 61 | 2.8% | + +**Incantations Succeeded**: 14 / 61 (Success rate: 23.0%) +**Starved Deaths**: 20 diff --git a/ai/training/results/eval_20260627_222211.md b/ai/training/results/eval_20260627_222211.md new file mode 100644 index 0000000..6f61657 --- /dev/null +++ b/ai/training/results/eval_20260627_222211.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-27 22:22:11 +**Model**: `zappy_level2_v2` +**Episodes**: 20 +**Map Size**: `10x10` +**Teams**: `team01 (1 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.60 | 2 | +| Turns Survived | 103.35 | 284 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 377 | 18.4% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 1499 | 73.0% | +| Take Stone | 166 | 8.1% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 12 | 0.6% | + +**Incantations Succeeded**: 12 / 12 (Success rate: 100.0%) +**Starved Deaths**: 20 diff --git a/ai/training/results/eval_20260628_003412.md b/ai/training/results/eval_20260628_003412.md new file mode 100644 index 0000000..6b84e69 --- /dev/null +++ b/ai/training/results/eval_20260628_003412.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 00:34:12 +**Model**: `zappy_coordination_v2` +**Episodes**: 20 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.62 | 2 | +| Turns Survived | 59.30 | 85 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 2087 | 89.2% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 6 | 0.3% | +| Take Stone | 31 | 1.3% | +| Set Stone | 14 | 0.6% | +| Broadcast Radio | 175 | 7.5% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 27 | 1.2% | + +**Incantations Succeeded**: 25 / 27 (Success rate: 92.6%) +**Starved Deaths**: 40 diff --git a/ai/training/results/eval_20260628_121953.md b/ai/training/results/eval_20260628_121953.md new file mode 100644 index 0000000..b4919ed --- /dev/null +++ b/ai/training/results/eval_20260628_121953.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 12:19:53 +**Model**: `zappy_coordination_v2` +**Episodes**: 20 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.57 | 2 | +| Turns Survived | 62.75 | 85 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 2394 | 96.7% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 1 | 0.0% | +| Take Stone | 30 | 1.2% | +| Set Stone | 7 | 0.3% | +| Broadcast Radio | 21 | 0.8% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 23 | 0.9% | + +**Incantations Succeeded**: 23 / 23 (Success rate: 100.0%) +**Starved Deaths**: 40 diff --git a/ai/training/results/eval_20260628_135310.md b/ai/training/results/eval_20260628_135310.md new file mode 100644 index 0000000..2c84033 --- /dev/null +++ b/ai/training/results/eval_20260628_135310.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 13:53:10 +**Model**: `zappy_coordination_v2_1` +**Episodes**: 50 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.63 | 2 | +| Turns Survived | 105.00 | 863 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 3034 | 29.1% | +| Vision & Info (Look, Inventory, Connect_nbr) | 2559 | 24.6% | +| Take Food | 4294 | 41.2% | +| Take Stone | 268 | 2.6% | +| Set Stone | 186 | 1.8% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 66 | 0.6% | + +**Incantations Succeeded**: 63 / 66 (Success rate: 95.5%) +**Starved Deaths**: 100 diff --git a/ai/training/results/eval_20260628_140323.md b/ai/training/results/eval_20260628_140323.md new file mode 100644 index 0000000..4219cfd --- /dev/null +++ b/ai/training/results/eval_20260628_140323.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 14:03:23 +**Model**: `zappy_coordination_v3` +**Episodes**: 50 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.59 | 2 | +| Turns Survived | 60.86 | 85 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 5719 | 95.0% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 16 | 0.3% | +| Take Stone | 6 | 0.1% | +| Set Stone | 71 | 1.2% | +| Broadcast Radio | 114 | 1.9% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 91 | 1.5% | + +**Incantations Succeeded**: 59 / 91 (Success rate: 64.8%) +**Starved Deaths**: 100 diff --git a/ai/training/results/eval_20260628_145309.md b/ai/training/results/eval_20260628_145309.md new file mode 100644 index 0000000..579696d --- /dev/null +++ b/ai/training/results/eval_20260628_145309.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 14:53:09 +**Model**: `zappy_coordination_v3` +**Episodes**: 50 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.67 | 2 | +| Turns Survived | 64.24 | 120 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 865 | 13.7% | +| Vision & Info (Look, Inventory, Connect_nbr) | 24 | 0.4% | +| Take Food | 4409 | 69.6% | +| Take Stone | 846 | 13.4% | +| Set Stone | 32 | 0.5% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 156 | 2.5% | + +**Incantations Succeeded**: 67 / 156 (Success rate: 42.9%) +**Starved Deaths**: 100 diff --git a/ai/training/results/eval_20260628_153841.md b/ai/training/results/eval_20260628_153841.md new file mode 100644 index 0000000..34541b2 --- /dev/null +++ b/ai/training/results/eval_20260628_153841.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 15:38:41 +**Model**: `zappy_coordination_v3` +**Episodes**: 50 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.50 | 2 | +| Turns Survived | 70.58 | 93 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 637 | 9.1% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 5064 | 72.6% | +| Take Stone | 0 | 0.0% | +| Set Stone | 1099 | 15.8% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 106 | 1.5% | + +**Incantations Succeeded**: 50 / 106 (Success rate: 47.2%) +**Starved Deaths**: 100 diff --git a/ai/training/results/eval_20260628_153854.md b/ai/training/results/eval_20260628_153854.md new file mode 100644 index 0000000..335ad54 --- /dev/null +++ b/ai/training/results/eval_20260628_153854.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 15:38:54 +**Model**: `zappy_coordination_v3` +**Episodes**: 50 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.50 | 2 | +| Turns Survived | 69.86 | 94 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 667 | 9.7% | +| Vision & Info (Look, Inventory, Connect_nbr) | 7 | 0.1% | +| Take Food | 4599 | 66.7% | +| Take Stone | 3 | 0.0% | +| Set Stone | 1470 | 21.3% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 90 | 1.3% | + +**Incantations Succeeded**: 50 / 90 (Success rate: 55.6%) +**Starved Deaths**: 100 diff --git a/ai/training/results/eval_20260628_153904.md b/ai/training/results/eval_20260628_153904.md new file mode 100644 index 0000000..3aa604d --- /dev/null +++ b/ai/training/results/eval_20260628_153904.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 15:39:04 +**Model**: `zappy_coordination_v3` +**Episodes**: 50 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.69 | 2 | +| Turns Survived | 63.72 | 90 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 891 | 14.2% | +| Vision & Info (Look, Inventory, Connect_nbr) | 9 | 0.1% | +| Take Food | 3733 | 59.5% | +| Take Stone | 1 | 0.0% | +| Set Stone | 1412 | 22.5% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 151 | 2.4% | + +**Incantations Succeeded**: 69 / 151 (Success rate: 45.7%) +**Starved Deaths**: 100 diff --git a/ai/training/results/eval_20260628_154545.md b/ai/training/results/eval_20260628_154545.md new file mode 100644 index 0000000..42f8076 --- /dev/null +++ b/ai/training/results/eval_20260628_154545.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 15:45:45 +**Model**: `zappy_level2_v2` +**Episodes**: 1 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.50 | 2 | +| Turns Survived | 61.00 | 61 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 4 | 6.6% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 56 | 91.8% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 1 | 1.6% | + +**Incantations Succeeded**: 1 / 1 (Success rate: 100.0%) +**Starved Deaths**: 1 diff --git a/ai/training/results/eval_20260628_160009.md b/ai/training/results/eval_20260628_160009.md new file mode 100644 index 0000000..9b043c7 --- /dev/null +++ b/ai/training/results/eval_20260628_160009.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:00:09 +**Model**: `zappy_level2_v2` +**Episodes**: 50 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.32 | 2 | +| Turns Survived | 66.82 | 86 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 889 | 26.8% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 2177 | 65.6% | +| Take Stone | 194 | 5.8% | +| Set Stone | 5 | 0.2% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 54 | 1.6% | + +**Incantations Succeeded**: 32 / 54 (Success rate: 59.3%) +**Starved Deaths**: 30 diff --git a/ai/training/results/eval_20260628_160017.md b/ai/training/results/eval_20260628_160017.md new file mode 100644 index 0000000..d2fcb00 --- /dev/null +++ b/ai/training/results/eval_20260628_160017.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:00:17 +**Model**: `zappy_level2_v2` +**Episodes**: 50 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.21 | 2 | +| Turns Survived | 71.94 | 86 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 777 | 21.8% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 2488 | 69.7% | +| Take Stone | 249 | 7.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 56 | 1.6% | + +**Incantations Succeeded**: 21 / 56 (Success rate: 37.5%) +**Starved Deaths**: 26 diff --git a/ai/training/results/eval_20260628_160031.md b/ai/training/results/eval_20260628_160031.md new file mode 100644 index 0000000..405c6dc --- /dev/null +++ b/ai/training/results/eval_20260628_160031.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:00:31 +**Model**: `zappy_level2_v2` +**Episodes**: 50 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.33 | 2 | +| Turns Survived | 67.20 | 86 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 707 | 21.2% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 2152 | 64.5% | +| Take Stone | 415 | 12.4% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 64 | 1.9% | + +**Incantations Succeeded**: 33 / 64 (Success rate: 51.6%) +**Starved Deaths**: 33 diff --git a/ai/training/results/eval_20260628_160134.md b/ai/training/results/eval_20260628_160134.md new file mode 100644 index 0000000..2ebe1a0 --- /dev/null +++ b/ai/training/results/eval_20260628_160134.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:01:34 +**Model**: `zappy_level2_v2` +**Episodes**: 1 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.00 | 1 | +| Turns Survived | 72.00 | 72 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 60 | 84.5% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 9 | 12.7% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 2 | 2.8% | + +**Incantations Succeeded**: 0 / 2 (Success rate: 0.0%) +**Starved Deaths**: 0 diff --git a/ai/training/results/eval_20260628_160217.md b/ai/training/results/eval_20260628_160217.md new file mode 100644 index 0000000..eb365fa --- /dev/null +++ b/ai/training/results/eval_20260628_160217.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:02:17 +**Model**: `zappy_level2_v2` +**Episodes**: 1 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.50 | 2 | +| Turns Survived | 61.00 | 61 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 3 | 4.9% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 57 | 93.4% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 1 | 1.6% | + +**Incantations Succeeded**: 1 / 1 (Success rate: 100.0%) +**Starved Deaths**: 1 diff --git a/ai/training/results/eval_20260628_160230.md b/ai/training/results/eval_20260628_160230.md new file mode 100644 index 0000000..2e6ba62 --- /dev/null +++ b/ai/training/results/eval_20260628_160230.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:02:30 +**Model**: `zappy_level2_v2` +**Episodes**: 5 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.40 | 2 | +| Turns Survived | 64.20 | 86 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 61 | 19.1% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 171 | 53.6% | +| Take Stone | 83 | 26.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 4 | 1.3% | + +**Incantations Succeeded**: 4 / 4 (Success rate: 100.0%) +**Starved Deaths**: 4 diff --git a/ai/training/results/eval_20260628_160257.md b/ai/training/results/eval_20260628_160257.md new file mode 100644 index 0000000..23b2fc6 --- /dev/null +++ b/ai/training/results/eval_20260628_160257.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:02:57 +**Model**: `zappy_level2_v2` +**Episodes**: 5 +**Map Size**: `20x20` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.50 | 2 | +| Turns Survived | 59.20 | 61 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 70 | 23.7% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 220 | 74.6% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 5 | 1.7% | + +**Incantations Succeeded**: 5 / 5 (Success rate: 100.0%) +**Starved Deaths**: 4 diff --git a/ai/training/results/eval_20260628_160316.md b/ai/training/results/eval_20260628_160316.md new file mode 100644 index 0000000..5e135a7 --- /dev/null +++ b/ai/training/results/eval_20260628_160316.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:03:16 +**Model**: `zappy_level2_v2` +**Episodes**: 5 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.60 | 2 | +| Turns Survived | 82.80 | 132 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 235 | 28.7% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 399 | 48.8% | +| Take Stone | 166 | 20.3% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 18 | 2.2% | + +**Incantations Succeeded**: 6 / 18 (Success rate: 33.3%) +**Starved Deaths**: 3 diff --git a/ai/training/results/eval_20260628_160342.md b/ai/training/results/eval_20260628_160342.md new file mode 100644 index 0000000..b130a07 --- /dev/null +++ b/ai/training/results/eval_20260628_160342.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:03:42 +**Model**: `zappy_level2_v2` +**Episodes**: 1 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 2.00 | 2 | +| Turns Survived | 59.00 | 59 | + +**Rating Tier**: Tier 2: Single-Player Competence + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 25 | 21.6% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 89 | 76.7% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 2 | 1.7% | + +**Incantations Succeeded**: 2 / 2 (Success rate: 100.0%) +**Starved Deaths**: 1 diff --git a/ai/training/results/eval_20260628_160355.md b/ai/training/results/eval_20260628_160355.md new file mode 100644 index 0000000..f345fd2 --- /dev/null +++ b/ai/training/results/eval_20260628_160355.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:03:55 +**Model**: `zappy_level2_v2` +**Episodes**: 10 +**Map Size**: `20x20` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.65 | 2 | +| Turns Survived | 68.60 | 85 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 352 | 26.0% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 748 | 55.2% | +| Take Stone | 239 | 17.6% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 17 | 1.3% | + +**Incantations Succeeded**: 13 / 17 (Success rate: 76.5%) +**Starved Deaths**: 7 diff --git a/ai/training/results/eval_20260628_160501.md b/ai/training/results/eval_20260628_160501.md new file mode 100644 index 0000000..3ca1e23 --- /dev/null +++ b/ai/training/results/eval_20260628_160501.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:05:01 +**Model**: `zappy_level2_v2` +**Episodes**: 50 +**Map Size**: `30x30` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.28 | 2 | +| Turns Survived | 69.34 | 86 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 645 | 18.7% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 2427 | 70.5% | +| Take Stone | 332 | 9.6% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 40 | 1.2% | + +**Incantations Succeeded**: 28 / 40 (Success rate: 70.0%) +**Starved Deaths**: 31 diff --git a/ai/training/results/eval_20260628_160730.md b/ai/training/results/eval_20260628_160730.md new file mode 100644 index 0000000..e27a566 --- /dev/null +++ b/ai/training/results/eval_20260628_160730.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:07:30 +**Model**: `zappy_level2_v2` +**Episodes**: 5 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.40 | 2 | +| Turns Survived | 64.20 | 85 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 70 | 21.8% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 242 | 75.4% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 9 | 2.8% | + +**Incantations Succeeded**: 4 / 9 (Success rate: 44.4%) +**Starved Deaths**: 5 diff --git a/ai/training/results/eval_20260628_160859.md b/ai/training/results/eval_20260628_160859.md new file mode 100644 index 0000000..41016c5 --- /dev/null +++ b/ai/training/results/eval_20260628_160859.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:08:59 +**Model**: `zappy_level2_v2` +**Episodes**: 50 +**Map Size**: `30x30` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.32 | 2 | +| Turns Survived | 68.42 | 86 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 398 | 11.7% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 2775 | 81.6% | +| Take Stone | 166 | 4.9% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 61 | 1.8% | + +**Incantations Succeeded**: 32 / 61 (Success rate: 52.5%) +**Starved Deaths**: 31 diff --git a/ai/training/results/eval_20260628_161232.md b/ai/training/results/eval_20260628_161232.md new file mode 100644 index 0000000..451f2f2 --- /dev/null +++ b/ai/training/results/eval_20260628_161232.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:12:32 +**Model**: `zappy_level2_v2` +**Episodes**: 1 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.50 | 2 | +| Turns Survived | 61.00 | 61 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 3 | 4.9% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 57 | 93.4% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 1 | 1.6% | + +**Incantations Succeeded**: 1 / 1 (Success rate: 100.0%) +**Starved Deaths**: 1 diff --git a/ai/training/results/eval_20260628_161304.md b/ai/training/results/eval_20260628_161304.md new file mode 100644 index 0000000..4080bfb --- /dev/null +++ b/ai/training/results/eval_20260628_161304.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:13:04 +**Model**: `zappy_level2_v2` +**Episodes**: 1 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.50 | 2 | +| Turns Survived | 59.00 | 59 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 14 | 23.7% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 44 | 74.6% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 1 | 1.7% | + +**Incantations Succeeded**: 1 / 1 (Success rate: 100.0%) +**Starved Deaths**: 1 diff --git a/ai/training/results/eval_20260628_161310.md b/ai/training/results/eval_20260628_161310.md new file mode 100644 index 0000000..1689211 --- /dev/null +++ b/ai/training/results/eval_20260628_161310.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:13:10 +**Model**: `zappy_level2_v2` +**Episodes**: 1 +**Map Size**: `30x30` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.00 | 1 | +| Turns Survived | 85.00 | 85 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 0 | 0.0% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 84 | 100.0% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 0 | 0.0% | + +**Incantations Succeeded**: 0 / 0 (Success rate: 0.0%) +**Starved Deaths**: 0 diff --git a/ai/training/results/eval_20260628_161330.md b/ai/training/results/eval_20260628_161330.md new file mode 100644 index 0000000..28c23f0 --- /dev/null +++ b/ai/training/results/eval_20260628_161330.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:13:30 +**Model**: `zappy_level2_v2` +**Episodes**: 1 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.00 | 1 | +| Turns Survived | 85.00 | 85 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 0 | 0.0% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 85 | 100.0% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 0 | 0.0% | + +**Incantations Succeeded**: 0 / 0 (Success rate: 0.0%) +**Starved Deaths**: 1 diff --git a/ai/training/results/eval_20260628_161347.md b/ai/training/results/eval_20260628_161347.md new file mode 100644 index 0000000..6cee55e --- /dev/null +++ b/ai/training/results/eval_20260628_161347.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:13:47 +**Model**: `zappy_level2_v2` +**Episodes**: 1 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.50 | 2 | +| Turns Survived | 60.00 | 60 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 6 | 10.0% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 53 | 88.3% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 1 | 1.7% | + +**Incantations Succeeded**: 1 / 1 (Success rate: 100.0%) +**Starved Deaths**: 1 diff --git a/ai/training/results/eval_20260628_161417.md b/ai/training/results/eval_20260628_161417.md new file mode 100644 index 0000000..4ef31ca --- /dev/null +++ b/ai/training/results/eval_20260628_161417.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:14:17 +**Model**: `zappy_level2_v2` +**Episodes**: 1 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.50 | 2 | +| Turns Survived | 58.00 | 58 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 18 | 31.0% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 39 | 67.2% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 1 | 1.7% | + +**Incantations Succeeded**: 1 / 1 (Success rate: 100.0%) +**Starved Deaths**: 1 diff --git a/ai/training/results/eval_20260628_161554.md b/ai/training/results/eval_20260628_161554.md new file mode 100644 index 0000000..eeaa464 --- /dev/null +++ b/ai/training/results/eval_20260628_161554.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:15:54 +**Model**: `zappy_level2_v2` +**Episodes**: 1 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.00 | 1 | +| Turns Survived | 81.00 | 81 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 0 | 0.0% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 80 | 100.0% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 0 | 0.0% | + +**Incantations Succeeded**: 0 / 0 (Success rate: 0.0%) +**Starved Deaths**: 0 diff --git a/ai/training/results/eval_20260628_161625.md b/ai/training/results/eval_20260628_161625.md new file mode 100644 index 0000000..443e73e --- /dev/null +++ b/ai/training/results/eval_20260628_161625.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:16:25 +**Model**: `zappy_level2_v2` +**Episodes**: 1 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.50 | 2 | +| Turns Survived | 57.00 | 57 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 35 | 61.4% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 13 | 22.8% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 9 | 15.8% | + +**Incantations Succeeded**: 1 / 9 (Success rate: 11.1%) +**Starved Deaths**: 1 diff --git a/ai/training/results/eval_20260628_161757.md b/ai/training/results/eval_20260628_161757.md new file mode 100644 index 0000000..06cfefb --- /dev/null +++ b/ai/training/results/eval_20260628_161757.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:17:57 +**Model**: `zappy_level2_v2` +**Episodes**: 1 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.00 | 1 | +| Turns Survived | 71.00 | 71 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 59 | 84.3% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 11 | 15.7% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 0 | 0.0% | + +**Incantations Succeeded**: 0 / 0 (Success rate: 0.0%) +**Starved Deaths**: 0 diff --git a/ai/training/results/eval_20260628_161810.md b/ai/training/results/eval_20260628_161810.md new file mode 100644 index 0000000..9cc621c --- /dev/null +++ b/ai/training/results/eval_20260628_161810.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:18:10 +**Model**: `zappy_level2_v2` +**Episodes**: 1 +**Map Size**: `15x15` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 2.00 | 2 | +| Turns Survived | 10000.00 | 10000 | + +**Rating Tier**: Tier 2: Single-Player Competence + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 17018 | 85.1% | +| Vision & Info (Look, Inventory, Connect_nbr) | 39 | 0.2% | +| Take Food | 2938 | 14.7% | +| Take Stone | 3 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 2 | 0.0% | + +**Incantations Succeeded**: 2 / 2 (Success rate: 100.0%) +**Starved Deaths**: 0 diff --git a/ai/training/results/eval_20260628_161832.md b/ai/training/results/eval_20260628_161832.md new file mode 100644 index 0000000..88d1442 --- /dev/null +++ b/ai/training/results/eval_20260628_161832.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:18:32 +**Model**: `zappy_level2_v2` +**Episodes**: 1 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.00 | 1 | +| Turns Survived | 5517.00 | 5517 | + +**Rating Tier**: Tier 2: Single-Player Competence + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 9317 | 84.5% | +| Vision & Info (Look, Inventory, Connect_nbr) | 65 | 0.6% | +| Take Food | 1650 | 15.0% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 0 | 0.0% | + +**Incantations Succeeded**: 0 / 0 (Success rate: 0.0%) +**Starved Deaths**: 1 diff --git a/ai/training/results/eval_20260628_161912.md b/ai/training/results/eval_20260628_161912.md new file mode 100644 index 0000000..4e1ad04 --- /dev/null +++ b/ai/training/results/eval_20260628_161912.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:19:12 +**Model**: `zappy_level2_v2` +**Episodes**: 1 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.00 | 1 | +| Turns Survived | 10000.00 | 10000 | + +**Rating Tier**: Tier 2: Single-Player Competence + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 16880 | 84.4% | +| Vision & Info (Look, Inventory, Connect_nbr) | 5 | 0.0% | +| Take Food | 2896 | 14.5% | +| Take Stone | 132 | 0.7% | +| Set Stone | 87 | 0.4% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 0 | 0.0% | + +**Incantations Succeeded**: 0 / 0 (Success rate: 0.0%) +**Starved Deaths**: 0 diff --git a/ai/training/results/eval_20260628_162104.md b/ai/training/results/eval_20260628_162104.md new file mode 100644 index 0000000..1cc44ee --- /dev/null +++ b/ai/training/results/eval_20260628_162104.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:21:04 +**Model**: `zappy_level2_v2` +**Episodes**: 1 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 2.00 | 2 | +| Turns Survived | 2114.00 | 2114 | + +**Rating Tier**: Tier 2: Single-Player Competence + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 2464 | 58.3% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 656 | 15.5% | +| Take Stone | 6 | 0.1% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 1098 | 26.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 2 | 0.0% | + +**Incantations Succeeded**: 2 / 2 (Success rate: 100.0%) +**Starved Deaths**: 0 diff --git a/ai/training/results/eval_20260628_162221.md b/ai/training/results/eval_20260628_162221.md new file mode 100644 index 0000000..b4055e6 --- /dev/null +++ b/ai/training/results/eval_20260628_162221.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 16:22:21 +**Model**: `zappy_level2_v2` +**Episodes**: 50 +**Map Size**: `30x30` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.43 | 2 | +| Turns Survived | 57.70 | 71 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 1921 | 67.7% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 394 | 13.9% | +| Take Stone | 116 | 4.1% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 364 | 12.8% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 43 | 1.5% | + +**Incantations Succeeded**: 43 / 43 (Success rate: 100.0%) +**Starved Deaths**: 3 diff --git a/ai/training/results/eval_20260628_191041.md b/ai/training/results/eval_20260628_191041.md new file mode 100644 index 0000000..66b8bc8 --- /dev/null +++ b/ai/training/results/eval_20260628_191041.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 19:10:41 +**Model**: `zappy_coordination_v4` +**Episodes**: 50 +**Map Size**: `30x30` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.00 | 1 | +| Turns Survived | 70.84 | 71 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 1587 | 45.4% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 1901 | 54.4% | +| Take Stone | 6 | 0.2% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 0 | 0.0% | + +**Incantations Succeeded**: 0 / 0 (Success rate: 0.0%) +**Starved Deaths**: 2 diff --git a/ai/training/results/eval_20260628_191205.md b/ai/training/results/eval_20260628_191205.md new file mode 100644 index 0000000..c7520ab --- /dev/null +++ b/ai/training/results/eval_20260628_191205.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 19:12:05 +**Model**: `zappy_level2_v2` +**Episodes**: 50 +**Map Size**: `30x30` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.01 | 2 | +| Turns Survived | 70.20 | 71 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 1585 | 45.7% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 1880 | 54.2% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 1 | 0.0% | + +**Incantations Succeeded**: 1 / 1 (Success rate: 100.0%) +**Starved Deaths**: 6 diff --git a/ai/training/results/eval_20260628_191601.md b/ai/training/results/eval_20260628_191601.md new file mode 100644 index 0000000..382d601 --- /dev/null +++ b/ai/training/results/eval_20260628_191601.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 19:16:01 +**Model**: `zappy_level2_v2` +**Episodes**: 50 +**Map Size**: `30x30` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.50 | 2 | +| Turns Survived | 62.24 | 92 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 1596 | 51.9% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 1478 | 48.0% | +| Take Stone | 2 | 0.1% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 0 | 0.0% | + +**Incantations Succeeded**: 0 / 0 (Success rate: 0.0%) +**Starved Deaths**: 50 diff --git a/ai/training/results/eval_20260628_191730.md b/ai/training/results/eval_20260628_191730.md new file mode 100644 index 0000000..f8cdc93 --- /dev/null +++ b/ai/training/results/eval_20260628_191730.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 19:17:30 +**Model**: `zappy_level2_v2` +**Episodes**: 50 +**Map Size**: `30x30` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.50 | 2 | +| Turns Survived | 62.14 | 82 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 1651 | 53.6% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 1427 | 46.4% | +| Take Stone | 0 | 0.0% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 0 | 0.0% | + +**Incantations Succeeded**: 0 / 0 (Success rate: 0.0%) +**Starved Deaths**: 50 diff --git a/ai/training/results/eval_20260628_193800.md b/ai/training/results/eval_20260628_193800.md new file mode 100644 index 0000000..a4df309 --- /dev/null +++ b/ai/training/results/eval_20260628_193800.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 19:38:00 +**Model**: `zappy_level2_v2` +**Episodes**: 50 +**Map Size**: `30x30` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.55 | 2 | +| Turns Survived | 59.32 | 97 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 2091 | 71.3% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 831 | 28.4% | +| Take Stone | 0 | 0.0% | +| Set Stone | 3 | 0.1% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 6 | 0.2% | + +**Incantations Succeeded**: 6 / 6 (Success rate: 100.0%) +**Starved Deaths**: 50 diff --git a/ai/training/results/eval_20260628_193820.md b/ai/training/results/eval_20260628_193820.md new file mode 100644 index 0000000..a0c565f --- /dev/null +++ b/ai/training/results/eval_20260628_193820.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 19:38:20 +**Model**: `zappy_level2_v2` +**Episodes**: 1 +**Map Size**: `10x10` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 2.00 | 2 | +| Turns Survived | 303.00 | 303 | + +**Rating Tier**: Tier 2: Single-Player Competence + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 388 | 64.1% | +| Vision & Info (Look, Inventory, Connect_nbr) | 1 | 0.2% | +| Take Food | 144 | 23.8% | +| Take Stone | 30 | 5.0% | +| Set Stone | 20 | 3.3% | +| Broadcast Radio | 20 | 3.3% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 2 | 0.3% | + +**Incantations Succeeded**: 2 / 2 (Success rate: 100.0%) +**Starved Deaths**: 2 diff --git a/ai/training/results/eval_20260628_194621.md b/ai/training/results/eval_20260628_194621.md new file mode 100644 index 0000000..aa005d3 --- /dev/null +++ b/ai/training/results/eval_20260628_194621.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 19:46:21 +**Model**: `zappy_level2_v2` +**Episodes**: 50 +**Map Size**: `30x30` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.50 | 2 | +| Turns Survived | 60.46 | 77 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 2117 | 70.8% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 824 | 27.6% | +| Take Stone | 46 | 1.5% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 3 | 0.1% | + +**Incantations Succeeded**: 1 / 3 (Success rate: 33.3%) +**Starved Deaths**: 50 diff --git a/ai/training/results/eval_20260628_194715.md b/ai/training/results/eval_20260628_194715.md new file mode 100644 index 0000000..5381864 --- /dev/null +++ b/ai/training/results/eval_20260628_194715.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 19:47:15 +**Model**: `zappy_coordination_v4` +**Episodes**: 50 +**Map Size**: `30x30` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.50 | 2 | +| Turns Survived | 61.38 | 87 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 2134 | 70.2% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 835 | 27.5% | +| Take Stone | 69 | 2.3% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 0 | 0.0% | + +**Incantations Succeeded**: 0 / 0 (Success rate: 0.0%) +**Starved Deaths**: 50 diff --git a/ai/training/results/eval_20260628_195642.md b/ai/training/results/eval_20260628_195642.md new file mode 100644 index 0000000..a54a3d0 --- /dev/null +++ b/ai/training/results/eval_20260628_195642.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 19:56:42 +**Model**: `zappy_coordination_v4` +**Episodes**: 50 +**Map Size**: `30x30` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.00 | 1 | +| Turns Survived | 61.84 | 86 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 2122 | 69.4% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 854 | 27.9% | +| Take Stone | 80 | 2.6% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 0 | 0.0% | + +**Incantations Succeeded**: 0 / 0 (Success rate: 0.0%) +**Starved Deaths**: 50 diff --git a/ai/training/results/eval_20260628_195706.md b/ai/training/results/eval_20260628_195706.md new file mode 100644 index 0000000..f6cd51d --- /dev/null +++ b/ai/training/results/eval_20260628_195706.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 19:57:06 +**Model**: `zappy_level2_v2` +**Episodes**: 50 +**Map Size**: `30x30` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.06 | 2 | +| Turns Survived | 61.18 | 86 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 2145 | 70.9% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 832 | 27.5% | +| Take Stone | 46 | 1.5% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 3 | 0.1% | + +**Incantations Succeeded**: 3 / 3 (Success rate: 100.0%) +**Starved Deaths**: 50 diff --git a/ai/training/results/eval_20260628_215933.md b/ai/training/results/eval_20260628_215933.md new file mode 100644 index 0000000..265663f --- /dev/null +++ b/ai/training/results/eval_20260628_215933.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 21:59:33 +**Model**: `zappy_coordination_v4` +**Episodes**: 50 +**Map Size**: `30x30` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.00 | 1 | +| Turns Survived | 62.60 | 87 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 2194 | 71.0% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 838 | 27.1% | +| Take Stone | 58 | 1.9% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 0 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 0 | 0.0% | + +**Incantations Succeeded**: 0 / 0 (Success rate: 0.0%) +**Starved Deaths**: 50 diff --git a/ai/training/results/eval_20260628_215952.md b/ai/training/results/eval_20260628_215952.md new file mode 100644 index 0000000..0aab74b --- /dev/null +++ b/ai/training/results/eval_20260628_215952.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 21:59:52 +**Model**: `zappy_coordination_v4` +**Episodes**: 50 +**Map Size**: `30x30` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.01 | 2 | +| Turns Survived | 393.70 | 1261 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 28451 | 72.4% | +| Vision & Info (Look, Inventory, Connect_nbr) | 0 | 0.0% | +| Take Food | 9452 | 24.1% | +| Take Stone | 794 | 2.0% | +| Set Stone | 9 | 0.0% | +| Broadcast Radio | 9 | 0.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 1 | 0.0% | + +**Incantations Succeeded**: 1 / 1 (Success rate: 100.0%) +**Starved Deaths**: 100 diff --git a/ai/training/results/eval_20260628_220609.md b/ai/training/results/eval_20260628_220609.md new file mode 100644 index 0000000..77a9e93 --- /dev/null +++ b/ai/training/results/eval_20260628_220609.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 22:06:09 +**Model**: `zappy_general_v1` +**Episodes**: 50 +**Map Size**: `30x30` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.30 | 2 | +| Turns Survived | 388.94 | 1596 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 27619 | 71.2% | +| Vision & Info (Look, Inventory, Connect_nbr) | 47 | 0.1% | +| Take Food | 9373 | 24.2% | +| Take Stone | 751 | 1.9% | +| Set Stone | 484 | 1.2% | +| Broadcast Radio | 464 | 1.2% | +| Fork Allied Slots | 5 | 0.0% | +| Incantations Attempted | 30 | 0.1% | + +**Incantations Succeeded**: 30 / 30 (Success rate: 100.0%) +**Starved Deaths**: 100 diff --git a/ai/training/results/eval_20260628_234926.md b/ai/training/results/eval_20260628_234926.md new file mode 100644 index 0000000..ca79b7c --- /dev/null +++ b/ai/training/results/eval_20260628_234926.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 23:49:26 +**Model**: `zappy_general_v2` +**Episodes**: 50 +**Map Size**: `30x30` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.00 | 1 | +| Turns Survived | 361.64 | 2124 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 21686 | 60.1% | +| Vision & Info (Look, Inventory, Connect_nbr) | 5 | 0.0% | +| Take Food | 8490 | 23.5% | +| Take Stone | 129 | 0.4% | +| Set Stone | 0 | 0.0% | +| Broadcast Radio | 5775 | 16.0% | +| Fork Allied Slots | 0 | 0.0% | +| Incantations Attempted | 0 | 0.0% | + +**Incantations Succeeded**: 0 / 0 (Success rate: 0.0%) +**Starved Deaths**: 100 diff --git a/ai/training/results/eval_20260628_235340.md b/ai/training/results/eval_20260628_235340.md new file mode 100644 index 0000000..4143aeb --- /dev/null +++ b/ai/training/results/eval_20260628_235340.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 23:53:40 +**Model**: `zappy_general_v1` +**Episodes**: 50 +**Map Size**: `30x30` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.27 | 2 | +| Turns Survived | 361.88 | 1028 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 25901 | 71.8% | +| Vision & Info (Look, Inventory, Connect_nbr) | 58 | 0.2% | +| Take Food | 8755 | 24.3% | +| Take Stone | 592 | 1.6% | +| Set Stone | 358 | 1.0% | +| Broadcast Radio | 330 | 0.9% | +| Fork Allied Slots | 9 | 0.0% | +| Incantations Attempted | 35 | 0.1% | + +**Incantations Succeeded**: 27 / 35 (Success rate: 77.1%) +**Starved Deaths**: 100 diff --git a/ai/training/results/latest_eval.md b/ai/training/results/latest_eval.md new file mode 100644 index 0000000..4143aeb --- /dev/null +++ b/ai/training/results/latest_eval.md @@ -0,0 +1,30 @@ +# Strict Evaluation Report + +**Date**: 2026-06-28 23:53:40 +**Model**: `zappy_general_v1` +**Episodes**: 50 +**Map Size**: `30x30` +**Teams**: `team01 (2 players/team)` + +## Overall Performance Metrics +| Metric | Average | Max | +| :--- | :---: | :---: | +| Level Achieved | 1.27 | 2 | +| Turns Survived | 361.88 | 1028 | + +**Rating Tier**: Tier 1: Starvation/Survival Failure + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | 25901 | 71.8% | +| Vision & Info (Look, Inventory, Connect_nbr) | 58 | 0.2% | +| Take Food | 8755 | 24.3% | +| Take Stone | 592 | 1.6% | +| Set Stone | 358 | 1.0% | +| Broadcast Radio | 330 | 0.9% | +| Fork Allied Slots | 9 | 0.0% | +| Incantations Attempted | 35 | 0.1% | + +**Incantations Succeeded**: 27 / 35 (Success rate: 77.1%) +**Starved Deaths**: 100 diff --git a/ai/training/run_training.sh b/ai/training/run_training.sh index bc8e6a6..47a19ab 100755 --- a/ai/training/run_training.sh +++ b/ai/training/run_training.sh @@ -5,8 +5,6 @@ set -e # Default parameters TIMESTEPS=50000 -WIDTH=10 -HEIGHT=10 FREQ=100 TEAM="TeamAI" MODEL_NAME="zappy_ai_model" @@ -19,8 +17,6 @@ print_usage() { echo "Usage: ./run_training.sh [OPTIONS]" echo "Options:" echo " -t, --timesteps N Total timesteps to train (default: $TIMESTEPS)" - echo " -x, --width N Map width (default: $WIDTH)" - echo " -y, --height N Map height (default: $HEIGHT)" echo " -f, --freq N Simulation frequency (default: $FREQ)" echo " -n, --team NAME Team name (default: $TEAM)" echo " -m, --model NAME Saved model name (default: $MODEL_NAME)" @@ -34,8 +30,6 @@ print_usage() { while [[ "$#" -gt 0 ]]; do case $1 in -t|--timesteps) TIMESTEPS="$2"; shift ;; - -x|--width) WIDTH="$2"; shift ;; - -y|--height) HEIGHT="$2"; shift ;; -f|--freq) FREQ="$2"; shift ;; -n|--team) TEAM="$2"; shift ;; -m|--model) MODEL_NAME="$2"; shift ;; @@ -85,7 +79,6 @@ echo " STARTING ZAPPY AI TRAINING" echo "===================================" echo "Parameters:" echo " Timesteps: $TIMESTEPS" -echo " Map Size: ${WIDTH}x${HEIGHT}" echo " Frequency: $FREQ" echo " Team: $TEAM" echo " Model: $MODEL_NAME" @@ -105,8 +98,6 @@ fi python3 ai/training/training_env/train.py \ --timesteps "$TIMESTEPS" \ - --width "$WIDTH" \ - --height "$HEIGHT" \ --freq "$FREQ" \ --team "$TEAM" \ --model-name "$MODEL_NAME" \ diff --git a/ai/training/training_env/ZappyEnv.py b/ai/training/training_env/ZappyEnv.py index 95c84ae..585d3e3 100644 --- a/ai/training/training_env/ZappyEnv.py +++ b/ai/training/training_env/ZappyEnv.py @@ -1,5 +1,5 @@ from typing import Union - +import logging import gymnasium as gym import numpy as np from gymnasium import spaces @@ -11,6 +11,9 @@ from training.training_env.broadcast import BroadcastDict, BroadcastHandler from training.training_env.env_modes import LibZappyEnv +# Suppress verbose decision-making logs from teammate bots in subprocesses +logging.getLogger("zappy_ai").setLevel(logging.CRITICAL) + class ObservationZappyEnv: client: Union[ZappyLibClient, None] = None @@ -75,6 +78,7 @@ def _get_real_observation(self): offset_resource = resources.index(entity) obs[base_index + (i * 8) + offset_resource] += 1 obs[655] = self.client.level + obs[79] = getattr(self, "client_broadcast_dir", 0) return obs @@ -113,6 +117,15 @@ def __init__( def reset(self, *, seed=None, options=None): obs, info = self.mode.reset(seed=seed, options=options) self.client = self.mode.client + self.turns_elapsed = 0 + self.client_broadcast_dir = 0 + + # Local relative coordinates for curiosity reward + self.rel_x = 0 + self.rel_y = 0 + self.orientation = 0 # 0=North, 1=East, 2=South, 3=West + self.visited_tiles = {(0, 0)} + return obs, info def close(self): @@ -161,6 +174,8 @@ def step(self, action): best_heuristic = heuristic best_heuristic["dir"] = direction + self.client_broadcast_dir = best_heuristic["dir"] + match bot_action: case ControllerAction.FORWARD: response = self.client.forward() @@ -255,6 +270,37 @@ def step(self, action): if zappy_action is not None: reward += base_rewards.get(zappy_action, 0.0) + # Track relative coordinate movement and calculate curiosity reward + if zappy_action == ZappyAction.FORWARD: + if self.orientation == 0: + self.rel_y += 1 + elif self.orientation == 1: + self.rel_x += 1 + elif self.orientation == 2: + self.rel_y -= 1 + elif self.orientation == 3: + self.rel_x -= 1 + + # Toroidal map coordinate wrap-around + map_width = getattr(self.mode, "width", 20) + map_height = getattr(self.mode, "height", 20) + if map_width > 0: + self.rel_x = self.rel_x % map_width + if map_height > 0: + self.rel_y = self.rel_y % map_height + + pos = (self.rel_x, self.rel_y) + if pos not in self.visited_tiles: + self.visited_tiles.add(pos) + reward += 0.5 # Curiosity exploration reward + else: + reward -= 0.1 # Backtracking / Loop penalty + + elif zappy_action == ZappyAction.LEFT: + self.orientation = (self.orientation - 1) % 4 + elif zappy_action == ZappyAction.RIGHT: + self.orientation = (self.orientation + 1) % 4 + if best_heuristic["score"] >= 50: target_dir = best_heuristic["dir"] task = best_heuristic["task"] @@ -285,15 +331,19 @@ def step(self, action): if zappy_action in ideal_actions: reward += 3.0 # reward for listening to the radio - else: - reward -= 0.5 # Penalty for ignoring teammates + elif zappy_action in [ + ZappyAction.FORWARD, + ZappyAction.LEFT, + ZappyAction.RIGHT, + ]: + reward -= 0.5 # Penalty for incorrect movement direction when teammate is calling if zappy_action == ZappyAction.TAKE: inv = self.client.inventory() if item_target == "food": if isinstance(inv, Inventory) and inv.food >= 15: reward += ( - 0.2 # Small positive reward for maintaining buffer of food + 0.0 # No reward for excess food hoarding (focus on stones) ) else: reward += 2.0 # Large positive reward for survival @@ -351,9 +401,9 @@ def step(self, action): elif inv.food < 5: reward += 0.5 else: - reward -= 0.1 + reward += 0.3 # Buffed to encourage the agent to broadcast coordinate signals else: - reward -= 0.1 + reward += 0.3 # Buffed to encourage the agent to broadcast coordinate signals elif response == "ko": # ANTI-CASINO SYSTEM @@ -369,7 +419,32 @@ def step(self, action): elif isinstance(response, str) and response.startswith("Current level:"): reward += 100.0 * self.client.level + self.turns_elapsed += 1 + if not terminated: + # Run background teammate bots once every 5 turns to allow training multi-agent coordination + # without bloating the server ticking rate and starving the players instantly. + if ( + hasattr(self.mode, "teammate_clients") + and self.mode.teammate_clients + and (self.turns_elapsed % 5 == 0) + ): + from src.strategy.decision_making import take_decision + import logging + + logging.getLogger("zappy_ai").setLevel(logging.CRITICAL) + + for teammate in self.mode.teammate_clients: + if not teammate.is_dead: + try: + # Periodically send a COME beacon if teammate is Level 2 + # to teach the agent to follow the radio signal + if teammate.level >= 2 and (self.turns_elapsed % 10 == 0): + teammate.broadcast("COME") + take_decision(teammate) + except Exception: + teammate.is_dead = True + try: observation = self._get_real_observation() except Exception as e: diff --git a/ai/training/training_env/env_modes.py b/ai/training/training_env/env_modes.py index c931154..1dff63c 100644 --- a/ai/training/training_env/env_modes.py +++ b/ai/training/training_env/env_modes.py @@ -29,10 +29,9 @@ def reset(self, *, seed=None, options=None): num_teams = int(np.random.randint(1, 6)) teams = [self.teams[0]] + [f"team{i}" for i in range(2, num_teams + 1)] - self.width = int(np.random.randint(10, 25)) - self.height = int(np.random.randint(10, 25)) - area = self.width * self.height - players_per_team = max(1, area // (50 * num_teams)) + self.width = int(np.random.randint(10, 31)) + self.height = int(np.random.randint(10, 31)) + players_per_team = int(np.random.randint(1, 4)) clients_nb = players_per_team TeamArray = ctypes.c_char_p * num_teams @@ -43,10 +42,16 @@ def reset(self, *, seed=None, options=None): ) # -1 player for allies that 1 of them is the ai + self.teammate_clients = [] for _ in range(players_per_team - 1): - self.zappy_lib.lib.zappy_add_player( + p_id = self.zappy_lib.lib.zappy_add_player( self.server_ptr, teams[0].encode("utf-8") ) + teammate = ZappyLibClient( + self.zappy_lib.lib, self.server_ptr, p_id, self.freq + ) + teammate.name = f"TeammateBot_{p_id}" + self.teammate_clients.append(teammate) # Enemies for i in range(1, num_teams): @@ -62,9 +67,14 @@ def reset(self, *, seed=None, options=None): self.client = ZappyLibClient( self.zappy_lib.lib, self.server_ptr, player_id, self.freq ) + self.client.name = teams[0] self.env.client = self.client - # Consume initial auth responses ("ok", slots, map size) + # Consume initial auth responses ("ok", slots, map size) for teammates + for teammate in self.teammate_clients: + for _ in range(2): + teammate.wait_for_response() + for _ in range(2): self.client.wait_for_response() diff --git a/ai/training/training_env/evaluate_ai.py b/ai/training/training_env/evaluate_ai.py index f3bef63..9713f7c 100644 --- a/ai/training/training_env/evaluate_ai.py +++ b/ai/training/training_env/evaluate_ai.py @@ -6,10 +6,11 @@ import ctypes from stable_baselines3 import PPO from src.client.lib_client import ZappyLib, ZappyLibClient -from src.utils import Inventory +from src.utils import Inventory, parse_look from training.training_env.actions import ControllerAction from training.training_env.broadcast import BroadcastDict, BroadcastHandler import datetime +import re # Resolve project path to allow imports of 'src' and 'training' sys.path.insert( @@ -18,11 +19,15 @@ ) -def get_observation(client, verbose=False): - """Generates the 657-dimensional observation vector for a client.""" - if client.is_dead: - return np.zeros(657, dtype=np.int32) +def parse_inventory_resp(resp): + if resp and resp.startswith("["): + matches = re.findall(r"([a-zA-Z]+)[^0-9a-zA-Z]*(\d+)", resp) + clean_resp = "[" + ", ".join(f"{name} {count}" for name, count in matches) + "]" + return Inventory.from_string(clean_resp) + return resp + +def build_observation(client, inv, look_resp, verbose=False): obs = np.zeros(657, dtype=np.int32) resources = [ "player", @@ -35,36 +40,23 @@ def get_observation(client, verbose=False): "thystame", ] - # 1. Parse inventory - if verbose: - print(f" [Agent {client.player_id}] Sending Inventory...", flush=True) - inv = client.inventory() - if verbose: - print(f" [Agent {client.player_id}] Inventory response: {inv}", flush=True) - if client.is_dead: - return np.zeros(657, dtype=np.int32) - - if isinstance(inv, Inventory): - obs[0] = inv.food - obs[1] = inv.linemate - obs[2] = getattr(inv, "deraumere", 0) - obs[3] = getattr(inv, "sibur", 0) - obs[4] = getattr(inv, "mendiane", 0) - obs[5] = getattr(inv, "phiras", 0) - obs[6] = getattr(inv, "thystame", 0) - obs[656] = inv.food - - # 2. Parse vision - if verbose: - print(f" [Agent {client.player_id}] Sending Look...", flush=True) - vision_list = client.look() - if verbose: - print( - f" [Agent {client.player_id}] Look response: {vision_list}", flush=True - ) - if client.is_dead: - return np.zeros(657, dtype=np.int32) - + parsed_inv = parse_inventory_resp(inv) + # Cache inventory for broadcasts in action selection + client.cached_inventory = parsed_inv + + if isinstance(parsed_inv, Inventory): + obs[0] = parsed_inv.food + obs[1] = parsed_inv.linemate + obs[2] = getattr(parsed_inv, "deraumere", 0) + obs[3] = getattr(parsed_inv, "sibur", 0) + obs[4] = getattr(parsed_inv, "mendiane", 0) + obs[5] = getattr(parsed_inv, "phiras", 0) + obs[6] = getattr(parsed_inv, "thystame", 0) + obs[656] = parsed_inv.food + + vision_list = ( + parse_look(look_resp) if look_resp and look_resp.startswith("[") else look_resp + ) if isinstance(vision_list, list): base_index = 7 for i, tile_str in enumerate(vision_list): @@ -79,20 +71,17 @@ def get_observation(client, verbose=False): offset_resource = resources.index(entity) obs[base_index + (i * 8) + offset_resource] += 1 - # 3. Current level obs[655] = client.level + obs[656] = parsed_inv.food if isinstance(parsed_inv, Inventory) else 10 + obs[79] = 0 return obs -def perform_action(client, action_id, verbose=False): - """Maps discrete action ID to ZappyLibClient FFI calls.""" - if client.is_dead: - return "dead" - +def get_action_command_bytes(client, action_id): try: bot_action = ControllerAction(int(action_id)) except ValueError: - return "ko" + return b"" ZAPPY_ITEMS = [ "food", @@ -104,34 +93,26 @@ def perform_action(client, action_id, verbose=False): "thystame", ] - if verbose: - print( - f" [Agent {client.player_id}] Performing action {bot_action}...", - flush=True, - ) - res = "ko" if bot_action == ControllerAction.FORWARD: - res = client.forward() + return b"Forward\n" elif bot_action == ControllerAction.LEFT: - res = client.left() + return b"Left\n" elif bot_action == ControllerAction.RIGHT: - res = client.right() + return b"Right\n" elif bot_action == ControllerAction.LOOK: - res = client.look() + return b"Look\n" elif bot_action == ControllerAction.INVENTORY: - res = client.inventory() + return b"Inventory\n" elif bot_action == ControllerAction.CONNECT_NBR: - res = client.connect_nbr() + return b"Connect_nbr\n" elif bot_action == ControllerAction.FORK: - res = client.fork() + return b"Fork\n" elif bot_action == ControllerAction.EJECT: - res = client.eject() + return b"Eject\n" elif bot_action == ControllerAction.INCANTATION: - res = client.incantation() + return b"Incantation\n" elif bot_action == ControllerAction.BROADCAST: - inv = client.inventory() - if client.is_dead: - return "dead" + inv = getattr(client, "cached_inventory", None) has_stones = ( isinstance(inv, Inventory) and inv.linemate >= 1 @@ -145,16 +126,102 @@ def perform_action(client, action_id, verbose=False): msg = handler.build_message(BroadcastDict.FIND, "food") else: msg = handler.build_message(BroadcastDict.FIND, "stones") - res = client.broadcast(msg) + return f"Broadcast {msg}\n".encode("utf-8") elif ControllerAction.TAKE_FOOD <= bot_action <= ControllerAction.TAKE_THYSTAME: item = ZAPPY_ITEMS[bot_action - ControllerAction.TAKE_FOOD] - res = client.take(item) + return f"Take {item}\n".encode("utf-8") elif ControllerAction.SET_FOOD <= bot_action <= ControllerAction.SET_THYSTAME: item = ZAPPY_ITEMS[bot_action - ControllerAction.SET_FOOD] - res = client.set(item) - if verbose: - print(f" [Agent {client.player_id}] Action response: {res}", flush=True) - return res + return f"Set {item}\n".encode("utf-8") + + return b"" + + +def wait_for_response_no_tick(client): + resp_ptr = client.lib.zappy_get_response(client.server_ptr, client.player_id) + if resp_ptr: + resp = ctypes.cast(resp_ptr, ctypes.c_char_p).value.decode("utf-8").strip() + client.lib.zappy_free_string(resp_ptr) + + if resp == "dead": + client.is_dead = True + return "dead" + + if resp.startswith("Current level:"): + try: + client.level = int(resp.split(":")[1].strip()) + except Exception: + pass + return resp + return None + + +def batch_send_command(clients, command_bytes_list, max_wait_ticks=2000): + if not clients: + return {} + + for client, cmd in zip(clients, command_bytes_list): + if not client.is_dead and cmd: + client.lib.zappy_send_command(client.server_ptr, client.player_id, cmd) + + ticks = 0 + responses = {client: None for client in clients if not client.is_dead} + tick_size_ms = max(1, int(1000 / clients[0].freq)) + + while ticks < max_wait_ticks: + all_done = True + for client in responses: + if responses[client] is None: + resp = wait_for_response_no_tick(client) + if resp is not None: + cmd = command_bytes_list[clients.index(client)] + cmd_str = ( + cmd.decode("utf-8").strip() if isinstance(cmd, bytes) else "" + ) + + is_async = False + if ( + resp.startswith("message") + or resp.startswith("eject:") + or resp.startswith("event_start") + or resp.startswith("event_end") + or resp == "elevation en cours" + ): + is_async = True + elif cmd_str in ["Inventory", "Look"]: + if not resp.startswith("[") and resp != "dead": + is_async = True + else: + if resp not in ["ok", "ko", "dead"] and not resp.startswith( + "Current level:" + ): + is_async = True + + if is_async: + if resp.startswith("message"): + from src.client.lib_client import parse_broadcast + + parsed = parse_broadcast(resp) + if parsed: + client.messages.append(parsed) + all_done = False + else: + responses[client] = resp + else: + all_done = False + + if all_done: + break + + clients[0].lib.zappy_tick(clients[0].server_ptr, tick_size_ms) + ticks += 1 + + for client in list(responses.keys()): + if responses[client] is None: + client.is_dead = True + responses[client] = "dead" + + return responses def classify_performance(avg_level, avg_turns): @@ -178,7 +245,7 @@ def main(): "--model", type=str, default="zappy_ai_model", help="Saved model path/name" ) parser.add_argument( - "--episodes", type=int, default=5, help="Number of test episodes to run" + "--episodes", type=int, default=50, help="Number of test episodes to run" ) parser.add_argument( "--freq", type=int, default=1000, help="Simulation tick frequency" @@ -188,6 +255,22 @@ def main(): action="store_true", help="Print detailed step-by-step logs of agent actions", ) + parser.add_argument("--width", type=int, default=15, help="Map width") + parser.add_argument("--height", type=int, default=15, help="Map height") + parser.add_argument( + "--teams", + type=str, + default="team01,team02", + help="Comma-separated list of team names", + ) + parser.add_argument( + "--players", type=int, default=2, help="Number of players per team" + ) + parser.add_argument( + "--teammates", + action="store_true", + help="Use rule-based teammate bots for the other players on the team (matching training env)", + ) args = parser.parse_args() # Locate model path @@ -195,6 +278,7 @@ def main(): model_path = model_name possible_paths = [ pathlib.Path(model_name), + pathlib.Path(__file__).resolve().parents[1] / "models" / model_name, pathlib.Path(__file__).resolve().parents[3] / model_name, pathlib.Path(__file__).resolve().parents[2] / model_name, ] @@ -220,16 +304,26 @@ def main(): ) sys.exit(84) - width, height = 15, 15 - teams = ["team01", "team02"] + width = args.width + height = args.height + teams = [t.strip() for t in args.teams.split(",")] num_teams = len(teams) - clients_nb = 2 + clients_nb = args.players all_turns = [] all_levels = [] + stats = { + "actions": {a.name: 0 for a in ControllerAction}, + "incantations_attempted": 0, + "incantations_succeeded": 0, + "items_taken": {}, + "items_set": {}, + "deaths": 0, + } + print( - f"[Eval] Starting evaluation: {args.episodes} episodes (2 teams of 2 players each)..." + f"[Eval] Starting evaluation: {args.episodes} episodes ({num_teams} teams of {clients_nb} players each)..." ) for ep in range(args.episodes): @@ -240,21 +334,24 @@ def main(): width, height, args.freq, team_ptrs, num_teams, clients_nb ) - # 2. Add players - p1 = zappy_lib.lib.zappy_add_player(server_ptr, b"team01") - p2 = zappy_lib.lib.zappy_add_player(server_ptr, b"team01") - p3 = zappy_lib.lib.zappy_add_player(server_ptr, b"team02") - p4 = zappy_lib.lib.zappy_add_player(server_ptr, b"team02") - - c1 = ZappyLibClient(zappy_lib.lib, server_ptr, p1, args.freq) - c2 = ZappyLibClient(zappy_lib.lib, server_ptr, p2, args.freq) - c3 = ZappyLibClient(zappy_lib.lib, server_ptr, p3, args.freq) - c4 = ZappyLibClient(zappy_lib.lib, server_ptr, p4, args.freq) - - c1.team_name, c2.team_name = "team01", "team01" - c3.team_name, c4.team_name = "team02", "team02" - - clients = [c1, c2, c3, c4] + # 2. Add players and clients dynamically + clients = [] + ppo_clients = [] + teammate_clients = [] + for team_name in teams: + for i in range(clients_nb): + p_id = zappy_lib.lib.zappy_add_player( + server_ptr, team_name.encode("utf-8") + ) + client = ZappyLibClient(zappy_lib.lib, server_ptr, p_id, args.freq) + client.team_name = team_name + if args.teammates and i > 0: + client.name = f"TeammateBot_{p_id}" + teammate_clients.append(client) + else: + client.name = f"Player_{p_id}" + ppo_clients.append(client) + clients.append(client) # Consume initial server logs for c in clients: @@ -263,13 +360,23 @@ def main(): turns = 0 max_turns = 10000 # Safety cap to avoid infinite loops + dead_clients = set() # Episode Loop while turns < max_turns: + # Sync dead clients to stats + for client in clients: + if client.is_dead and client not in dead_clients: + dead_clients.add(client) + if client in ppo_clients: + stats["deaths"] += 1 + active_clients = [c for c in clients if not c.is_dead] if not active_clients: break + previous_levels = {c: c.level for c in active_clients} + if turns % 100 == 0: levels_str = ", ".join( f"C{i + 1}:L{c.level}" for i, c in enumerate(clients) @@ -280,20 +387,167 @@ def main(): flush=True, ) + # 1. Batch query Inventory for all active clients + inventories = batch_send_command( + active_clients, [b"Inventory\n"] * len(active_clients) + ) + + # 2. Batch query Look for all active clients + looks = batch_send_command( + active_clients, [b"Look\n"] * len(active_clients) + ) + + # Mark dead clients for client in active_clients: - try: - obs = get_observation(client, verbose=args.verbose) - if client.is_dead: - continue - action, _ = model.predict(obs, deterministic=True) - perform_action(client, action, verbose=args.verbose) - except Exception: + inv = inventories.get(client) + look_resp = looks.get(client) + if inv == "dead" or look_resp == "dead" or client.is_dead: client.is_dead = True + # 2.5 Parse broadcasts for all active clients to find coordinate direction + for client in active_clients: + unread = client.get_unread_messages() + best_h = {"score": 0, "dir": 0, "text": ""} + handler = BroadcastHandler( + team_name=client.team_name, secret_key="ZAPPY_SEC" + ) + for msg in unread: + direction = msg.get("direction", 0) + text = msg.get("text", "") + h = handler.calculate_heuristic(direction, text) + if h["score"] > best_h["score"]: + best_h = h + best_h["dir"] = direction + best_h["text"] = text + client.last_broadcast_dir = best_h["dir"] + client.last_broadcast_text = best_h["text"] + + # 3. Build observations and predict actions for PPO agents only + actions = {} + active_ppo = [c for c in ppo_clients if not c.is_dead] + for client in active_ppo: + inv = inventories.get(client) + look_resp = looks.get(client) + + if inv == "dead" or look_resp == "dead" or client.is_dead: + client.is_dead = True + if client not in dead_clients: + dead_clients.add(client) + stats["deaths"] += 1 + continue + + # Parse inventory for hybrid logic + parsed_inv = parse_inventory_resp(inv) + best_dir = getattr(client, "last_broadcast_dir", 0) + best_text = getattr(client, "last_broadcast_text", "") + + vision_list = ( + parse_look(look_resp) + if look_resp and look_resp.startswith("[") + else look_resp + ) + + obs = build_observation(client, inv, look_resp, verbose=args.verbose) + + from src.strategy.state_machine import get_hybrid_action + + action, _ = get_hybrid_action( + client=client, + parsed_inv=parsed_inv, + vision_list=vision_list, + current_level=client.level, + best_dir=best_dir, + best_text=best_text, + model=model, + obs=obs, + ) + + actions[client] = action + if args.verbose: + food_count = ( + parsed_inv.food if isinstance(parsed_inv, Inventory) else 10 + ) + print( + f"[Turn {turns}] Client {client.player_id}: Food={food_count}, RawInv={repr(inv)}, Action={ControllerAction(action).name}, Path={getattr(client, 'path_steps', [])}" + ) + + # 4. Batch execute the actions + clients_to_act = [c for c in active_clients if c in actions] + if clients_to_act: + action_bytes_list = [ + get_action_command_bytes(c, actions[c]) for c in clients_to_act + ] + action_responses = batch_send_command(clients_to_act, action_bytes_list) + + for client in clients_to_act: + res = action_responses.get(client) + action = actions[client] + bot_action = ControllerAction(int(action)) + stats["actions"][bot_action.name] += 1 + + if bot_action == ControllerAction.INCANTATION: + stats["incantations_attempted"] += 1 + + if bot_action == ControllerAction.TAKE_FOOD: + if res == "ok": + stats["items_taken"]["food"] = ( + stats["items_taken"].get("food", 0) + 1 + ) + elif ( + ControllerAction.TAKE_LINEMATE + <= bot_action + <= ControllerAction.TAKE_THYSTAME + ): + if res == "ok": + item_name = bot_action.name.replace("TAKE_", "").lower() + stats["items_taken"][item_name] = ( + stats["items_taken"].get(item_name, 0) + 1 + ) + elif bot_action == ControllerAction.SET_FOOD: + if res == "ok": + stats["items_set"]["food"] = ( + stats["items_set"].get("food", 0) + 1 + ) + elif ( + ControllerAction.SET_LINEMATE + <= bot_action + <= ControllerAction.SET_THYSTAME + ): + if res == "ok": + item_name = bot_action.name.replace("SET_", "").lower() + stats["items_set"][item_name] = ( + stats["items_set"].get(item_name, 0) + 1 + ) + + if res == "dead" or client.is_dead: + client.is_dead = True + if client in ppo_clients and client not in dead_clients: + dead_clients.add(client) + stats["deaths"] += 1 + + # Check for successful level ups + for client in active_ppo: + prev_lvl = previous_levels.get(client, 1) + if client.level > prev_lvl: + stats["incantations_succeeded"] += client.level - prev_lvl + + # Run teammate bot decisions (once every 5 turns) + if args.teammates and teammate_clients and (turns % 5 == 0): + from src.strategy.decision_making import take_decision + + for teammate in teammate_clients: + if not teammate.is_dead: + try: + if teammate.level >= 2 and (turns % 10 == 0): + teammate.broadcast("COME") + take_decision(teammate) + except Exception: + teammate.is_dead = True + turns += 1 # Collect metrics - ep_levels = [c.level for c in clients] + ep_levels = [c.level for c in ppo_clients] all_levels.extend(ep_levels) all_turns.append(turns) @@ -309,7 +563,35 @@ def main(): max_turns_seen = int(np.max(all_turns)) tier = classify_performance(avg_level, avg_turns) - # 1. Print to console + # Calculate detailed action analytics + total_actions = sum(stats["actions"].values()) + + movement_actions = ["FORWARD", "LEFT", "RIGHT"] + vision_actions = ["LOOK", "INVENTORY", "CONNECT_NBR"] + take_stone_actions = [ + a.name + for a in ControllerAction + if a.name.startswith("TAKE_") and a.name != "TAKE_FOOD" + ] + set_stone_actions = [ + a.name + for a in ControllerAction + if a.name.startswith("SET_") and a.name != "SET_FOOD" + ] + + movement_count = sum(stats["actions"].get(a, 0) for a in movement_actions) + vision_count = sum(stats["actions"].get(a, 0) for a in vision_actions) + take_food_count = stats["actions"].get("TAKE_FOOD", 0) + take_stone_count = sum(stats["actions"].get(a, 0) for a in take_stone_actions) + set_stone_count = sum(stats["actions"].get(a, 0) for a in set_stone_actions) + incant_count = stats["actions"].get("INCANTATION", 0) + broadcast_count = stats["actions"].get("BROADCAST", 0) + fork_count = stats["actions"].get("FORK", 0) + + def pct(count): + return (count / total_actions * 100) if total_actions > 0 else 0.0 + + # Print to console print("\n" + "=" * 50) print(" EVALUATION REPORT") print("=" * 50) @@ -321,7 +603,41 @@ def main(): print(f" RATING TIER: {tier}") print("=" * 50 + "\n") - # 2. Save results to files + print("=" * 50) + print(" BEHAVIOR ANALYSIS") + print("=" * 50) + print("| Event / Action Category| Count | % of Total |") + print("|------------------------|--------------|-------------|") + print( + f"| Movement (Fwd/L/R) | {movement_count:<12d} | {pct(movement_count):<10.1f}% |" + ) + print( + f"| Vision & Info (Look/Iv)| {vision_count:<12d} | {pct(vision_count):<10.1f}% |" + ) + print( + f"| Take Food | {take_food_count:<12d} | {pct(take_food_count):<10.1f}% |" + ) + print( + f"| Take Stone | {take_stone_count:<12d} | {pct(take_stone_count):<10.1f}% |" + ) + print( + f"| Set Stone | {set_stone_count:<12d} | {pct(set_stone_count):<10.1f}% |" + ) + print( + f"| Broadcast Radio | {broadcast_count:<12d} | {pct(broadcast_count):<10.1f}% |" + ) + print(f"| Fork Allied Slots | {fork_count:<12d} | {pct(fork_count):<10.1f}% |") + print( + f"| Incantations Attempted | {incant_count:<12d} | {pct(incant_count):<10.1f}% |" + ) + print("-" * 50) + print( + f"| Incantations Succeeded | {stats['incantations_succeeded']:<12d} | (Succeed rate: {(stats['incantations_succeeded'] / stats['incantations_attempted'] * 100) if stats['incantations_attempted'] > 0 else 0:.1f}%) |" + ) + print(f"| Starved Deaths | {stats['deaths']:<12d} |") + print("=" * 50 + "\n") + + # Save results to files results_dir = pathlib.Path(__file__).resolve().parents[1] / "results" results_dir.mkdir(parents=True, exist_ok=True) @@ -334,13 +650,31 @@ def main(): **Date**: {datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")} **Model**: `{model_name}` **Episodes**: {args.episodes} +**Map Size**: `{width}x{height}` +**Teams**: `{", ".join(teams)} ({clients_nb} players/team)` +## Overall Performance Metrics | Metric | Average | Max | | :--- | :---: | :---: | | Level Achieved | {avg_level:.2f} | {max_level} | | Turns Survived | {avg_turns:.2f} | {max_turns_seen} | **Rating Tier**: {tier} + +## Agent Behavior Distribution +| Event / Action Category | Count | % of Total | +| :--- | :---: | :---: | +| Movement (Forward, Left, Right) | {movement_count} | {pct(movement_count):.1f}% | +| Vision & Info (Look, Inventory, Connect_nbr) | {vision_count} | {pct(vision_count):.1f}% | +| Take Food | {take_food_count} | {pct(take_food_count):.1f}% | +| Take Stone | {take_stone_count} | {pct(take_stone_count):.1f}% | +| Set Stone | {set_stone_count} | {pct(set_stone_count):.1f}% | +| Broadcast Radio | {broadcast_count} | {pct(broadcast_count):.1f}% | +| Fork Allied Slots | {fork_count} | {pct(fork_count):.1f}% | +| Incantations Attempted | {incant_count} | {pct(incant_count):.1f}% | + +**Incantations Succeeded**: {stats["incantations_succeeded"]} / {stats["incantations_attempted"]} (Success rate: {(stats["incantations_succeeded"] / stats["incantations_attempted"] * 100) if stats["incantations_attempted"] > 0 else 0:.1f}%) +**Starved Deaths**: {stats["deaths"]} """ try: diff --git a/ai/training/training_env/train.py b/ai/training/training_env/train.py index 66397a0..5d37a6e 100644 --- a/ai/training/training_env/train.py +++ b/ai/training/training_env/train.py @@ -2,15 +2,17 @@ import os import multiprocessing import time - +import logging from stable_baselines3 import PPO from stable_baselines3.common.callbacks import BaseCallback from stable_baselines3.common.env_checker import check_env from stable_baselines3.common.vec_env import SubprocVecEnv from stable_baselines3.common.env_util import make_vec_env - from training.training_env.ZappyEnv import ZappyEnv +# Suppress verbose decision-making logs from teammate bots during training +logging.getLogger("zappy_ai").setLevel(logging.CRITICAL) + class TimestepCallback(BaseCallback): def __init__(self, total_timesteps, verbose=0): @@ -56,8 +58,6 @@ def main(): parser.add_argument( "--timesteps", type=int, default=50000, help="Total timesteps to train" ) - parser.add_argument("--width", type=int, default=10, help="Map width") - parser.add_argument("--height", type=int, default=10, help="Map height") parser.add_argument("--freq", type=int, default=100, help="Simulation frequency") parser.add_argument("--team", type=str, default="TeamAI", help="Team name") parser.add_argument( @@ -82,6 +82,11 @@ def main(): ) args = parser.parse_args() + models_dir = os.path.abspath( + os.path.join(os.path.dirname(os.path.realpath(__file__)), "../models") + ) + os.makedirs(models_dir, exist_ok=True) + print("Verifying single environment compliance") temp_env = ZappyEnv( use_lib=True, @@ -126,6 +131,11 @@ def main(): if args.load_model: # Resolve path load_path = args.load_model + if not os.path.dirname(load_path): + load_path = os.path.join(models_dir, load_path) + else: + load_path = os.path.abspath(load_path) + if not load_path.endswith(".zip") and not os.path.exists(load_path): if os.path.exists(load_path + ".zip"): load_path = load_path + ".zip" @@ -153,8 +163,16 @@ def main(): model.learn(total_timesteps=args.timesteps, callback=callback) # Save the trained model weights to a zip file - model.save(args.model_name) - print(f"Finished and saved on {args.model_name}.zip") + model_path = args.model_name + if not os.path.dirname(model_path): + model_path = os.path.join(models_dir, model_path) + else: + model_path = os.path.abspath(model_path) + + model.save(model_path) + if not model_path.endswith(".zip"): + model_path += ".zip" + print(f"Finished and saved on {model_path}") elapsed_time = time.time() - start_time minutes = int(elapsed_time // 60) diff --git a/zappy_general_v1.zip b/zappy_general_v1.zip new file mode 100644 index 0000000..34bccdf Binary files /dev/null and b/zappy_general_v1.zip differ diff --git a/zappy_level2_v2.zip b/zappy_level2_v2.zip new file mode 100644 index 0000000..b257181 Binary files /dev/null and b/zappy_level2_v2.zip differ