A 'principled' artificial intelligence could improve justice