Tree Pruning Puzzle

Remove weak branches, protect useful predictions, balance simplicity and accuracy, and discover how smart pruning improves decision trees across challenging interactive puzzles and scenarios.

Game setup and pruning laboratory

Build a noisy tree, inspect branches, preview consequences, then prune carefully.
Ready Build 2026-08-11
Training accuracy
Original baseline
Validation accuracy
Primary target
Test accuracy
Generalisation check
Active nodes
Complexity
Tree depth
Longest route
Score
0
Pruning quality

Original tree versus pruned tree

Select an internal node on the right. Review its preview before confirming removal.
Split Leaf Pruned Hint

Current objective

Moves: 0
Generate a round to begin.
Your progress will appear here.

Selected branch preview

No pruning preview is active.

Coach feedback

Keyboard: P prune, U undo, H hint, R reset.

Move history

0 badges
No moves yet.

Model evidence and pruning graphs

Plotly charts update after every pruning action.

Before-and-after model comparison

MetricOriginalCurrentChange
Precision
Recall
F1 score
Generalisation gap

Rating: Waiting for your first pruning decision.

Results and export tools

Local storage keeps scores, badges, settings, and the latest tree state in this browser.

How pruning decisions work

1. Inspect

Check samples, impurity, information gain, depth, and validation impact before removing a subtree.

2. Preview

The preview temporarily replaces a branch with its majority-class prediction and calculates changed metrics.

3. Balance

Strong pruning reduces variance. Excessive pruning raises bias and can create underfitting.

Related Calculators

Grow a Decision TreeInformation Gain ChallengeDecision Path ExplorerRandom Forest BuilderFeature Importance ChallengeTree Depth BalancerGini Impurity Game

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.