# Iterative Oblique Decision Trees Deliver Explainable RL Models
## 4 Results
### Explainability for Oblique Decision Trees in RL
#### 4.4.1 Decision Trees: Compact and Readable Models  
Trees are useful for XAI since they are usually much more compact than DRL models and consist of a set of explicit rules, which are simple in that they are linear inequalities in the input features (for oblique DTs). As an example of the models' simplicity, Figure 6 shows a very compact OPCT of depth 1 for the MountainCar challenge. On the other hand, DRL models have many trainable parameters and form complex, nonlinear features from the input observations. Table 4 shows the number of trainable weights for all our SB3 oracles (DRL models) which are, in all cases, orders of magnitude larger than the number of trainable tree parameters.  
Figure 5: Decision surfaces for MountainCar (MC, discrete actions) and MountainCarContinuous (MCC, continuous actions). Column 1 shows the DRL agents. The OPCTs in column 2 (depth 1) and column 3 (depth 2) were trained with algorithm ITER. The number in brackets in each subplot title is the average return \(\overline{R}\). The black dots represent trajectories of 100 evaluation episodes with same starting conditions across the different agents. They indicate the regions actually visited in the observation space.  
Figure 6: OPCT of depth 1 obtained by ITER solving MountainCar with a return of \(\overline{R}=-107.47\) in 100 evaluation episodes.  
The number of parameters in the oracle can be computed from the architecture of the respective policy network. For example, in MountainCar with input dimension \(D=2\), the DQN consists of 2 networks: a Q- and a target network. Each has \(D+1=2+1\) inputs (including bias), 3 action outputs, and a \((256,256)\) hidden layer architecture (we do not use overly complex DRL architectures but keep the default parameters suggested by the SB3 methods [26]), which results in  
\[2\cdot((2+1)\cdot 256+(256+1)\cdot 256+256\cdot 3)=134,656\text{ weights}.\]  
The number of parameters in the tree is a function of the tree's depth and the input dimension. For example, in Lunarlander with input dimension \(D=8\), the oblique tree of depth \(d=2\) (as obtained by, e.g., ITER) has \(2^{d}-1=3=1+2\) split nodes and \(2^{d}=4\) leaf nodes. Each split node has \(D+1=9\) parameters (one weight for each input dimension + threshold), and each leaf node has one adjustable output parameter (the action), resulting in  
\[3\cdot 9+4=31\text{ parameters}.\]  
However, it should be emphasized that all our DTs have been trained with the guidance of a DRL oracle. At least so far, we could not find a procedure to construct successful DTs solely from interaction with the environment. Such direct tree learning is left for future work. In this paper, we rely on the guidance of the oracle, whose samples demonstrate reasonable solutions to the tree and facilitate learning.  
In a sense, the DT \"explains\" the oracle by offering a simpler surrogate action model. The surrogate is often nearly as good as or even better than the DRL model in terms of mean reward.  
It is a surprising result of our investigations that trees of small depth delivering such high rewards could be found at all. Most prominently, for the environments Acrobot and Lunarlander with their higher input dimensions 6 and 8, it was not expected beforehand to find successful trees of depth 1 and 2, respectively.