← All simulations · Pillar 3: Sorting things into groups
Decision-Tree Builder
A decision tree is the most see-through kind of AI: it just asks a chain of yes/no questions. Here you can grow one deeper and watch it carve the space into blocks — one question is one straight cut. The region map, the flowchart of questions, and the Spectra™ code all stay locked together, so you can always see how the tree decides. Then drop a new fruit in and watch it fall down the questions to an answer.
Meet the parts
- A question (a split). Every box that isn’t a leaf asks one yes/no question about a single number, like “is sweetness below 0.3?”. That one question draws one straight cut across the map — everything on one side goes left, everything on the other goes right.
- Depth. How many questions the tree may ask in a row. Depth 1 makes one cut; each extra level lets the tree ask a different follow-up question inside each block, so the blocks get smaller and the boundary turns into a staircase.
- A leaf (the answer). A box with no more questions. It simply votes the most common kind of fruit that landed in it — that vote is the tree’s final answer.
How to read it
- The region map (top): sweetness goes left→right, size goes bottom→top. The shading is the tree’s answer for every spot; each straight line is one question. Dots are the practice fruit; the big ringed dot is the fruit you’re testing.
- The flowchart (lower): the very same tree drawn as questions. Follow yes to the left child and no to the right, down to a leaf.
- Watch it grow ▶ adds one level at a time — a new cut appears and more practice fruit ends up on the right side. The little curve shows how the score climbs with depth.
- Drop it in ▼ sends your test fruit down the questions, lighting each box on its path until it reaches a leaf.
Try this
- Start at depth 1: one cut can’t wrap around both fruits, so it’s stuck well below 100%. Slide to depth 2, then 3, and watch the staircase form.
- Push depth all the way up. Notice the score reaches 100% — but the blocks get tiny and start hugging single dots. That’s the tree starting to memorise instead of learn (overfitting).
- In the code, change
depth: 3to another number — the picture above follows. - Move the sweetness and size sliders to a spot near a boundary, hit Drop it in, and see which leaf claims it.
- Hit Open in the Studio to keep going with the very same tree as Spectra code.
Safe by design
Everything here runs in your browser on small, made-up data. There is no upload, no internet from the model, and nothing about you is collected — the same safety-by-absence rule as the rest of the platform.