## 2 Materials and Methods
### Decision Trees, Proxy Geometry and Semantic Scene Segmentation
Nowadays, reinforcement learning model evaluation in the virtual environment is a common and much cheaper approach than building a real-life prototype [60; 61], so we can assume that it is possible to obtain semantic data directly from the virtual environment. In Figure 4, we show an example visualization of the virtual world as seen by an agent (first column) and a semantic segmentation of the objects visible in the scene (second column). ```
Data: Input: \(n\) or \(m\)--width or height of the convolution filter output (see Equation (4)). Result:\(borders_{n},borders_{m}\)--lists that contains at most four borders each of the proxy geometries that split section of length \(n\) or \(m\), respectively, into at most three regions, where symmetric regions have the same length, \(F\)--a matrix of zeros with size determined by \(borders_{n},borders_{m}\). It has at least size \((1\times 1)\) and at most \((3\times 3)\). // Helper procedure BeginProc(b):// Initialize list of borders. borders \(\leftarrow[0]\); // \(\epsilon\) is a value \((0.001)\), \(\lfloor\rfloor\) is rounding down, // try to split section in \(\frac{1}{3}\) and \(\frac{2}{3}\) of its length. \(b_{0}\leftarrow\lfloor\frac{w}{3}+\epsilon\rfloor\); \(b_{1}\leftarrow\lfloor\frac{2\cdot w}{3}+\epsilon\rfloor\); for\(p\in[b_{0},b_{1},b]\)do if\(p-borders[len(borders)]>0\)then  borders.append(p)  end if \(a\gets 0\);  end for // Correct borders position. if\(b=4\)then  borders[3] = borders[3] + 1;  end if else  borders[2] = borders[4] -- borders[3];  end for return borders; EndProc(b); \(borders_{n}=Proc(n)\); \(borders_{m}=Proc(m)\); // Generate matrix of zeros with size determined // by proxy geometry size \(F\leftarrow[0]_{(\#borders_{n}-1)\times(\#borders_{m}-1)}\); return\(F,borders_{n},borders_{m}\)
```  
**Algorithm 1**Generate proxy geometry After creating the proxy geometry and performing segmentation, we can proceed with feature generation. The algorithm that generates features is shown in Algorithm 2. It involves performing GradCAM for an image \(I\) and then a weighted summation of the pixels that belong to each semantic object class within each proxy geometry segment. The weights are determined based on the GradCAM values after any additional correction is made by powering up with an exponent (\(\alpha\geq 1\)) and a threshold \(t\in[0,1]\). The use of \((\alpha,t)\) is intended to filter the GradCAM map from values characterized by a small network gradient. The higher the \(\alpha\) value, the more the map values close to 0 are reduced, and map values equal to 1 remain unchanged. The weighted sums within each segment are scaled such that the sum for each class in the segment is divided by the weighted sum of the pixels in all classes in that segment. Following this approach, the proxy geometries within each segment are then scaled by dividing each feature by the weighted sum of all pixels in the segment. Ultimately, therefore, each feature has a value in the range of \([0,1]\), and the sums of feature values within a segment are 0 if for each pixel in that segment \(M^{c}(I)\) is 0 or 1 otherwise. We name the individual features according to the name of the segment and the name of the semantic class to which the pixels in the segment belong. For example, suppose the proxy geometry is of size \((2\times 1)\) [North, South], and there are three semantic classes {Class1, Class2, Class3}. The set defined in this way has \((2\cdot 3=6)\) features named {North_Class1, North_Class2, North_Class3, South_Class1, South_Class2, South_Class3}. In the case of proxy geometry of size \((3\times 2)\) {NorthWest, NorthEast, West, East, SouthWest, SouthEast}, and there are two semantic classes {Class1, Class2}, we have \((6\dot{2}=12)\) features named {NorthWest_Class1, NorthWest_Class2, NorthEast_Class1, NorthEast_Class2, West_Class1, West_Class2, East_Class1, East_Class2, SouthWest_Class2, SouthEast_Class1, SouthEast_Class2}.