Cognition · Software component
Search Tree Pruner
Software componentCognitionCognition & Memoryarc:SearchTreePruner
A memory-management component that bounds search-tree growth by enforcing node-count limits, removing low-visit subtrees and, on action commitment, promoting the chosen subtree to root while discarding siblings.
Responsibility. Keeps the search tree within memory limits while preserving reusable statistics.
Also known as: Tree memory manager, Progressive pruning
Relationships
is configured by structural
is invoked by dependency
writes dependency
Design guidance
- MUST bound tree size in long-running or resource-constrained agents (embedded robotics, mobile devices).
- SHOULD monitor node count and memory over time; unbounded growth of both indicates insufficient pruning.
Quantitative guidance
As stated by the sources; verify before use.
- A mobile robot running MCTS for 8 hours without pruning may accumulate millions of nodes and gigabytes of RAM; example prune threshold is <5 visits (Ch5.5).
Classification
- Patterns
- Tree size limitsProgressive pruningTree reuse with sibling garbage collectionPer-decision tree rebuild for stateless problems
- Quality attributes
- Performance efficiency (ISO/IEC 25010)Reliability (ISO/IEC 25010 | NIST AI RMF: valid and reliable)
- Risks mitigated
- Memory leaks from unbounded tree growthOut-of-memory crashesIteration slowdown from cache misses
Sources
- Ch5.5: T. Nguyen, "Monte Carlo Tree Search Fundamentals," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 5.5. ISBN: 9798244538229.