From e455566c8e3230abd45368c92427ea7113147f04 Mon Sep 17 00:00:00 2001 From: Davide Cappellini Date: Mon, 24 Aug 2026 00:00:21 +0200 Subject: [PATCH] =?UTF-8?q?docs:=20CONTEXT.md=20=E2=80=94=20Evo=5FBot=20do?= =?UTF-8?q?main=20vocabulary=20(#62)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- CONTEXT.md | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 CONTEXT.md diff --git a/CONTEXT.md b/CONTEXT.md new file mode 100644 index 0000000..3ab8c5e --- /dev/null +++ b/CONTEXT.md @@ -0,0 +1,59 @@ +# Evo_Bot + +Robocode Tank Royale bot with a modular gun system where evolved neural networks learn to predict enemy dodge behavior. + +## Language + +**Evo_Bot**: +The bot itself — handles movement and firing discipline. Guns are pluggable modules. +_Avoid_: robot, tank + +**Guess Factor (GF)**: +A value from -1 to +1 representing where on the maximum escape angle arc the enemy is. 0 = directly ahead, -1 = full left dodge, +1 = full right dodge. The gun's prediction target. +_Avoid_: aim offset, dodge index + +**Max Escape Angle (MEA)**: +The widest angle the enemy can reach before a bullet arrives, computed from distance and bullet speed. Guess factor is multiplied by MEA to get the aim offset. + +**Lateral Velocity**: +Enemy speed projected perpendicular to the line between you and them. The primary signal for guess factor prediction. +_Avoid_: tangential speed, sideways velocity + +**Sliding Window**: +The last N ticks (default 30) of enemy state fed as input to the network. Each tick contains lateral velocity, heading delta, and wall distance ahead. +_Avoid_: observation buffer, input history + +**Replay Tape**: +Rolling buffer of recorded enemy states (~2000 ticks). The evolution thread evaluates gun fitness against this tape. +_Avoid_: experience buffer, replay buffer + +**Virtual Gun**: +A gun that runs in parallel without actually firing. It tracks where it would have aimed and whether a simulated bullet would have hit. Used to compare gun variants. + +**Virtual Bullet**: +A simulated bullet fired by a virtual gun. Never actually sent to the game engine. + +**TOPO_Gun**: +Fixed-topology ANN gun evolved by GA. Network shape is predetermined (e.g., 91-8-1), only weights are evolved. +_Avoid_: static gun, fixed gun + +**NEAT_Gun**: +Variable-topology ANN gun where evolution can add/remove neurons and connections (NEAT algorithm). Deferred — only built if TOPO_Gun hits a ceiling. + +**Population**: +The set of candidate networks (default 64-200) being evolved. Each member is a complete set of ANN weights. + +**Champion**: +The best-performing network in the current GA population. The champion's weights are pushed to the inference side when it beats the current best. +_Avoid_: best, winner, elite + +**Fitness**: +Hit count when a network's aim predictions are evaluated as virtual bullets against sampled ticks from the replay tape. +_Avoid_: score, reward + +**Cold Start**: +The first-ever battle with no saved weights. The gun does not fire until the evolution thread produces its first champion. Subsequent battles load persisted weights. + +**Weight Persistence**: +Saving evolved weights to disk. Load order: per-opponent file, then global fallback, then random initialization. +_Avoid_: model saving, checkpointing