cleanup codebase to use the .testing as local folder with test content

This commit is contained in:
2026-04-06 16:48:09 +02:00
parent fbc7a50f34
commit af7df92f4d
2 changed files with 8 additions and 10 deletions
+7 -7
View File
@@ -12,8 +12,8 @@ set dotenv-required := true
# Use zsh
set shell := ["bash", "-cu"]
BATTLESNAKE_CLI_DIR := ".tools/battlesnake-cli"
BATTLESNAKE_CLI_BIN := ".tools/battlesnake-cli/battlesnake"
BATTLESNAKE_CLI_DIR := ".testing/tools/battlesnake-cli"
BATTLESNAKE_CLI_BIN := ".testing/tools/battlesnake-cli/battlesnake"
# ------------------------------------------------------------------------------
# Default
@@ -112,7 +112,7 @@ test-local-4 mode="standard" map="standard" base_port="9101" snake="BestBattleSn
set -euo pipefail
BATTLESNAKE_CLI="{{justfile_directory()}}/{{BATTLESNAKE_CLI_BIN}}"
LOG_DIR="{{justfile_directory()}}/.tools/snake-logs"
LOG_DIR="{{justfile_directory()}}/.testing/tools/snake-logs"
mkdir -p "$LOG_DIR"
pids=()
@@ -162,17 +162,17 @@ test-local-4 mode="standard" map="standard" base_port="9101" snake="BestBattleSn
# Dataset helpers
# ------------------------------------------------------------------------------
export-dataset input="data" output="data/dataset/good_moves.jsonl":
export-dataset input=".testing/data" output=".testing/data/dataset/good_moves.jsonl":
python -m server.DatasetExporter --input "{{input}}" --output "{{output}}"
curate-dataset input="good_moves-*.jsonl" output="data/dataset/best_moves.jsonl" min_turn="6" late_turn="20" max_safe_options="2" min_score="3" append="false" archive="false" archive_dir="":
curate-dataset input="good_moves-*.jsonl" output=".testing/data/dataset/best_moves.jsonl" min_turn="6" late_turn="20" max_safe_options="2" min_score="3" append="false" archive="false" archive_dir="":
FLAGS=""; if [ "{{append}}" = "true" ]; then FLAGS="$FLAGS --append"; fi; if [ "{{archive}}" = "true" ]; then FLAGS="$FLAGS --archive-input"; fi; if [ -n "{{archive_dir}}" ]; then FLAGS="$FLAGS --archive-dir {{archive_dir}}"; fi; python -m server.DatasetCurator --input "{{input}}" --output "{{output}}" --min-turn "{{min_turn}}" --late-turn "{{late_turn}}" --max-safe-options "{{max_safe_options}}" --min-score "{{min_score}}" $FLAGS
analyze-dataset input="good_moves-*.jsonl" output="":
if [ -n "{{output}}" ]; then python -m server.DatasetStats --input "{{input}}" --output "{{output}}"; else python -m server.DatasetStats --input "{{input}}"; fi
train-ai input="dataset/best_moves.jsonl" rl_input="dataset/rl_bootstrap.jsonl" output="models/battlesnake_softmax_v2.json" eval_split="0.2" seed="42" epochs="14" lr="0.08":
train-ai input=".testing/data/dataset/best_moves.jsonl" rl_input=".testing/data/dataset/rl_bootstrap.jsonl" output=".testing/models/battlesnake_softmax_v2.json" eval_split="0.2" seed="42" epochs="14" lr="0.08":
if [ -f "{{rl_input}}" ]; then python -m server.TrainBattleSnakeAI --input "{{input}}" --input "{{rl_input}}" --output "{{output}}" --eval-split "{{eval_split}}" --seed "{{seed}}" --epochs "{{epochs}}" --lr "{{lr}}"; else python -m server.TrainBattleSnakeAI --input "{{input}}" --output "{{output}}" --eval-split "{{eval_split}}" --seed "{{seed}}" --epochs "{{epochs}}" --lr "{{lr}}"; fi
run-trained model="models/battlesnake_softmax_v2.json" port="8000":
run-trained model=".testing/models/battlesnake_softmax_v2.json" port="8000":
TRAINED_SNAKE_MODEL="{{model}}" SNAKE="TrainedBattleSnake" PORT="{{port}}" "{{justfile_directory()}}/main.py"