Table of Contents
Fetching ...

Improving the performance of Learned Controllers in Behavior Trees using Value Function Estimates at Switching Boundaries

Mart Kartasev, Petter Ögren

TL;DR

This work tackles suboptimal global performance that can arise when composing learned sub-controllers in behavior trees with fixed switching boundaries. It introduces a boundary-value approach where the value function of the downstream controller is used as a final reward for the upstream controller, formalized through restricted MDPs $P_\beta$ and $P_\alpha$ with absorbing boundary states and boundary rewards $v_+(s')$, proving that the original problem’s optimal value $v_0^*$ is recovered on each region and that the overall policy is globally optimal under reasonable assumptions. The method supports mixtures of RL and manually designed controllers and extends recursively to many operating regions, backed by theoretical lemmas and a numerical demonstration. Practically, this approach enables more reliable, modular behavior trees in robotics by ensuring that local optimizations align with global objectives without requiring full redesign of all sub-policies.

Abstract

Behavior trees represent a modular way to create an overall controller from a set of sub-controllers solving different sub-problems. These sub-controllers can be created in different ways, such as classical model based control or reinforcement learning (RL). If each sub-controller satisfies the preconditions of the next sub-controller, the overall controller will achieve the overall goal. However, even if all sub-controllers are locally optimal in achieving the preconditions of the next, with respect to some performance metric such as completion time, the overall controller might be far from optimal with respect to the same performance metric. In this paper we show how the performance of the overall controller can be improved if we use approximations of value functions to inform the design of a sub-controller of the needs of the next one. We also show how, under certain assumptions, this leads to a globally optimal controller when the process is executed on all sub-controllers. Finally, this result also holds when some of the sub-controllers are already given, i.e., if we are constrained to use some existing sub-controllers the overall controller will be globally optimal given this constraint.

Improving the performance of Learned Controllers in Behavior Trees using Value Function Estimates at Switching Boundaries

TL;DR

This work tackles suboptimal global performance that can arise when composing learned sub-controllers in behavior trees with fixed switching boundaries. It introduces a boundary-value approach where the value function of the downstream controller is used as a final reward for the upstream controller, formalized through restricted MDPs and with absorbing boundary states and boundary rewards , proving that the original problem’s optimal value is recovered on each region and that the overall policy is globally optimal under reasonable assumptions. The method supports mixtures of RL and manually designed controllers and extends recursively to many operating regions, backed by theoretical lemmas and a numerical demonstration. Practically, this approach enables more reliable, modular behavior trees in robotics by ensuring that local optimizations align with global objectives without requiring full redesign of all sub-policies.

Abstract

Behavior trees represent a modular way to create an overall controller from a set of sub-controllers solving different sub-problems. These sub-controllers can be created in different ways, such as classical model based control or reinforcement learning (RL). If each sub-controller satisfies the preconditions of the next sub-controller, the overall controller will achieve the overall goal. However, even if all sub-controllers are locally optimal in achieving the preconditions of the next, with respect to some performance metric such as completion time, the overall controller might be far from optimal with respect to the same performance metric. In this paper we show how the performance of the overall controller can be improved if we use approximations of value functions to inform the design of a sub-controller of the needs of the next one. We also show how, under certain assumptions, this leads to a globally optimal controller when the process is executed on all sub-controllers. Finally, this result also holds when some of the sub-controllers are already given, i.e., if we are constrained to use some existing sub-controllers the overall controller will be globally optimal given this constraint.
Paper Structure (14 sections, 5 theorems, 14 equations, 9 figures, 2 tables)

This paper contains 14 sections, 5 theorems, 14 equations, 9 figures, 2 tables.

Key Result

Lemma 1

For a given node $j$, with operating region $\Omega_j$, controller $j$ is executed when $s \in \Omega_j$, and the operating regions of the children of $j$ is a partitioning of $\Omega_j$.

Figures (9)

  • Figure 1: The agent first goes from room 1 to room 2, and then goes to either object A or object B, see the map in (a). The value functions for going from room 1 to room 2 can be seen in (b), the value function for going to A can be seen in (c) and the value function for going to B can be seen in (d).
  • Figure 2: Knowing which object to go to, we can use the value function of that action, or an approximation of it, as a boundary value for the first action. Using the boundary values from object A in Figure \ref{['fig:ex1_1']}(c) we get the value function of Goto room 2 shown in (a). Similarly, using the boundary values from object B in Figure \ref{['fig:ex1_1']}(d) we get the value function of Goto room 2 shown in (b).
  • Figure 3: The basic case with $\Omega_\alpha=\Omega_1$ and $\Omega_\beta=\Omega_2$. The arrow indicates that trajectories of an optimal policy will always move from $\Omega_1$ to $\Omega_2$ and never in the opposite direction.
  • Figure 4: Illustration of the iterative application of the main result. If we know that trajectories of optimal policies will always move from $\Omega_i$ to $\Omega_j$, with $i<j$, and finally stay in $\Omega_7$, we can apply Lemma \ref{['lem_recursive']} with $\Omega_\alpha=\Omega_i$ and $\Omega_\beta=\cup_{j>i}\Omega_j$, starting from the back with $\Omega_\alpha=\Omega_6$ and $\Omega_\beta=\Omega_7$, then $\Omega_\alpha=\Omega_5$ and $\Omega_\beta=\Omega_6 \cup \Omega_7$, and so on.
  • Figure 5: A snapshot of the experimental environment including a blue spherical agent, a blue goal area rectangle and a red target box. The agent fails if the target or the agent leave the plane, and succeeds if the target reaches the blue goal area.
  • ...and 4 more figures

Theorems & Definitions (16)

  • Lemma 1
  • proof
  • Definition 1
  • Definition 2: MDP-neighbors
  • Definition 3: Restriction
  • Lemma 2: Decoupled solutions
  • proof
  • Example 1
  • Lemma 3: Constraining the optimal policy
  • proof
  • ...and 6 more