Docs  /  Thought × Decision Trees

Thought × Decision Trees

Implements the brainstorm: Thought as the flight recorder, decision trees as interpretable gates around MathNN / RL / LLM slow paths.

Architecture

Sensors / utterance / AimCoach metrics
        │
        ▼
  Feature maps (named doubles)
        │
        ▼
  CART tree or bagged forest  ──► leaf label + path
        │
        ├─► Thought graph (Reasoning node: tree / leaf / path / decision)
        ├─► data/decision_trees/decisions.jsonl
        └─► MySQLAIFeatures audit
Tree Features Labels / decisions
safety storm, indoor, human, dry_run, bot, confidence, death, menu deny / dry_run / assist / allow
intent keyword bags (game, math, weather, …) gaming, math, weather, …
domain math-field keyword bags math_algebra, math_calculus, …
aim_drill AimCoach metrics tap_fire, micro_aim, smoothing, …

Commands

tree status
tree useful
tree selftest
tree seed
tree describe safety|intent|domain|aim_drill
tree safety [storm] [indoor] [human] [dry] [bot] [conf] [death] [menu]
tree intent <utterance…>
tree domain <utterance…>
tree aim
tree train intent|aim|safety|domain
tree train csv path/to.csv [name]
tree train forest [csv] [name]
tree predict NAME f1=v1 f2=v2
tree forest predict NAME f=v
tree export [path]
tree save|load NAME [path]

thought tree …          # same as tree …
dtree …                 # alias

Lua

print(ai_tree_status())
print(ai_tree_intent("gaming rl aim tips"))
print(ai_tree_domain("eigenvalues of a matrix"))
print(ai_tree_safety(10, true, true, false, false, 0.9, false, false))
print(ai_tree_aim_drill())

Integration points

Module Hook
_Thought::RecordDecision Graph node for every leaf
_GamingRL::AimCoachDrillSuggestion Prefers tree drill text
_DomainLLMBridge::RouteMathDomain Tree domain before keywords/LLM
Offline data/decision_trees/*.json, decisions.jsonl, CSV exports

Files

  • DecisionTree.hpp / .cpp — CART train/predict, JSON I/O, bagged forest
  • ThoughtDecisionTrees.hpp / .cpp — policies, features, export, commands
  • Thought.hppRecordDecision
  • Docs: this file

Quick smoke

tree selftest
tree safety 90 0 1 0 1 0.5 0 0
tree intent gaming rl aim tips
tree domain eigenvalues of a matrix
tree aim
tree export

Design notes

  • Trees are gates, not replacements for FPS continuous control or LLM prose.
  • Default seeds train from synthetic rows so the system works offline without MySQL.
  • tree train intent merges data/ai_features/intent_corrections.jsonl when present.
  • Forests are optional when a single tree underfits (tree train forest).
Generated from the project markdown docs on 2026-07-24. This is a static, self-contained site.