The ethics of AI: how to hold machines accountable