Skip to main content
. 2022 Mar 1;22(5):1919. doi: 10.3390/s22051919
Algorithm 1: Pseudocode for the state-based game part.

1.2

  • 1:

    Initialize the UAV network.

  • 2:

    for each timeslot t in T do

  • 3:

        for each UAV i in N do

  • 4:

            for each action j in actions do

  • 5:

               Evaluate IP and FI values using action j.

  • 6:

               Find Esens and Emov using action j.

  • 7:

               Store IP,FI,Esens,Emov.

  • 8:

            end for

  • 9:

            Select the action with the maximum reward value using Equation (16).

  • 10:

            Update the UAV location based on the action.

  • 11:

            while The new UAV location is outside the region or the UAV loses its connectivity do

  • 12:

               Cancel the new movement.

  • 13:

               Select the next maximum action.

  • 14:

               Update the UAV location based on the new action.

  • 15:

            end while

  • 16:

            Update the last IP,FI,Esens,Emov values for UAV i.

  • 17:

        end for

  • 18:

    end for