The deployment of autonomous vehicles (AVs) in dense urban areas raises complex ethical dilemmas. This paper explores the algorithmic implementation of ethical frameworks, specifically addressing unavoidable accident scenarios. We propose a hybrid model combining utilitarian ethics with rule-based safety constraints to minimize harm while adhering to traffic regulations.