fix(gun_harness): bump virtual bullet ring buffer 512→2048
With 12 guns × 4 power bins = 48 bullets/tick, 512 slots overflow before slow bullets resolve (~36 ticks travel). 2048 gives headroom. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Binary file not shown.
@@ -9,7 +9,7 @@ import gun_interface
|
|||||||
const
|
const
|
||||||
PowerBins* = [1.0, 1.5, 2.0, 3.0] ## 4 bins; ponytail: fixed array, add runtime config if needed
|
PowerBins* = [1.0, 1.5, 2.0, 3.0] ## 4 bins; ponytail: fixed array, add runtime config if needed
|
||||||
WindowSize* = 50 ## rolling window ticks for fitness
|
WindowSize* = 50 ## rolling window ticks for fitness
|
||||||
MaxBullets* = 512 ## hard cap; ponytail: ring buffer, resize if more guns added
|
MaxBullets* = 2048 ## hard cap; ponytail: ring buffer, resize if more guns added
|
||||||
MinHitRate* = 0.40 ## 40% threshold for acceptable power selection
|
MinHitRate* = 0.40 ## 40% threshold for acceptable power selection
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|||||||
Executable
BIN
Binary file not shown.
@@ -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"
|
||||||
|
patternMover = "/home/davide/Projects/SirRoboGarage/PatternMover_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("Crazy", crazy)
|
||||||
|
battle("WaveSurfer", waveSurfer)
|
||||||
|
battle("PatternMover", patternMover)
|
||||||
Reference in New Issue
Block a user