Logic-based machine learning for transparent ethical agents