Bots: env reporting, TFIL movement, gun selector and docs refresh
DevControlBot DevControlBot.sh env-file handling and defines, tfil.nim
survival-movement rework, README
ModularBot .env.example, ModularBot.nim, env_report.nim, vbullet_draw.nim
PPO_Bot enemy_tracker.nim
common_libs gun_harness/selector.nim
tests env_report, lead_gain_legacy, rack_membership,
rack_stat_width, tm_pattern_registration adjustments
docs env_reference.md, goto-controller-algorithm.md
This commit is contained in:
@@ -399,14 +399,14 @@ tank.
|
||||
|
||||
| variable | default | what it does |
|
||||
|---|---|---|
|
||||
| `TR_RACK_<GUN>` | `PATTERN=both`, all other 15 guns `off` | membership: `both` \| `1v1` \| `melee` \| `off` |
|
||||
| `TR_RACK_<GUN>` | `PATTERN=both`, all other 17 guns `off` | membership: `both` \| `1v1` \| `melee` \| `off` |
|
||||
| `GUN_RACK_DISABLE` | empty | comma-separated gun **ids** to remove entirely (older mechanism; the gun never even spawns virtual bullets) |
|
||||
| `GUN_STATS_PATH` | `/tmp/gun_stats.jsonl` | where the per-round per-gun stats are written |
|
||||
| `GUN_SHOTLOG_PATH` | `/tmp/shot_log.jsonl` | where the per-shot JSONL is written |
|
||||
|
||||
`<GUN>` names (ids 0-15, `selector.nim:52`):
|
||||
`<GUN>` names (ids 0-17, `selector.nim:RackGunNames`):
|
||||
`HEADON LINEAR TSETLIN CIRCULAR GUESSFACTOR PATTERN WALLBOUNCE ACCEL STOPSHOT
|
||||
DISPLACE AVGLEAD DECAYGF KNN TMSELECT TMPATTERN TMHORIZON`.
|
||||
DISPLACE AVGLEAD DECAYGF KNN TMSELECT TMPATTERN TMHORIZON LEADGAIN KNOWLEDGE`.
|
||||
|
||||
Shipped default membership (`selector.nim:DefaultRackMembership`):
|
||||
|
||||
@@ -420,6 +420,8 @@ Shipped default membership (`selector.nim:DefaultRackMembership`):
|
||||
| **PATTERN** | **both** | TMSELECT | off |
|
||||
| WALLBOUNCE | off | TMPATTERN | off |
|
||||
| ACCEL | off | TMHORIZON | off |
|
||||
| STOPSHOT | off | LEADGAIN | off |
|
||||
| KNOWLEDGE | off | | |
|
||||
|
||||
`TR_RACK_<GUN>` accepts aliases: `both`/`any`/empty → both;
|
||||
`1v1`/`single`/`lock` → 1v1; `melee`/`multi` → melee;
|
||||
@@ -429,6 +431,10 @@ to `both`** (`selector.nim:parseRackMembership`).
|
||||
The `1v1`/`melee` split is driven by **server truth**, `getEnemyCount()`:
|
||||
`== 1` → 1v1 rack, `> 1` → melee rack (`virtual_bullets.rackMode`).
|
||||
|
||||
| variable | default | what it does |
|
||||
|---|---|---|
|
||||
| `TR_KNOWLEDGE_MEM` | empty (memory only) | path of the learned table `KNOWLEDGE` (id 17) loads at the first round boundary and re-saves (atomically, after a prune) at every boundary. Unset = nothing is ever written to disk. |
|
||||
|
||||
**Empty-set fallback:** if every gun is filtered out for a mode, the *selector*
|
||||
falls back to the **full rack** so it can never end up with no gun
|
||||
(`admittedGuns`, `virtual_bullets.nim`). Note this fallback is on *selection*;
|
||||
|
||||
@@ -48,8 +48,20 @@ is smooth but limited to 4°/tick at top speed.
|
||||
|
||||
### Coordinate system
|
||||
|
||||
North = 0°, clockwise. `directionTo` in `utils.nim` returns a bearing in
|
||||
`[0, 360)`. `bearingTo` returns a signed relative bearing in `(-180, 180]`.
|
||||
East = 0°, North = 90°, positive angles increase counter-clockwise (Y increases
|
||||
upward, so the arena's bottom edge is Y = 0). `directionTo` in `utils.nim`
|
||||
returns a bearing in `[0, 360)`. `bearingTo` returns a signed relative bearing in
|
||||
`(-180, 180]`.
|
||||
|
||||
> **Note — the SDK's own doc comments are wrong here.** `bot.nim:183/187/191`,
|
||||
> `utils.nim:68` and the examples at `utils.nim:159-161` and `~197` all claim
|
||||
> "0 = North, 90 = East". The **implementation is authoritative**, not the
|
||||
> comments: `utils.nim:162` computes
|
||||
> `normalizeAbsoluteAngle(180.0 * arctan2(toY - fromY, toX - fromX) / PI)`, i.e.
|
||||
> plain `arctan2(dy, dx)`, and `bot.nim:178` puts the arena's bottom edge at
|
||||
> `Y = 0`. Running the SDK's own `directionTo` (robocode_tankroyale_botapi
|
||||
> 1.0.7) returns `0.0` for East and `90.0` for North, and `bearingTo` agrees.
|
||||
> Do not "fix" this section back to the commented convention.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user