Balance: easy AI stays smaller; balance runs documented

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-06 15:34:03 +01:00
1 parent 28eac52953
commit e85e602491
3 files changed
+58 -2

No files matched your search

+1 -1
View File
@@ -16,7 +16,7 @@ const MAX_IMPS: [usize; 3] = [5, 7, 9];
const FIRST_ATTACK: [f32; 3] = [940.0, 625.0, 430.0]; // no attack before (seconds)
const BOLDNESS: [f32; 3] = [1.0, 1.2, 1.35]; // own army / enemy army needed to attack (easy is reckless, hard waits)
const MARK_REACH: i32 = 5; // an AI master marks only this close to its own ground
const CREATURE_TARGET: [usize; 3] = [30, 50, 80]; // beds an AI master builds up to
const CREATURE_TARGET: [usize; 3] = [24, 50, 80]; // beds an AI master builds up to
const MAX_TOWERS: [usize; 3] = [1, 2, 4];
const START_GOLD: [f32; 3] = [1500.0, 2500.0, 3500.0];
+6 -1
View File
@@ -89,7 +89,12 @@ fn seeds() -> Vec<u32> {
fn balance_difficulty() {
println!("\n== difficulty duels (2 masters, 112x112, no waves, 45 min) ==");
println!("{:<14} {:>5} {:>5} {:>5} {:>8}", "pair", "A", "B", "draw", "min");
for (a, b) in [(0u8, 1u8), (1, 2), (0, 2), (1, 1)] {
// BALANCE_PAIR=a,b runs one pairing only
let pairs: Vec<(u8, u8)> = match std::env::var("BALANCE_PAIR").ok().and_then(|p| p.split_once(',').map(|(a, b)| (a.parse().ok(), b.parse().ok()))) {
Some((Some(a), Some(b))) => vec![(a, b)],
_ => vec![(0, 1), (1, 2), (0, 2), (1, 1)],
};
for (a, b) in pairs {
let (mut wa, mut wb, mut dr, mut mins) = (0, 0, 0, 0.0);
for (k, seed) in seeds().into_iter().enumerate() {
let mut g = arena(seed, 112);