Skip to main content
. 2026 Jun 3;26(11):3542. doi: 10.3390/s26113542
Algorithm 1 Guard-Layer Action Filtering
  •   1:

    Input: state st, policy action at, threshold τbatt, relaxation ρt

  •   2:

    Output: safe action asafe

  •   3:

    Et← GetEligibleNodes(st)

  •   4:

    if Et=∅ then

  •   5:

        return no-transmit

  •   6:

    end if

  •   7:

    i*←Decode(at) {extract node index}

  •   8:

    τ*←ρt·τbatt {relaxed threshold}

  •   9:

    if i*∈Et and Ei*,t>τ* then

  • 10:

        return at {action is safe}

  • 11:

    end if

  • 12:

    for each i∈Et do

  • 13:

        scorei←(Ei,t−τ*)+α(E¯t−Ei,t)

  • 14:

    end for

  • 15:

    return Encode(argmaxiscorei)