• Tidak ada hasil yang ditemukan

Safety Guarantees

Chapter VII: Rules of the Road 3

7.5 Safety Guarantees

Safety is guaranteed when agents do not collide with one another. An agent causes collision when it takes an action that satisfies the following conditions.

Definition 7.5.1(Collision). An agent Ag that takes an actionπ‘Ž ∈ 𝐴𝑐𝑑Agwill cause collision if either of the following conditions hold:

1. GAg,𝑑(𝑠, π‘Ž) ∩ (βˆͺAg0GAg0(𝑠0, π‘Ž0)) β‰ βˆ….

2. GAg,𝑑(𝑠, π‘Ž) βˆ©π‘‚st) β‰  βˆ…, where𝑂st = {𝑔 ∈ 𝐺 | 𝑔 .𝑑 = 0}, i.e. the set of all undrivable grid points.

In other words, when Ag’s actionπ‘Žcauses it to overlap in the occupancy grid with another agent’s occupancy grid or a static obstacle. Note when the agent Ag0 is not simultaneously taking an action with Ag, the occupancy set GAg0(𝑠0,Β·) is the singleton set for the agent Ag0, representing the single grid point Ag’ is occupying.

A strategy where agents simply take actions that avoid collision in the current time- step is insufficient for guaranteeing safety because of the inertial properties of the agent dynamics. The Agent Protocol is thus also defined to avoid violating the safety of its own and any other agent’s backup plan actionπ‘Žπ‘ 𝑝 defined in Section 7.4. An agent’s backup plan actionπ‘Žπ‘ 𝑝is evaluated to be safe when the following conditions hold:

Definition 7.5.2. [Safety of a Backup Plan Action] Let us define the safety of an agent’s backup plan action𝑆Ag,𝑏 𝑝 :U =B, whereB={T,F}is an indicator variable that determines whether an agent’s backup plan action is safe or not. It is defined as follows:

𝑆𝐴𝑔,𝑏 𝑝(𝑒) =βˆ§π‘œβˆˆπ‘‚π‘œ(𝑠, π‘Žπ‘ 𝑝, 𝑒),

where the set 𝑂 is the set of all oracles in the top three tiers of the agent profile defined in Section 7.4.

An agent Ag takes an actionπ‘Ž ∈ 𝐴𝑐𝑑Ag that violates the safety backup plan action of another agent Ag0when the following conditions hold:

Definition 7.5.3(Safety Backup Plan Violation Action). Let us consider an agent Ag that is taking an actionπ‘Ž ∈ 𝐴𝑐𝑑Ag, and another agent Ag0. The action(Ag, π‘Ž)βŠ₯Ag0, i.e. agent Ag violates the safety backup plan of an agent Ag0when by taking an action π‘Žwhere𝑒0is the state of the game after Ag has taken its action, then𝑆Ag0

,𝑏 𝑝(𝑒0) =F.

Note, when Agβ‰  Ag0, then Ag can only violate the backup plan action of the agent Ag0with its actionπ‘Žif the following conditions hold:

1. GAg(𝑠, π‘Ž) ∩ GAg0(𝑠0, π‘Ž0) β‰  βˆ…, 2. Let𝑠𝑑+1=πœπ΄π‘”(𝑠, π‘Ž)and𝑠0

𝑑+1=πœπ΄π‘”0(𝑠0, π‘Ž0): IfGAg(𝑠𝑑+1),GAg0(𝑠𝑑+1)are in the same lane and if𝑑(𝑠𝑑+1, 𝑠0

𝑑+1) < π‘”π‘Ž 𝑝req, where𝑑(𝑠𝑑+1, 𝑠0

𝑑+1)andπ‘”π‘Ž 𝑝reqare the same as defined in Section 7.4.4.

The safety proof is based on the premise that all agents only take actions that do not collide with other agents and maintain the invariance of the safety of their own andother agents’ safety backup plan actions. The safety theorem statement and the proof sketch are as follows.

We can treat the quasi-simultaneous game as a program, where each of the agents are separate concurrent processes. A safety property for a program has the form 𝑃⇒𝑄, where𝑃and𝑄are immediate assertions. This means if the program starts with 𝑃true, then 𝑄 is always true throughout its execution (Owicki and Lamport, 1982).

Theorem 5 (Safety Guarantee). If all agents Ag ∈ 𝔄 in the quasi-simultaneous game select actions in accordance to the Agent Protocol specified in Section 7.4, then we can show the safety property𝑃⇒𝑄, where the assertion𝑃is an assertion that the state of the game is such thatβˆ€π΄π‘”, 𝑆Ag,𝑏 𝑝(𝑠, 𝑒) = T, i.e. each agent has a backup plan action that is safe, as defined in Section 7.5.2. We denote 𝑃𝑑 as the assertion over the state of the game at the beginning of the time-step𝑑, before agents take their respective actions. 𝑄 is the assertion that the agents never occupy the same grid point in the same time-step (e.g. collision never occurs when agents take their respective actions during that time-step). We denote𝑄𝑑as the assertion for the agent states/actions taken at time-step𝑑.

Proof. To prove an assertion of this form, we need to find an invariant assertion 𝐼 for which i)𝑃⇒ 𝐼, ii)𝐼 ⇒𝐼, and iii)𝐼 ⇒𝑄hold. We define𝐼to be the assertion that holds on the actions that agents select to take at a time-step. We denote𝐼𝑑 to be the assertion on the actions agents take at time𝑑such thatβˆ€π΄π‘”, Ag takesπ‘Ž ∈ 𝐴𝑐𝑑Ag where 1) it does not collide with other agents, and 2)βˆ€Ag, 𝑆Ag,𝑏 𝑝(𝑒0) = T where 𝑠0 = 𝜏Ag(𝑠, π‘Ž), and 𝑒0 is the corresponding global state of the game after each Ag has taken its respective actionπ‘Ž.

It suffices to assume:

1. Each Agβˆˆπ”„has access to the traffic light states.

2. There is no communication error in the conflict requests, token count queries, and the agent intention signals.

3. All intersections in the road network𝑅are governed by traffic lights.

4. The traffic lights are designed to coordinate traffic such that if agents respect the traffic light rules, they will not collide.

5. Agents follow the agent dynamics defined in Section 7.4.

6. For𝑑 =0,βˆ€Agβˆˆπ”„in the quasi-simultaneous game is initialized to:

β€’ Be located on a distinct grid point on the road network.

β€’ Have a safe backup plan actionπ‘Žπ‘ 𝑝such that𝑆Ag,𝑏 𝑝(𝑠, 𝑒)=T.

We can prove𝑃⇒ 𝑄by showing the following:

1. 𝑃𝑑 β‡’ 𝐼𝑑. This is equivalent to showing that if all agents are in a state where 𝑃 is satisfied at time𝑑, then all agents will take actions at time 𝑑 where the 𝐼 holds. This can be proven using arguments based on the Agent Protocol showing each agent will always take actions that 1) do not collide with other agents and 2) will not violate the safety of its own or other agents’ backup plan action.

2. 𝐼 β‡’ 𝐼. If agents take actions at time𝑑 such that the assertion𝐼𝑑 holds, then by the definition of the assertion𝐼, agents will end up in a state where at time t+1, assertion𝑃holds, meaning𝐼𝑑 β‡’ 𝑃𝑑+1. Since𝑃𝑑+1β‡’ 𝐼𝑑+1from 1, we get 𝐼 ⇒𝐼.

3. 𝐼 ⇒𝑄. This is equivalent to showing that if all agents take actions according to the assertions in 𝐼, then collisions will not occur. This follows in the immediate time-step from Condition 1, and the fact that all Ag have a safe backup plan action π‘Žπ‘ 𝑝 to choose from when Condition 2 holds, and will always be able to (and will) take an action from which it can avoid collision in future time steps.

Proof of safety alone is not sufficient reason to argue for the effectiveness of the protocol, as all agents could simply stop for all time and safety would be guaranteed.

A liveness guarantee, i.e. proof that all agents will eventually make it to their final destination, is critical. In the following section, we present liveness guarantees.