Repository navigation
What's new
Project Reorganization
- Gen2 code promoted to repository root — no more
gen2/prefix - Gen1 archived to
old/(untracked) - Security-hardened
.gitignore— secrets, model weights, logs, and debug artifacts are all excluded
Ollama Support (Local LLM)
AI Supervisor now supports Ollama as a provider — run hyperparameter tuning with local models, no API key needed:
python trainer.py --resume --ai-supervisor ollama- Configurable via
OLLAMA_HOSTandOLLAMA_MODELenv vars - Default model:
llama3.1 - Uses stdlib
urllib— no extra dependencies
Smart Best Model Saving
Best model checkpoints are now saved based on fitness (survival + food) instead of raw reward:
fitness = avg_steps + avg_food × 10
- File naming:
best_model_{uid}_ep{ep}_s{steps}_f{food}.pth - Steps (survival time) dominate the score, food amplifies it
- Prevents saving "lucky" models that got high reward from a single good episode
Stage 1 Extended Episodes
max_stepsincreased from 300 → 600 (~48 sec instead of ~24 sec)- Gives the snake more time to learn food-seeking behavior before episode timeout
AI Supervisor in Progress Report
- New "AI Supervisor — Recent Changes" table at the bottom of
progress_report.md - Shows last 10 consultations: time, episode, parameter changes, reasoning
- Tracks most frequently adjusted parameters
TUI Dashboard
- Added screenshot of the training TUI to README
Providers supported
| Provider | Flag | API Key Required |
|---|---|---|
| Claude | --ai-supervisor claude |
Yes (ANTHROPIC_API_KEY) |
| OpenAI | --ai-supervisor openai |
Yes (OPENAI_API_KEY) |
| Gemini | --ai-supervisor gemini |
Yes (GOOGLE_API_KEY) |
| Ollama | --ai-supervisor ollama |
No |
Full changelog
- Reorganize:
gen2/→ root,gen1/→old/ .gitignore: block.env,*.pth,logs/,config_ai.json,.claude/,chart_*.pngai_supervisor.py: add_call_ollama()viaurllib.requesttrainer.py: fitness-based best model saving,ollamain--ai-supervisorchoicesstyles.py: S1max_steps300 → 600training_progress_analyzer.py: parseai_supervisor.log, render changes table in MD reportauto_report.sh: fix paths after reorganization (removegen2/prefix)README.md: add TUI screenshot, update AI supervisor docs for Ollama
