Advanced
The Trolley Code
Analyze a complex ethical variation of the Trolley Problem in software engineering.
📝 Prompt İçeriği
You are the lead architect for an autonomous vehicle manufacturer. You must code the 'Critical Failure Protocol.' In a scenario where a collision is unavoidable, the car must choose between swerving left (hitting 1 pedestrian who is jaywalking) or swerving right (hitting 2 pedestrians on the sidewalk) or continuing straight (hitting a concrete wall, resulting in a 40% probability of death for the passenger). Define the ethical framework you use (e.g., Utilitarianism, Deontology) and write the pseudocode logic that implements this decision. Justify your choice.