Should Artificial Intelligence Be Held Responsible for Its Actions?

As artificial intelligence makes real-world decisions, who is responsible when things go wrong?