chore: standardize internal bot dir structure (src/, tests/, out/)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
switch("path", "../src")
|
||||
switch("path", "../../common_libs/tankroyale_botapi")
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
import std/[math, random]
|
||||
import arraymancer
|
||||
import "../network"
|
||||
import "../training"
|
||||
import PPO_Bot/network
|
||||
import PPO_Bot/training
|
||||
|
||||
var ac = initActorCritic()
|
||||
var adam: ACAdamStates # uninitialised → ppoUpdate must reinit (fresh-process path)
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
import std/[os]
|
||||
import arraymancer
|
||||
import "../network"
|
||||
import "../training"
|
||||
import "../weights"
|
||||
import PPO_Bot/network
|
||||
import PPO_Bot/training
|
||||
import PPO_Bot/weights
|
||||
|
||||
const weightsRoot = currentSourcePath().parentDir.parentDir / "weights"
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import arraymancer
|
||||
import std/math
|
||||
import "../actions"
|
||||
import PPO_Bot/actions
|
||||
|
||||
template check(cond: bool, msg: string) =
|
||||
if not cond:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
## Run: nim c -r tests/test_controllers.nim
|
||||
|
||||
import std/math
|
||||
import "../controllers"
|
||||
import PPO_Bot/controllers
|
||||
|
||||
template check(cond: bool, msg: string) =
|
||||
if not cond:
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
import arraymancer
|
||||
import std/[math, strformat]
|
||||
import ../network
|
||||
import ../actions
|
||||
import PPO_Bot/network
|
||||
import PPO_Bot/actions
|
||||
|
||||
func isFiniteF(x: float32): bool = classify(x) notin {fcNan, fcInf, fcNegInf}
|
||||
func isNaNF(x: float32): bool = classify(x) == fcNan
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
## Run: nim c -r tests/test_radar_lock.nim
|
||||
|
||||
import std/[math, strformat]
|
||||
import "../enemy_tracker"
|
||||
import PPO_Bot/enemy_tracker
|
||||
|
||||
template check(cond: bool, msg: string) =
|
||||
if not cond:
|
||||
|
||||
@@ -5,8 +5,8 @@ import std/[math, strformat]
|
||||
import arraymancer
|
||||
|
||||
# Import from parent dir
|
||||
import "../enemy_tracker"
|
||||
import "../state_vector"
|
||||
import PPO_Bot/enemy_tracker
|
||||
import PPO_Bot/state_vector
|
||||
|
||||
template check(cond: bool, msg: string) =
|
||||
if not cond:
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
import std/[math, random]
|
||||
import arraymancer
|
||||
import "../network"
|
||||
import "../training"
|
||||
import PPO_Bot/network
|
||||
import PPO_Bot/training
|
||||
|
||||
template check(cond: bool, msg: string) =
|
||||
if not cond:
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
import std/[os, math]
|
||||
import arraymancer
|
||||
import "../network"
|
||||
import "../training"
|
||||
import "../weights"
|
||||
import PPO_Bot/network
|
||||
import PPO_Bot/training
|
||||
import PPO_Bot/weights
|
||||
|
||||
template check(cond: bool, msg: string) =
|
||||
if not cond:
|
||||
|
||||
Reference in New Issue
Block a user