Towards An Understanding Of Artificial Intelligence And Its Application To Ethics