Autonomous vehicles will independently take over decisions in road traffic: they will decide when to brake, how much distance to keep from other road users etc. Apart from accident situations, even these mundane decisions carry ethical dimensions since implicitly with the trajectory planning it is decided which road user is exposed to more risks. In a new article published in Nature Machine Intelligence, the team developed and tested an ethical trajectory planning algorithm for autonomous vehicles in a simulation. The result: Vulnerable road users such as cyclists are exposed to higher risks in traffic when autonomous vehicles act according to a selfish algorithm, compared to the team’s ethical algorithm. This study aims to set an example of the feasibility of turning ethics into code as well as raise awareness about the social implications of doing so.