1: Initialization: Initialize the cumulative contextual vector , where is a dimensional identity matrix, the cumulative contextual system cost , and a control parameter .
2: End initialization
3: fordo
4: fordo
5: fordo
6: Compute the estimated feature vector .
7: Sample the cost independently for each task n and each execution platform i from the Gaussian distribution.
8: Compute the probability of offloading task n to the i-th execution platform .
9: End for
10: Select the offloading execution platform .
11: Record the selection into offloading decisions vector .
12: End for
13: Compute the aggregated received cost via , Equation (5), (6), (8) and (9).