feat(ModularBot): decay-GF gun (recency-weighted), 13 guns total
- Decay-GF: exponential decay on GF histogram (0.998/tick, ~350-tick half-life) - Adapts faster to mid-battle strategy changes than standard GF - Battle-tested vs WaveSurfer, Crazy, RandomMover
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import std/[os, strformat]
|
||||
import common_libs/test_framework/test_framework
|
||||
|
||||
const
|
||||
modularBotDir = "/home/davide/Projects/SirRoboGarage/ModularBot_garage"
|
||||
samplesDir = "/home/davide/Downloads/robocode-tankroyale/sample-bots-nim-linux-1.0.7"
|
||||
crazy = samplesDir / "Crazy"
|
||||
waveSurfer = "/home/davide/Projects/SirRoboGarage/WaveSurfer_garage"
|
||||
randomMover = "/home/davide/Projects/SirRoboGarage/RandomMover_garage"
|
||||
|
||||
const serverJar = "/home/davide/Projects/tank-royale/server/build/libs/robocode-tankroyale-server-0.35.5-all.jar"
|
||||
const runnerJar = "/home/davide/Projects/tank-royale/runner/examples/lib/robocode-tankroyale-runner.jar"
|
||||
|
||||
if not fileExists(serverJar) or not fileExists(runnerJar):
|
||||
echo "Skipping: Tank Royale JARs not found"
|
||||
quit(0)
|
||||
|
||||
proc battle(name: string, dir: string) =
|
||||
echo fmt"--- ModularBot vs {name} (10 rounds) ---"
|
||||
let r = runBattle(@[modularBotDir, dir], rounds = 10, timeout = 300000, maxSpeed = true)
|
||||
for result in r.results:
|
||||
echo fmt" {result.name}: score={result.totalScore} rank={result.rank}"
|
||||
echo ""
|
||||
|
||||
battle("WaveSurfer", waveSurfer)
|
||||
battle("Crazy", crazy)
|
||||
battle("RandomMover", randomMover)
|
||||
Reference in New Issue
Block a user