feat(ModularBot): pluggable bot with 4 guns, phantom meteor movement, radar harness
- Gun harness: virtual bullet tracker, rolling fitness, auto-selector - Guns: head-on, linear (extrapolation), circular (integrated formula), tsetlin machine (learning) - Movement: phantom meteor gravity engine (danger histograms, phantom bullets, fire detection) - Radar: harness + radar_lock adapter - Color-coded modules: turret/bullet color per gun, body per movement, scan per radar - Beats Target, SpinBot, Crazy, TrackFire in 10-round battles
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import std/[os, strutils]
|
||||
import test_framework/test_framework
|
||||
import test_framework/battle_result
|
||||
import test_framework/server_manager
|
||||
import test_framework/bot_compiler
|
||||
import test_framework/runner_process
|
||||
|
||||
const
|
||||
modularBotDir = currentSourcePath().parentDir.parentDir
|
||||
tfAdversaries = currentSourcePath().parentDir.parentDir.parentDir /
|
||||
"common_libs" / "test_framework" / "adversaries"
|
||||
sittingDuck = tfAdversaries / "SittingDuck"
|
||||
|
||||
# Skip if JARs are missing
|
||||
if not fileExists("/home/davide/Projects/tank-royale/server/build/libs/robocode-tankroyale-server-0.35.5-all.jar") or
|
||||
not fileExists("/home/davide/Projects/tank-royale/runner/examples/lib/robocode-tankroyale-runner.jar"):
|
||||
echo "Skipping: Tank Royale JARs not found"
|
||||
quit(0)
|
||||
|
||||
# Compile bots
|
||||
let compiledBots = compileBots(@[modularBotDir, sittingDuck])
|
||||
echo "Compiled bots: ", compiledBots
|
||||
|
||||
# Run battle
|
||||
ensureServer()
|
||||
let stdout = runBattleRunner(getServerUrl(), @[modularBotDir, sittingDuck], 3, 300000, true)
|
||||
echo ""
|
||||
echo "Raw battle runner output (last 50 lines):"
|
||||
let lines = stdout.split('\n')
|
||||
let start = max(0, lines.len - 50)
|
||||
for i in start..<lines.len:
|
||||
echo lines[i]
|
||||
Reference in New Issue
Block a user