# A Cluster-Based Optimal Computation Offloading Decision Mechanism Using RL in the IIoT Field
## 4 Numerical Results
As a result, it can be seen that the method of considering the load in the MECS and D2D  
device selection methods is better in terms of task blocking rate than _dist_QL_ and _random_QL_ with the different MECS and D2D device selection methods. This is because the loads are evenly distributed and not concentrated on a few MECSs or D2D devices. When the task arrival rate is 0.8, the average performance of the proposed algorithm is approximately 33% better than that of _load_random_. When the task arrival rate is 0.3, the average performance of the proposed algorithm is approximately 39.4% better than that of _load_random_. The comparison with _load_random_ was to evaluate the performance of the Q-learning algorithm as the offloading strategy method; the proposed algorithm showed better performance in terms of task blocking rate. In the case of Q-learning, the Q-value is updated according to the reward that combines task execution time and energy consumption of devices, and it shows much better performance than when randomly selected. In Figure 3b, when the task arrival rate is 0.8, the average task completion rate within delay constraints of the proposed algorithm (_load_QL(0.6)_, _load_QL(0.7)_, and _load_QL(0.9)_) is approximately 69.1% and 67.8% better than those of _dist_QL_ and _random_QL_, respectively. When the task arrival rate is 0.3, the average performance of the proposed algorithm is approximately 85.4% and 45.9% better than those of _dist_QL_ and _random_QL_, respectively. As a result, _load_QL_ shows much better performance because queuing delay can be reduced by selecting MECS and D2D devices based on the load. When the task arrival rate is 0.8 and 0.3, the performance of the proposed algorithm is approximately 18.2% and 15.3% better, respectively, than those of _load_random_. The _load_QL_ and _load_random_ algorithms have the same target selection method of the MECS and D2D device, but _load_QL_ using Q-learning, which extracts the optimal offloading strategy depending on the dynamic situation, performs better than _load_random_, which randomly determines the offloading strategy. Therefore, the performance of _load_QL_ is much better than that of _load_random_. In Figure 3c, _dist_QL_ and _random_QL_ perform relatively well in terms of energy consumption of devices, but this is because, as Figure 3a shows, a large number of tasks processed were blocked. The average performance of the proposed algorithm for all task arrival rates was worse than _load_random_. However, this does not necessarily suggest poor performance. The reason is that _load_QL(0.9)_ focused on increasing task completion rate through reducing latency rather than energy. In terms of task blocking rate and task completion rate, the performance of _load_random_ is similar to _load_QL(0.6)_. Comparing _load_QL(0.6)_ and _load_random_ in terms of total energy consumption, _load_QL(0.6)_ performs approximately 13.16% better than _load_random_ at task arrival rate 0.8. As a result, it can be seen that the proposed algorithm has better performance in terms of total energy consumption when the number of tasks is similarly processed. In Figure 3d, when the task arrival rate is 0.8, the performance of the proposed algorithm is approximately 46%, 45.2%, and 15.2% better than those of _dist_QL_, _random_QL_, and _load_random_, respectively. When the task arrival rate is 0.3, the performance of the proposed algorithm is approximately 34.4%, 35%, and 12.6% better than those of _dist_QL_, _random_QL_, and _load_random_, respectively. Because the proposed algorithm has a relatively low task blocking rate and a high task completion rate within delay constraints, it shows higher throughput. As a result, Figure 3 shows that the method of selecting the MECS and D2D device and determining offloading strategy decision for the proposed algorithm are effective with different task arrival rates.