Expand description
Context Tree Weighting (CTW) and Factorized Action-Conditional CTW (FAC-CTW).
This implementation stores maximal non-root unary runs as chains while keeping
the root and true branching points explicit. Updates and reverts rebuild only
the touched context path from exact per-node state, which preserves predictive
semantics while avoiding the O(depth) explicit-node blow-up for singleton
paths.
Structsยง
- Context
Tree - A Context Tree for binary sequence prediction.
- CtArena
- Arena allocator and storage for CTW nodes/segments.
- CtNode
- Compact node payload used by
CtArena. - FacContext
Tree - Factorized Action-Conditional Context Tree Weighting.
- Node
Index - Index into the explicit-node arena.