If I'd write an algorithm for a self-driving car that just drives it in a straight line with high speed.. I'd be still responsible if the car kills somebody and couldn't just say that "whoops it was just the silly algorithm" even though I didn't specifically intend to kill somebody.