A non-transitory computer-readable recording medium containing a program applicable to a driver assistance apparatus for a vehicle, the program, when executed by one or more processors, causing the one or more processors to be configured to:
- detect obstacles around the vehicle;
- determine collision risks associated with the detected obstacles, wherein the one or more processors are configured to assign, in a space around the vehicle and for each of the detected obstacles, collision-risk values that are highest at positions overlapping the detected obstacle and progressively smaller at positions farther from each of the detected obstacles, based on a position, size, type, and relative speed of each of the detected obstacles;
- obtain a risk map by aggregating the collision-risk values assigned in the space around the vehicle for the detected obstacles;
- determine, based on the risk map and a travel state of the vehicle, whether a collision between the vehicle and any of the detected obstacles is avoidable, wherein the determination includes determining whether the collision is avoidable through deceleration of the vehicle or a change in a path of travel of the vehicle;
- when the collision is determined to be avoidable, set a driving condition of the vehicle based only on the risk map, the driving condition including an updated path of travel of the vehicle;
- when the collision is determined to be unavoidable,
- (i) acquire setting data regarding one or more predefined damage risks selected from the predefined damage risks stored in one or more memories, the one or more memories storing predefined damage risks caused by a collision between the vehicle and obstacles around the vehicle and also storing a damage database holding data regarding previous damage situations on occasions of unexpected events in association with traffic situations;
- (ii) acquire data regarding a surrounding environment around the vehicle and data regarding an operation state and a behavior of the vehicle;
- (iii) refer to the damage database and extract data regarding damage in an unexpected event that occurred in a traffic situation similar to a current traffic situation indicated by the acquired data regarding the surrounding environment around the vehicle and the acquired data regarding the operation state and the behavior of the vehicle,
- (iv) calculate, based on the extracted data regarding the damage and the acquired setting data, a damage risk value to be added to the collision-risk values assigned in the space around the vehicle for the detected obstacles,
- (v) update the risk map by adding the damage risk value to the collision-risk values assigned in the space around the vehicle for the detected obstacles to generate an updated risk map, and
- (vi) set the driving condition of the vehicle based on the updated risk map, the driving condition including an updated path of travel of the vehicle;
- and
- control the vehicle based on the driving condition of the vehicle to travel along the updated path of travel of the vehicle.