The Emergency Braking Game: a game theoretic approach for maneuvering in a dense crowd of pedestrians

We introduce an algorithm that maneuvers a vehicle through an area with randomly moving pedestrians. In non‑crit‑ ical situations, our strategy is to avoid pedestrians by steering, whereas dangerously moving pedestrians are avoided by braking, possibly coming to a complete stop. The distinction between non‑critical and dangerous situations, as well as proof of safety, is based on a continuous optimization problem that we define. In this abstract problem, called Emergency Braking Game, one pedestrian is actively trying to collide with a continuously decelerating car. We show how to determine the outcome of the game based on the initial states of the car and the pedestrian. Using this information, our algorithm can initiate deceleration in the real scenario in time to avoid collision. The method’s safety is proven theoretically, and its efficiency is shown in simulations with randomly moving pedestrians.


Introduction
The development of self-driving cars, which must operate in the presence of pedestrians, brought an increasing focus to the problem of collision-free autonomous movement [1][2][3].To ensure guaranteed safety, it is often convenient to assume that the pedestrians are adversarial, meaning that they seek to collide with the vehicle.While this is, obviously, a worst-case assumption, dense urban intersections like the famous Shibuya Crossing (Fig. 1) or cars leaving parking lots after major sport events create conditions that closely approximate it.In the adversarial scenario, collision avoidance can be formulated as a pursuit-evasion differential game [4].
In this paper, we introduce the Emergency Braking Game (EBG) and a novel game-theoretic formulation of a strategy for a vehicle avoiding multiple pedestrians.Inspired by the suicidal pedestrian game [5], EBG proposes that the primary action available to the vehicle to avoid a collision is to decrease its velocity (brake) while retaining its direction of movement.The primary advantage of this strategy is that the actions calculated for the avoidance of different pedestrians can be combined in a convenient way.In contrast, when the vehicle uses swerving as an avoidance strategy [6], the algorithm might recommend incompatible turning directions for the avoidance of different pedestrians.
As in several other techniques that consider an adversarial relationship between the vehicle and pedestrians [7,8], we divide the scenario into one-on-one games.In contrast to several previous studies, where pedestrians were assumed to adhere to predetermined routes or utilized crosswalks for traversing [9][10][11], we consider a scenario where the pedestrians can have arbitrary trajectories.The objective of the game is to guarantee safety by avoiding collision, with the pedestrians' secondary objective being to minimize the miss distances.
The primary contributions of this paper can be summarized as follows: • We define the Emergency Braking Game (EBG) as a model of a particular solution class for the problem of a vehicle navigating a dense pedestrian area.We provide an analytic solution to the problem under specific assumptions.• We build a collision avoidance strategy based on EBG.• We study the behavior generated by the EBG-based collision avoidance in a simulation scenario with randomly moving pedestrians and compare its performance with two recent collision avoidance algorithms.
The remainder of the paper is organized as follows.Section 2 discusses related work in the domain of reactive motion planning algorithms.In Sect.3, we present the kinematics of the agents present in the game.Later on, in Sect.4, we define the Emergency Braking Game and describe an analytic solution for the simple case.We describe an evasion algorithm built on this solution in Sect. 5.In Sect.6 we describe the baseline algorithms, with Sect.7 containing simulation results and analysis.We provide conclusions and describe future work in Sect.8.

Related work
Techniques for collision avoidance by a vehicle in the context of dynamic obstacles have been the subject of several research projects in recent decades [13][14][15][16].The difficulty of this task is largely determined by the amount of knowledge we have about the obstacle movement.
The majority of algorithms [17] assume that the obstacles' paths are known, or at least well predicted.This is also the assumption underlying one of the most frequently used dynamic motion planning algorithm families, Velocity Obstacles (VO) [18,19]; as well as other methods such as the one proposed in [20].VO has been adapted to various scenarios, such as differential-driven robots [21,22], ships [23], multi-robot collision avoidance [24][25][26], and unmanned aerial vehicles [27].
A further assumption that can be made is that the obstacles are holonomic, this being a good approximation for the case of human pedestrians.With this assumption, we can define the reachable set of the obstacles.In practice this can be done by expanding the future positions of the vehicle with the distance the obstacles can cover in the corresponding time interval.This creates a dynamic envelope [28] with the following interpretation: if the dynamic obstacle is initially present inside this envelope, it is possible for it to collide with the vehicle on its predefined path.In contrast to this forward approach, we can also work backward from collision states and define dangerous sets that need to be avoided by the vehicle [29].The backward approach has the advantage that it is often less computationally demanding.
Another popular method, the Dynamic Window Approach (DWA), can quickly generate solutions in realtime and is capable of taking nonholonomic constraints into account, such as limited turning ability [30,31].The DWA algorithm can also be used in dynamic environments to produce collision-free paths.Recent work applied DWA to motion planning for the Forklift Automated Guided Vehicle [32].
In the techniques above, the motion planning algorithm explicitly considers the velocities of the obstacles.It is possible to develop path planning algorithms that only rely on the changing locations of the obstacles, without explicitly requiring the velocity vectors.An example of this class of methods is that of Artificial Potential Fields [33][34][35][36] (APF), where obstacles exert a virtual repelling force on the vehicle while the goal exerts an attractive force.The movement is then defined by the resultant of these forces.The method is straightforward to implement, has a low computational demand, and can be effective against slow-moving obstacles.Although APF was originally designed for use in static environments, it has also been adapted to handle dynamic obstacles, such as those encountered in robot soccer [37].

Pedestrian avoidance dynamics
Let us now consider the problem of obstacle avoidance in the setting of a vehicle aiming to traverse an area where a number of pedestrians are moving unpredictably.
Fig. 1 Shibuya Crossing is one of the busiest pedestrian crossings in the world [12] We assume that a pedestrian (P) implements a simple holonomic motion, described by the equations where x and y are planar coordinates, the 0 index refers to initial values, and w is the (constant) speed of the pedestrian.The control input is the movement direction φ which the pedestrian can alter instantaneously.
The vehicle (E) is described by the state variables of the planar coordinates x, y, the heading ψ , and velocity v.The state variables are subject to the constraints of a minimal turning radius R and a maximal acceleration/ deceleration a max : where the control inputs are u ψ , u v ∈ [−1, 1] .The veloc- ity of the vehicle is constrained between 0 and v max .
In case we only need the relative position of a pedestrian and the vehicle, it is useful and customary [4,5] to transform their coordinates to a reduced space.In the reduced space, the vehicle permanently resides in the origin, facing the positive y-axis, as shown in Fig. 2.Then, the full state is described by the relative x and y coordinates-without the P subscript-of the pedestrian and the velocity v.The transformation can be given by with the usual rotation matrix The initial values in the reduced space are (1) x P (0) = x P,0 y P (0) = y P,0 ẋP (t) = w cos φ(t) ẏP (t) = w sin φ(t) (2) and the relative dynamics-similarly to [5], but with the sign of u ψ oppositely defined-are where φ is understood in the rotated frame, hence φ + π/2 − ψ = φ .Since the pedestrian is holonomic, this rotation doesn't affect its capabilities, and thus, in the remainder of this paper, the tilde will be omitted.

The Emergency Braking Game
The Emergency Braking Game is an abstract formulation of a continuous-time optimization problem with one player, closely related to the Suicidal Pedestrian Problem [5].Let's consider a pedestrian and a vehicle described in the natural space.The vehicle performs the following movement: it starts from the origin, moves along the y-axis, and slows down from its initial speed of v max to a complete stop with a deceleration of −a max .The coordi- nates of the vehicle will change as follows: where T = v max /a max is the duration of the process.The distance covered is denoted as S. The time in this abstract program is represented by τ to differentiate it from the real-world time t.The player of the game is a "suicidal pedestrian", whose motion is described in Eq. (1).The aim of the pedestrian is to collide with the vehicle as soon as possible.If the pedestrian cannot reach the vehicle before it comes to a stop, it aims to approach the still-moving car as close as possible.If it finds the optimal control for the scenario, φ * (•) , the pedestrian approaches the moving vehicle at a distance V, as described by If this value is greater than the radius of the circle describing the size of the vehicle, the vehicle will stop before hitting the pedestrian, even when the pedestrian applies optimal minimizing control.

EBG cases
For every possible initial position of the pedestrian, we want to provide the eventual miss distance V and the optimal controls.First, we display V as a function over the x, y coordinates of the pursuer by plotting contour lines with equal V value.
To do this, we draw a circle with radius V + wτ around each point along the car's path.In practice, we do this for a sample of these points.Starting from a point on such a circle, the holonomic pedestrian can get to the distance V from the vehicle at time τ .The hull of these circles con- tains the locations from which the pedestrian can get to the distance V at some point in time.Such a hull is similar to the dynamic envelope described in [28].
Figures 3, 4 and 5, show the hull and its generating circles for V = 0 , as well as only the hulls for other V values.The three subfigures were drawn with three different speed parameters.The red line marks the vehicle's path, starting from the triangle, around whose points the circles are drawn.
The figures show that in some cases (Figs. 4 and 5), the hull is a circle, significantly simplifying the solution in the case when the collision is not possible.Optimizing for a collision speed remains complicated for the case with collision.Figure 5 shows a borderline example where the hull is a circle.In Fig. 3, where we have a lower pedestrian speed, the hull has a more complex shape.The necessary and sufficient condition for this simplification is that the circle with radius wT for V = 0 drawn around the [0, S] T end-position of the vehicle contains the origin: from where wT ≥ S = v max T 2 -5 0 5 x An equivalent condition is that the distance covered by the vehicle takes less time for the pedestrian to run: S w ≤ T .Also, in this case, the optimal control of the pedestrian is to aim for the final position of the vehicle.
In the remainder of this discussion, we will assume the velocity of the pedestrian to be at least v max /2 .If the pedestrian is slower, this approximation is conservative and, therefore, does not violate safety regarding collision avoidance.

The solution to the simple case
If the speed constraint of Eq. ( 3) is satisfied, the solution for the optimization task involves the pedestrian aiming for the final coordinates of the vehicle [0, S] T , with the miss distance being: This value depends on the initial relative coordinates of the pedestrian (x and y) and the vehicle's initial velocity v.This formula remains valid throughout the game, using the remaining time and distance dependent on the current speed: T(v), S(v).
To develop the evasion algorithm, we need a closedform expression of the gradient of the function V in an arbitrary state.Let us introduce the expression Then, after elementary operations Using that T (v) = v/a max and S(v) = v 2 /2a max , we can write from where

Evasion strategy
In this section, we develop an evasion strategy for the vehicle based on the EBG.The following theorem makes the connection between the abstract optimization problem, the EBG, and the maneuvering task.In particular, the solution and V function of the EBG can be used to guarantee safety in the main scenario.
Theorem 1 If, at a time instant t, for all of the (pointlike) pedestrians' reduced coordinates and the speed of the (pointlike) vehicle, it is true that V (x, y, v) > 0 , then the vehicle is guaranteed to not collide with any pedestrians while coming to a full stop in a straight line decelerating with a max .

Proof
The origin of the reduced coordinate system is positioned to coincide with the vehicle, and the vehicle momentarily travels on the positive y-axis.Fixing the frame now to this point instead of the vehicle, the stopping maneuver is identical to that in the EBG.For any pedestrian, if initially V (x, y, v) > 0 , then the pedestrian cannot reach the vehicle before it stopped.As the movement of the vehicle doesn't depend on the pedestrians, if the condition V (x, y, v) > 0 holds for all of them, none can reach the vehicle before it has stopped.

Remark 1
In reality, the agents are not pointlike.Their extent can be incorporated into Theorem 1 by requiring the value to be greater than the sum of the radii of the circumscribed circles: V (x, y, v) > r car + r pedestrian .Then, the midpoint of a pedestrian's circle cannot come closer to the midpoint of the vehicle's circle than this value; hence the bodies cannot touch.

Remark 2
Collision avoidance is guaranteed only while the vehicle is moving.Pedestrians may bump into the stopped vehicle.
The key point of our evasion algorithm is to keep all V i values corresponding to N pedestrians P i above a safety level V safe .Unless there is a critical situation, the lowest V i value is increased through turning while keeping the maximal velocity of the vehicle.If any of the V i values fall below the safety threshold, the vehicle brakes; this is the critical case.Deceleration is always implemented in a straight line (for the acceleration, this is not always true).From the previous results, it follows that when decelerating with the maximal allowed −a max value, none of the V i values can decrease.In the worst case, when the critical pedestrian is indeed trying to collide, its corresponding V i is constant.

Change of the EBG values
Starting from the variables x, y, v of the reduced state of the realistic problem, the change of the V value with respect to the control inputs of the vehicle can be written as follows: which can be divided into parts controlled by the vehicle and parts that are not influenced by it: Using Isaacs' circular lemma [4], we find that the "optimal" (minimizing) movement direction of the pedestrian is antiparallel to the w[x/d, (y − S)/d] T vector of the terms corresponding to the pedestrian.Given that [x/d, (y − S)/d] T is a unit vector, the pedestrian's effect on V is −w , which makes the vehicle-independent part The vehicle's influence is It is noteworthy that V = 0 when u ψ = 0 and u v = −1 .This aligns with our expectations: when the vehicle is braking in a straight line, and the pedestrian is attempting a collision, the expected miss distance in the EBG remains unchanged, as they are exactly playing the EBG.

Algorithm
Up to this point, every expression was formulated in continuous time.However, in practice, the algorithm operates in discrete time.We discretize using the Euler method, given knowledge of the sampling time t.
Let us write the actual V as and subsequent V ′ values of the emergency braking games of P i ( i ∈ {1, ...N } ), dependent on the control inputs: The error of the Euler method, due to the changing gradient of the value, is neglected from hereon.
The vehicle tries to travel as fast as possible.The acceleration it can apply is constrained by the maximal acceleration and it may not increase speed above the allowed maximum in the the next sampling interval: Applying this control is only permissible if retaining the maximal speed or accelerating to it will not cause any of the N game outcomes below the safety level threshold V safe .We apply this condition without considering steer- ing, hence we predict the V values of the next cycle by substituting u ψ = 0 and u v = u v,max into Eq.( 4), denoting the index of the considered pursuer with i and the acceleration to the maximal speed with the "acc" subscript.
There are two possible scenarios: if, for all i ∈ {1, ...N } , V ′ i,acc > V safe , the vehicle accelerates to the maximum speed and evades the most critical pedestrian by turning.However, if this condition fails for any of the pedestrians, the vehicle proceeds straight and typically decelerates.As the value V ′ i,acc is calculated with the maximum possible acceleration, a lesser acceleration may be permitted even in the critical case.

Critical case
In any situation where an EBG's V i value falls below V safe , the vehicle, adhering to our strategy, will continue in a straight line and either decelerate or accelerate less intensely than the maximum.
From Eq. ( 6), we can derive the allowable acceleration by substituting the V value from the next cycle with the safety level.The prescribed acceleration coefficient then becomes This also includes the lower constraint, in cases when numerical effects cause V safe < V i and thus ũv < −1.
If multiple pedestrians are in a critical situation, the above equations select the smallest of the acceleration coefficients, implying the most intensive deceleration.This is safe in all scenarios since, if S−y i d i v − w < 0 , a stronger deceleration increases V ′ i , and if 6).Note that even though the smallest V i would approach V safe based on the previous equations, in practice, V i will increase when the pedestrian is not attempting to collide.
In the critical case, the vehicle does not turn: u ψ = 0.

Non-critical case
If no pedestrians are in a critical situation, the vehicle accelerates to the maximum velocity and increases the smallest V ′ i,acc by turning.Hence, we need to choose u ψ such that min i V ′ i is maximal.This can be formulated as a linear program using the auxiliary variable ξ: This linear program always has a solution since the constraints of u ψ are trivial, and ξ is only constrained from above.Hence it always provides the value for u ψ .While the linear program does not provide a solution for u ψ if v = 0 , in practice, this is not a problem, because the steering of a standing vehicle does not influence the dynamics.
In the non-critical case, the acceleration coefficient is u v = u v,max as defined in Eq. (5).

Incorporating the target
Using the previously defined rules and equations, the vehicle can maintain a safe distance from the pedestrians or stop if that is not possible.However, the vehicle also need to progress towards its target location.We incorporate this goal into the algorithm in the following way.In this subsection, we will work in the natural space coordinates.(7) The prescribed movement direction is defined as the direction from the vehicle E to the goal G. Any deviation from this direction is denoted by This deviation is scaled to represent a distance that can be compared to the miss distances of the EBG.We introduce two new terms that need to be maximized: We note that the minimum of these terms is maximal if �ψ = 0 and V N +1 = V N +2 = V .The parameters V > V define the relation to the V i values of the previous sec- tions.Above a miss distance V the importance of the pedestrians is negligible compared to keeping the direction, as min(V N +1 , V N +2 ) ≤ V .On the other hand, if, for some pedestrian P i , V i < V , the movement direction is of negligible interest compared to evasion from P i , as While technically the direction could be controlled by a single minimizing term describing the absolute value of the deviation, this could lead to oscillation if the deviation changed in each computational cycle.Maximizing the minimum of the two terms alleviates this oscillation by reaching the prescribed direction exactly in one step.The two linear terms also fit well into the previously defined linear programming scheme.
The vehicle-dependent part of the temporal change of V N +1 , using Eq. ( 2) and ( 9), is and analogically for V N +2 , with a negative sign.In sum- mary, for the non-critical case, we extend the linear program of Eq. ( 8) as follows: The extended linear program always has a feasible solution, for the same reason as Eq.(8).Note that the V movement direction is neglected in the critical case.The appropriate choice for the parameters is V > V ≥ V safe .

Summary of the algorithm
Let us summarize our algorithm in pseudo code.Inputs are the current velocity of the evader agent and the relative positions of the pursuers.Output is the two control variables of the evader.

Two baseline algorithms
As we discussed in the related work section, the research literature contains a large number of different path planning algorithms that consider mobile obstacle avoidance as part of their specification.In order to evaluate the performance characteristics of the EBG algorithm, we briefly describe two recent approaches that will be used as comparative baselines: Gaussian artificial potential fields and safety velocity obstacles.

Baseline 1: Gaussian artificial potential fields
As our first baseline, we implemented a generic Gaussian artificial potential field method that controls the direction as well as the speed of the vehicle.It applies the common considerations of all APF approaches [33][34][35][36].
The APF algorithm has two main steps: first, it sums the attractive force of the goal and the repulsive forces of the pursuers and then calculates the acceleration and turn coefficients from the resultant force.The attractive force exerted by the goal is where − → EG is the line connecting the vehicle's position with the goal, and γ t is the weight (importance) of head- ing towards the goal.
The repulsive forces exerted by the N pedestrians are with − → P i E connecting the positions of the pedestrians and the vehicle, and ρ serving as a tuning parameter.
The resultant force is the direction of which is the prescribed movement direction of the vehicle.This direction can either be achieved in one sampling interval, or the vehicle can implement the sharpest possible turn: while applying the following acceleration where γ a is the third parameter of the reference strategy, serving as an acceleration coefficient.
As the APF method requires the tuning of the values of three parameters, during our simulation study we experimented with several parameter sets.

Baseline 2: Safety velocity obstacles
Another reference algorithm, used in robotics and autonomous systems, is the Safety Velocity Obstacles (SVO) technique [38,39] an extension of the Velocity Obstacles algorithm [18].The goal of SVO is to choose the velocity vector of the vehicle such that it avoids colliding with any obstacle in its environment.The algorithm requires the position and velocity information of these obstacles to be known or to be precisely measurable at the time of decision-making.
Consider an environment with N obstacles B i , i = 1 . . .N , and a vehicle A. The velocity obstacle cone VO i encompasses all possible velocity vectors for A that would lead to a collision with obstacle B i at some point in the future.
In this equation, the position and velocity vectors of the agent and the obstacles are represented by p A , v A , p Bi , and v Bi , respectively.The sets of points in the workspace occupied by the vehicle and obstacle i if their positions are p are represented by A(p) and B i (p) .It is assumed that both the vehicle and the obstacles have a disk shape and that their velocities remain constant until time t.Additionally, it is assumed that there are no collisions between the obstacles during their motion.
The comprehensive velocity obstacle, VO, is formed by unifying all the individual velocity obstacle cones VO i .
The set of reachable velocities, RV, contains all velocity vectors v A that can be achieved by the vehicle within the specified sampling time.The crucial step in the VO method is to determine the reachable avoidance velocities set RAV, which can be calculated by subtracting the VO set from RV.These are the velocity vectors that the vehicle can select to ensure a collision-free path.A common approach is to discretize the RAV set by dividing it into a grid-like structure.
Figure 6 illustrates the approach in a scenario where a vehicle is navigating through a setting containing both stationary and moving obstacles.
In the SVO, the velocity selection of the vehicle is influenced by two components: speed and safety.These aspects can be simultaneously considered by using an objective function.
The speed component (GO) serves as a metric for evaluating the progression toward the target position (goal): (11) where v max represents the peak velocity the agent can attain while considering the limitations imposed by its kinematic properties.�θ i = θ rg − θ rv i is the difference between the angle of the goal ( θ rg ) and the angle of the velocity vector ( θ rv i ) while r i =|| v i ||.
The safety aspect (SA) of the objective function assesses the potential for collision.It is sufficient to consider only the nearest Velocity Obstacle (VO).Additionally, if the robot is unable to reach the closest obstacle within the specified time frame, it is considered to be completely safe, and further distance would not enhance the safety.Based on these considerations, the following expression is obtained: where T max is a known parameter representing the maxi- mum time interval considered during the motion of the vehicle.
Finally, the velocity and safety components of the objective function (OF) are combined as a weighted average, where the parameter α represents the significance of safety.The main goal of the SVO algorithm is to select the velocity vector for the vehicle that maximizes the objective function.
The parameter α plays a critical role in determining the outcome of the velocity selection process.During the testing phase, we evaluated various combinations of parameters to assess their effect on the results.We also (13) Fig. 6 An illustration of the VO method for a vehicle at position p A navigating an environment consisting of a static obstacle at p B2 and a moving obstacle (pedestrian) at p B1 with velocity v B1 introduced a bang-bang control into the SVO algorithm, where the fastest solution ( α = 0 ) can be selected if the obstacles are further from the vehicle than a predetermined distance parameter [38].Otherwise, the safest solution ( α = 1 ) is selected.

Experimental study
In this section we describe a series of experimental studies, performed in simulation that compare the EBGbased vehicle strategy with the two baselines described in Sect.6.
The examined scenario assumes a vehicle following the kinematic equations of (2) starting from the origin with zero speed and heading towards the location [150, 0] T m .The kinematic parameters of the vehicle are v max = 5m/s , a max = 2m/s 2 and R = 5m .The sum of the radii of the vehicle and a pedestrian (the "collision distance") is d c = 2m .The goal of the vehicle is to arrive at d c distance from the target point; in an environment without obstacles, it would take 30.85s.
To create a scenario that tests the ability of the algorithms to maneuver in a dense crowd, we positioned N = 30 pedestrians between the vehicle and the goal, with the initial coordinates sampled from a uniform distribution with x ∈ [10 m, 50 m] and y ∈ [−20 m, 20 m] .The pedestrians initial movement directions were random, and their speed was w = 2m/s .The pedestrians move along straight stretches, changing direction after random time intervals.
The frequency of direction changes was governed by an approximate discrete Poisson process.In each computation cycle, each pedestrian changes direction with a p = 0.033 probability independently of other pedestrians and previous computation cycles.The new direction was also a uniformly random independent variable.The average duration of one straight stretch is �t/p = 3s , with simulation's sampling time as t = 0.1s.
The simulation run terminates if the vehicle reaches the goal or collides with a pedestrian.In this simulation, a collision is defined as a state where the distance between the vehicle and the pedestrian is less than the collision distance d c , while the vehicle is heading towards the pedestrian:

Analyzing individual simulation runs
To understand the strategy deployed by the different algorithms, it is useful to analyze individual simulation runs in detail.To facilitate this analysis, the following visual notations will be used in the subsequent discussion.The trajectories of pedestrians will be depicted as lines of various colors, with a black point at the end of each line indicating the final position.The motion of the vehicle will be presented through a series of figures, each capturing a time interval of [0, 0.2T), [0.2T, 0.4T),..., [0.8T, T], where T represents the length of the simulation run.Lastly, a summary figure portrays the entire motion (0 to T) for both the vehicle and the pedestrians.Figure 7 shows the simulation run for the APF method.This run concludes with a collision at T = 30.9s .Figure 8 shows the simulation run for the SVO method.In this case as well, the vehicle fails to reach the goal, with the simulation run ending due to a collision at T = 12.3s .The only approach that had successfully reached the goal in this scenario is the EBG method which reached the goal at T = 85.5s , as depicted in Fig. 9. Figure 10 shows the complete paths of several specific pedestrians along with the motion of the vehicles controlled using the different algorithms.
In Figs.7-10 we see a scenario where the EBG outperforms the baseline agents.However, there is a downside to applying the EBG algorithm.As Fig. 11 depicts, the method is prone to oscillation, causing discomfort to passengers and putting strain on the mechanics and electronics of the robot.This will have to be amended prior to application of the algorithm by introducing smoothing to the control outputs.The effect of such lenient controls on safety may have to be countered by increasing the safety distance.

Experimental results
To perform a fair comparison between the algorithms, we tested them over 100 scenarios with randomly generated pedestrians.We ran the APF algorithm with 18 different parameter sets and the SVO method with 4 different α parameters.As the EBG parameters can be directly specified from first principles, they were chosen as follows: The effectiveness of the algorithms was evaluated based on the average running time and the number of accidents that occurred during the simulation runs.Table 1 shows the number of runs that resulted in a collision, and, for the runs that terminated successfully, the average time needed to reach the goal.We found that the EBG algorithm always avoids collisions.For the baseline algorithms, the parameters had a significant impact on the number of collisions.For the APF algorithm, the best parameter choice resulted in 19 collisions, but certain parameter settings had as many as 81 collisions out of 100 trials.The SVO method peformed significantly better, with the number of collisions ranging from 8 to 20, depending on the value of the parameter α .Com- paring the SVO and EBG methods, we found that while SVO generated faster solutions, it could not guarantee collision-free target-reaching in all scenarios due to its dependence on the velocity vector of the pedestrians, which could only be calculated between the last two steps.Hence, sudden changes in the velocity vector of the closest pedestrian could lead to collisions even if the vehicle performed an emergency braking maneuver, as shown in Fig. 8.The best solution with the SVO method was achieved using the bang-bang control in the parameter set, resulting in eight collisions.However, overall, the APF Fig. 7 The motion of the vehicle using the APF method.In this scenario, the goal cannot be reached because of a collision SVO Fig. 8 The motion of the vehicle using the SVO method.In this scenario, the goal cannot be reached because of a collision EBG algorithm was the most effective in achieving collision-free target-reaching tasks.
In a real-world scenario, we care not only about avoiding accidents but also the safety of the vehicle's movement.To investigate this, for the EBG and the bestperforming APF and SVO parametrizations, we collected all time instants from all collision-free runs where the closest pedestrian is closer than 10m.In Fig. 12, we display the frequencies of such moments depending on the distance and the speed of the vehicle.In the figure, the color of a speed-distance category corresponds to the logarithm of the number of occurrences.
We find that when using the APF algorithm (left), zero and maximal vehicle speeds are the most frequent, with the histogram showing an approximately uniform distribution.For the SVO algorithm (center), we find that the vehicle tends to select large velocity vectors to execute evasive maneuvers to avoid collisions, and it never comes to a full stop.However, as previously shown, the SVO method does not always guarantee collision-free motion.In the case of the EBG algorithm (right), we see a curve corresponding to maximal deceleration.This curve is fuzzy because the pedestrians are not following the EBG-optimal direction.It is important to note that the non-zero points in the EBG case are much farther from the high velocity / low distance (upper right) corner of the figure compared to the two EBG Fig. 9 The motion of the vehicle using the EBG method.In this scenario, the goal was reached, resulting in the only collision-free solution EBG Fig. 10 The motion of the evader agent using the three different methods.The whole path of some of the obstacles can be seen baseline algorithms, meaning that even the most critical situations are significantly less dangerous.All collision avoidance algorithms must strike a balance between safety and the time to reach the obstacle.
We study the tradeoffs made by the different algorithms in Fig. 13.
The comparison includes the EBG algorithm, the APF algorithm with parameters γ t = 0.01 , ρ = 2d c , γ a = 2 and the SVO algorithm following the bang-bang strategy.Only successful (collision-free) runs are examined.The SVO agent reaches the goal significantly faster than both the APF and the EBG, with the time to goal being below 40 s in the majority of situations.On the other hand, the EBG agent never finishes faster than 40 s.The elapsed times of all three agents are consistent, with a few high outliers.The EBG agent's improved safety, comes at the cost of degraded navigation performance.

Sensitivity to obstacle parameters
We challenged the collision avoidance methods by putting a number of dynamic obstacles between the start and goal positions.We have identified three main factors influencing the performance of the agents: the number of pedestrians, the speed of the pedestrians, and the unpredictability or randomness of their movement.In the following, we analyze the sensitivity to these factors to explore our methods's applicability and find worst case situations.First, let us vary the switching time, the average duration of straight stretches in the pedestrians' movement, while keeping all other parameters unchanged.We expect that more predictable pedestrians are easier to avoid, leading to better performance.Fig. 14 confirms this expectation: APF and SVO agents have fewer collisions and both the APF and EBG algorithms reach the target in a shorter time.Note that the average time in case of an EBG agent increases for a switching time of 10 s, but the median time decreases.This is due to outlier scenarios where a pedestrian approaches the target area and thus prevents the agent from reaching it, With regard to speed, slower pedestrians are less dangerous.This is confirmed in Fig. 15: fewer collisions happen with slower pedestrians.Interestingly, for the APF and EBG agents, the time taken to reach the goal increases greatly when the obstacle speed is reduced.This effect can be explained by pointing out that these two agets often stop and wait for a pedestrian to pass, whereas the SVO leans more on swerve maneuvers.A slow pedestrian can be bypassed easily, but one has to wait longer for it to pass.
The number of pedestrians has an obvious effect on performance.Fig. 16 shows that increasing the number of obstacles leads to more collisions, and longer elapsed times.It is still worth noting, that the influence on time is much greater in the case of the EBG than the other two agents.Once more this can be attributed to the EBG's conservativeness.
Let us note two important observations.First, the EBG agent moves collision-free, regardless of the simulation parameters.Second, the worst case for our algorithm is when obstacles are moving slowly; then, the handicap regarding efficiency is greatest.

Conclusions
In this paper, we introduced the Emergency Braking Game and, based on it, an algorithm that allows a vehicle to avoid collisions when navigating through a dense crowd of pedestrians, even accounting for worst-case pedestrian behavior.Analyzing the technique under some simplifying assumptions, we provide a formal proof of its safety.In an experimental study comparing it to two baseline algorithms, we validated the safety proof, and found that the baseline techniques had a significant number of collisions.The next step in the development shall be the elimination of oscillating controls.Future research will additionally focus on omitting the simplifying assumptions we have made in this work.In particular, it will involve handling observation uncertainties and partial observation, actuator noise, as well as incorporating static obstacles and the boundaries of the usable space.

Fig. 2
Fig.2Relation of the natural and reduced spaces.The heading of the vehicle coincides with the relative 'y' axis.The pedestrian's movement direction is explicitly shown

Fig. 11
Fig. 11 Acceleration and velocity of the EBG agent in the example simulation run.Heavy oscillation can be seen between cycles 396 and 416.

Fig. 15 Fig. 16
Fig. 15 Results dependent on the speed of the pedestrians.(left) Number of collisions, (right) Average and median time to reach the goal

Table 1
Average run times and number of accidents depending on the APF and SVO parameters