# Artificial Intelligence Control Logic in Next-Generation Programmable Networks
## 4 Experiments and Results
The advantage of using AI is even clearer for the loss rate parameter. With the AI algorithm, network losses are significantly lower than without using AI (compare Figures 5 and 6). However, the traffic losses cannot be completely avoided as the AI algorithm needs some time to \"observe\" the traffic prior to the path switch over decision. It can be seen in Figure 5 that the network suffers from six congestion periods due to the naive shortest path routing (the same can be seen also in in Figure 3). It happens when four hosts nearest to the same aggregation switch (sw01, sw02, and sw03) are all operating. The situation happens two times for each aggregation switch during the 280 s experiment. The first congestion period (form 20 to 40 s) happens when hosts: Host-01, Host-02, Host-03, and Host-04 are operating and all the traffic is routed on the shortest path. In such a case, link sw00-sw01 becomes the bottleneck, because all the traffic is using it. However, in the presented AI framework, each intent can chose between two paths that are as link disjointed as possible. It is clearly seen in Figure 2 that, for each host (Host01-Host-12) in  
Figure 5: Loss rate without AI. Figure 6: Loss rate with AI. the considered network, there exists a pair of paths to the server (Host-00) that shares only two links. These links are directly connected either to the host or to the server. Therefore, there is always a combination of possible paths, which can be assigned to intents, that will prevent from the described congestion situations on the links connecting the server with the aggregation switches. As displayed in Figure 4, the presented AI framework usually finds this perfect assignment and allows for considerable loss reductions. The results of the above experiments obtained for five different test cases are presented in Tables 1 and 2. Table 1 shows the per flow average throughput obtained for experiments performed with and without the AI algorithm. Table 2 shows similar results for the average flow loss rate parameter. We can see that the traffic losses (and the resulting throughput reductions) are not evenly distributed between flows. Without the AI algorithm, the per flow loss rate can be as high as 40 % (meaning the same level of throughput decrease). The AI algorithm reduces the average per flow loss rate over 3 times, to an average level of 6 % (from an average of 18 % for the case with the shortest path routing). \begin{table}
\begin{tabular}{c c c c c c c} \hline \multicolumn{6}{c}{**(a) Throughput without AI**} \\ \hline \multicolumn{6}{c}{**Flow No. **} & \multicolumn{6}{c}{**Test Case**} & \multicolumn{3}{c}{**Average**} \\  & **1** & **2** & **3** & **4** & **5** & \\ \hline
1 & 3.58 & 5.75 & 3.68 & 4.83 & 5.23 & 4.61 \\
2 & 5.75 & 4.97 & 5.52 & 4.50 & 3.72 & 4.89 \\
3 & 5.21 & 3.61 & 4.11 & 4.60 & 3.98 & 4.30 \\
4 & 4.01 & 4.34 & 5.30 & 4.71 & 5.64 & 4.80 \\
5 & 4.26 & 4.24 & 5.52 & 5.62 & 3.74 & 4.68 \\
6 & 4.31 & 5.69 & 4.25 & 4.50 & 5.42 & 4.83 \\
7 & 5.59 & 4.95 & 4.61 & 4.79 & 5.39 & 5.07 \\
8 & 4.52 & 3.83 & 4.33 & 3.78 & 4.16 & 4.12 \\
9 & 5.24 & 5.50 & 5.55 & 5.42 & 4.17 & 5.18 \\
10 & 3.81 & 4.76 & 4.16 & 3.79 & 4.46 & 4.20 \\
11 & 5.69 & 4.76 & 5.00 & 4.64 & 4.46 & 4.91 \\
12 & 3.98 & 3.68 & 3.99 & 4.85 & 5.62 & 4.42 \\ \hline \multicolumn{6}{c}{**(b) Throughput with AI**} \\ \hline \multicolumn{6}{c}{**Flow No. **} & \multicolumn{6}{c}{**Test Case**} & \multicolumn{3}{c}{**Average**} \\  & **1** & **2** & **3** & **4** & **5** & \\ \hline
1 & 5.69 & 5.43 & 5.54 & 5.59 & 5.58 & 5.57 \\
2 & 5.65 & 5.77 & 5.14 & 5.77 & 5.66 & 5.60 \\
3 & 5.