Rizwan Asif I am a technopreneur exploring the field of artificial intelligence to build the next big thing in tech. My vision for the world is to reduce human capital for low level system tasks and put humans in the higher decision making positions. We are not meant to sort stamp papers, we will give up that task to create something beautiful. 6 min read

Resolving Ethical Dilemma in Artificial Intelligence

Artificial Intelligence (A.I) is making it's way from science fiction to every aspect of reality. Although, it's not something to be alarmed about (yet), since, we are still far away from a general artificial intelligence that can take over the world.

Right now, A.I is a tool that serves us in many trivial tasks like booking an appointment, break if you see someone crossing the road, suggest some movies, etc. Some of these tasks might seem complicated, however, they are decisions made by statistical analysis a.k.a machine learning.

What follows is something we should worry about. You see, A.I will (at least attempt to) take over serious tasks. Such as negotiating a reservation price, take instantaneous decisions on a highway, buy a suggested movie or save the owner's money? These type of decisions require an ethical weight to be involved and thus vulnerable to ethical dilemmas.

This article talks about the latest research being carried out to solve the ethical issues regarding A.I decision making.

Human Ethics

Ethics can be shortly termed as the systematic study of right and wrong [1]. It's a part of our human societies and might be written or unwritten. Using ethical codes embedded in our nature we resolve ethical issues based on instincts and past experiences. But how are actually these codes embedded in our brains? We are certainly not born with them, otherwise, all humans would have the same ethical values.

The answer can be found in the origins of ethics themselves. Long ago cavemen used to instill ethics in society by storytelling. Communicating experiences in the form of gestures, writing or voice. Fiction or reality all these stories had some lesson to them. Which lead to common decision making in a group of people.

Storytelling has been an important aspect of the development of humans. That explains why Rulers or Pharaohs wanted everything about themselves documented and distributed among the masses. We learn ethics by examples of other characters, real or fictional.

Machine Ethics

As simple as it seems, ethics are difficult to be translated into computer code. The reason being the complexity and diversity of ethical laws. The complexity can be understood by the following example.

How do you teach a machine that, unemployment is not the same as leisure?

If we try to understand this logically then a person is not working in both cases. One difference is that they are earning money or not. But it can be that a person is taking a non-paid leave, or they are earning from some other means but not actually employed.

The diversity of ethical codes comes from the fact that no action can be termed ethically correct because all value judgments are relative either to societies or individuals [2]. Ethicists might not agree on every ethical human decision but, we can agree on this:

"We are more likely to agree on how machines ought to treat us than on how human beings ought to treat one another." [2]

Solving Digital Ethics

In computer terms, we can say ethics are the right and wrong of machine actions. While actions can only be questioned when they come from qualitative or quantitative decision making. We call this logic programming [3]. Each action comes from processing a logical statement, but logical decisions are not always ethical. Therefore, we need something to analyze these actions and weigh logic accordingly.

Anderson, M. and his lab have been working on creating a general ethical dilemma (GenEth) analyzer [2] that can help solve this issue. GenEth serves in generating a principle that is the most general specification.

GenEth works by defining actions, cases, and principles in terms of features and duties that are processed quantitatively based on ethical preferences.

Ethical preferences come from human beings themselves. GenEth uses machine learning [4] to understand human preferences given certain ethical cases. A situation is provided to an ethicist and out of given actions the ethicist chooses the preferable one. Once the algorithm is trained enough, we can put it into practice.

An example of GenEth in action can be viewed below.

Teaching Ethics

One interesting method to teach machines is through storytelling. The same as humans learn ethics the same way then why not machines. I wrote a separate article about this here [5].

In the AI world, this could be achieved through reverse reinforcement learning (RRL) and decision trees (DT) [6]. GenEth can utilize these tools. As discussed before, GenEth uses a learning algorithm to understand the preferability of actions based on data provided by ethicists. Instead of ethicists, what if machines learn these preferences by stories?

We design a story that has a moral conclusion of a case that might arise with a machine. The conclusion should be in accordance with the ethical principles that we would like to instill in the machine. Not science fiction, but real tools.


Artificial intelligence is coming, heavy research is being carried out in the field and parties are investing to make A.I a reality. However, the bright side is that there are research groups focussed on preventing an uncontrollable A.I and they are making sure we do not create our own destruction.

Reference Shelf

[1] Singer, P. (2019, March 29). Ethics. Retrieved May 5, 2019, from https://www.britannica.com/topic/ethics-philosophy

[2] Anderson, M., & Anderson, S. L. (2014, June). GenEth: a general ethical dilemma analyzer. In Twenty-Eighth AAAI Conference on Artificial Intelligence.

[3] Lloyd, J. W. (2012). Foundations of logic programming. Springer Science & Business Media.

[4] Muggleton, S., & De Raedt, L. (1994). Inductive logic programming: Theory and methods. The Journal of Logic Programming, 19, 629-679.

[5] R. A. (2019, March 10). Teaching Machines About Human Ethics. Retrieved May 5, 2019, from https://becominghuman.ai/teaching-machines-about-human-ethics-19467c2d77b4

[6] Riedl, Mark O., and Brent Harrison. “Using Stories to Teach Human Values to Artificial Agents.” AAAI Workshop: AI, Ethics, and Society. 2016.

Rizwan Asif I am a technopreneur exploring the field of artificial intelligence to build the next big thing in tech. My vision for the world is to reduce human capital for low level system tasks and put humans in the higher decision making positions. We are not meant to sort stamp papers, we will give up that task to create something beautiful. 6 min read

Robotic Process Automation (RPA): Automating Your Office Chores

How RPA can change the way our offices operate. A case motivated guide for people who need robots in their office.

Teaching Machines About Human Ethics

Let's teach artificial intelligence they way we learn.. by storytelling. Advancement in artificial intelligence is picking up pace at a substantial level. Entering humans in to an era where decision making will be at least machine consulted, if not machine governed. Since, these intelligent machines or agents do not experience the same emotions and experiences as humans do.

Deploy Directly From GitLab to Google App Engine - Rizwan Asif - Medium

A simple tutorial to make your application ready for continuous integration. Just push to your GitLab repository and it is deployed. Google App Engine (GAE) is a robust platform for deploying web applications quickly and safely. I have been using GAE for quite some while now and have certainly faced lesser road blocks than my friends using competitive services.