🏠 首页
基准测试
📊 所有基准测试 🦖 恐龙 v1 🦖 恐龙 v2 ✅ 待办事项应用 🎨 创意自由页面 🎯 FSACB - 终极展示 🌍 翻译基准测试
模型
🏆 前 10 名模型 🆓 免费模型 📋 所有模型 ⚙️ 🛠️ 千行代码模式
资源
💬 💬 提示库 📖 📖 AI 词汇表 🔗 🔗 有用链接
Advanced

The Trolley Code

#ethics #programming #philosophy #decision-making

Analyze a complex ethical variation of the Trolley Problem in software engineering.

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.