                                     Safety-Polarized and Prioritized Reinforcement Learning



As a result, the ψ update in Equation (24) satisfies the Assumption (A1)-(A4) in Lemma B.1. Therefore, according to the

Lemma B.1, ψt converges to a single point a ∈ H = {F (ψ) = ψ}. Since ψ(0) = 0, our ODE in Equation (27) converges

to a = ψ ∗ by Theorem 4.3. Therefore the ψ update in Equation (24) will converge: ψt → a = ψ ∗ , starting from ψ0 = 0.

Next, we consider the Q update. We expand the Equation (13) as follows:

                                                                                                     

                      Qt+1 (st , at ) = Qt (st , at ) + βt rt + γ max Qt (st+1 , a) − Qt (st , at )

                                                                 a∈Cζt (st+1 )

                                                          

                                      = Qt (st , at ) + βt rt + γ max Qt (st+1 , a) − Qt (st , at )

                                                                 a∈Cζ (st+1 )

                                                                                          

                                      + γ max Qt (st+1 , a) − γ max Qt (st+1 , a)

                                         a∈Cζt (st+1 )                 a∈Cζ (st+1 )

                                                                   h                 i                                      (28)

                                      = Qt (st , at ) + βt rt + γEs′ max ′ Qt (s′ , a) − Qt (st , at )

                                                                      a∈Cζ (s )

                                                                          h              i

                                      + γ max Qt (st+1 , a) − γEs′ max ′ Qt (s′ , a)

                                         a∈Cζ (st+1 )                       a∈Cζ (s )

                                                                                          

                                      + γ max Qt (st+1 , a) − γ max Qt (st+1 , a)

                                            a∈Cζt (st+1 )              a∈Cζ (st+1 )





where we recall that

                                     Cζ (s) = {b ∈ A | ψ ∗ (s, b) ≤ ζ(s) = min ψ ∗ (s, a)}

                                                                           a∈A



and Cζt (s) is the set of minimizers of ψt (st , ·):



                                   Cζt (s) := {b ∈ A | ψt (s, b) ≤ ζt (s) = min ψt (s, a) + κ},

                                                                           a∈A



where κ > 0 is a small enough constant satisfying ψ ∗ (s, b) + 2κ < ψ ∗ (s, e) for any s ∈ S, b ∈ Cζ (s) and e ∈ A \ Cζ (s).

Since ψt converges to ψ ∗ as t → +∞, we have for any ϵ > 0, there exists some T > 0 such that when t > T ,

|ψt (s, a) − ψ ∗ (s, a)| < ϵ, ∀s ∈ S, a ∈ A. Taking ϵ = κ2 , for any b ∈ Cζ (s) and e ∈ A \ Cζ (s), we have



                 ψt (s, b) + κ < ψ ∗ (s, b) + ϵ + κ ≤ ψ ∗ (s, e) − 2κ + ϵ + κ ≤ ψt (s, e) + 2ϵ − κ = ψt (s, e).              (29)



Claim. for any b ∈ Cζ (s), we have b ∈ Cζt (s), and for any e ∈ A \ Cζ (s), we have e ∈ A \ Cζt (s).



   • Proof of Claim. Since ζ(s) = ψ ∗ (s, b), we also have ψt (s, b) ∈ [ζ(s) − ϵ, ζ(s) + ϵ]. Then



                           ζt (s) = min ψt (s, a) + ζ = min ψt (s, b) + ζ ≥ ζ(s) − ϵ + ζ = ζ(s) + ϵ,

                                     a∈A                    b∈Cζ (s)



     where the second equality is due to Equation (29) and the final equality is due to ϵ = ζ2 . Thus ψt (s, b) ≤ ζ(s)+ϵ ≤ ζt (s).

     This shows that Cζ (s) ⊂ Cζt (s).

     On the other hand, again by Equation (29), ψt (s, e) > ψt (s, b) + ζ ≥ mina∈A ψt (s, a) + ζ = ζt (s). This shows that

     A \ Cζ (s) ⊂ A \ Cζt (s).



Therefore Cζt (s) will be the same as Cζ (s) after t > T . Taking t > T , the Equation (28) becomes

                                                                     h                 i

                        Qt+1 (st , at ) = Qt (st , at ) + βt rt + γEs′ max ′ Qt (s′ , a) − Qt (st , at )

                                                                        a∈Cζ (s )

                                                                           h                 i                              (30)

                                        + γ max Qt (st+1 , a) − γEs′ max ′ Qt (s′ , a) ,

                                            a∈Cζ (st+1 )                    a∈Cζ (s )





whose convergence to Q∗ζ is guaranteed by classical Q-learning theory (Borkar, 2008). We complete the proof.







                                                                  16

