liveBook · Manning

Tree

As explained in Applied Reinforcement Learning

A tree is a hierarchical data structure of nodes connected by parent–child relationships without cycles.

A tree organizes information or decisions into parent–child nodes. Its edges represent transitions or actions; its root starts the structure, and its leaves mark endpoints. With no cycles, each node has a unique path from the root. section 7.1

For a delivery plan, the tree can represent:

  • The depot as the root, with route choices branching into further decisions. section 7.1
  • Complete delivery plans as leaves, where outcomes such as cost or profit can be compared. section 7.1

Choosing a route

A depot branches to a North route costing 50 or a South route costing 60. The North route branches again into customer-stop choices, such as serving Customer A first at cost 80 or Customer B first at cost 70. section 7.1

Figure 7.1 Tree data structure in vehicle route planning problem

View the branching route-planning example as a tree. section 7.1

How Applied Reinforcement Learning covers it

How deep it goes
Defines roots, nodes, edges, and leaves, and summarizes BFS and DFS trade-offs without detailing their implementations.
Examples
Uses vehicle routing, depot-to-route branches, customer-stop choices, and costs to illustrate trees.
What you can do after
Build it from scratch by representing route choices as branches and completed plans as leaves.
How it connects
Connects tree search with breadth-first search, depth-first search, and Monte Carlo tree search.

Also explained in

Compare how 14 books explain tree →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Applied Reinforcement Learning. The section links point to the parts of the book it draws on.