TLDR: Automated Reasoning is a branch of AI in which the model should be able to understand how it can reach a goal.
Assume you want to open a door. When you think about techniques such as machine learning, you have to feed the model with an incredible amount of data containing good and wrong actions. A good action can be to rotate the door handle, and a wrong action could be moving around.
This kind of techniques leads to two major problems:
- You need a very big dataset also to handle little tasks;
- You can estimate the success percent but you can't be sure of it.
In automated reasoning the model can "understand" which action to take based on logical deduction.
For example, if you want to open the door but you are sitting on a chair, your first action should be to sit up from the chair. That's it.
This kind of model should know, for example using sensors, if they are on a chair or not. If yes, the right action to take is "sit up".
So, imagining the robot is in an empty room that contains only a chair and a door, it should:
- If it is on the chair, sit up
- If the hand is too far from the door, go next to the door
- If the hand is near the door, rotate the door handle
- If the door handle is rotated, pull it
In fact, these are the actions that a human will use to open a door. For us it's natural, but a robot doesn't know how things works.
State
Let's take a look on the first action: "If it is on the chair, sit up".
How the robot knows if it is on the chair? Here comes state. A state is a set of statements in which every statement contains an information about the robot or the surrounding world. In this case, you should have two possible states, and only one can be true:
- On the chair
- Not on the chair
A well known syntax is the one in which there is a verb or a preposition and a parenthesis containing the subject. So the first statement becomes On(chair). For the second statement, we will put a not before the statement, so it becomes not On(chair).
Actions
Now we can ignore the action to perform, because it is not important for the purposes of this article. I used it only to give you an idea of how this works.
So, we can rewrite the first action as:
- On(chair), not On(chair)
Now, we can say that an action is composed by two parts:
- A set of preconditions: the robot state to perform the action
- A set of postconditions: the robot state after it performed the action
But what's the starting point of the robot? Which statement is true? On(chair) or not On(chair)?
To solve this, we have to introduce the notion of initial state. The initial state defines the set of statements that the robot knows when it starts working. For example, if it is on the chair, it's initial state will be: On(chair).
And what's the final point of the robot? When it can say "yes, I did it!"?
In this case, we have to talk about goals. Goals are a set of statements that must became true in the final state. In our case, the goal is Opened(door).
In automated reasoning, one important thing is to define an algorithm, given a set of actions, capable of reaching the goal.
So we can rewrite our plan as follow:
Here you can see that some preconditions and postconditions have more than one statement. This is fine, it's the same of saying "if not on chair and far from door". Let's deep dive with two examples.
Example #1
Initial state: On(chair) FarFrom(door)
We can take only the first action: On(chair), not On(chair).
So the current state becomes: FarFrom(door)
We can take only the second action: not On(chair) FarFrom(door), NextTo(door) not FarFrom(door)
Current state: NextTo(door)
Action to take: not On(chair) NextTo(door), Rotated(doorHandle)
Current state: NextTo(door) Rotated(doorHandle)
Action to take: Rotated(doorHandle), Opened(door)
Current state: NextTo(door) Rotated(doorHandle) Opened(door)
Awesome! Now the robot has reached the goal.
Example #2
Initial state: NextTo(door)
Now we can apply only the 2nd action: not On(chair) NextTo(door), Rotated(doorHandle)
Current state: NextTo(door) Rotated(doorHandle)
Action to take: Rotated(doorHandle), Opened(door)
Current state: NextTo(door) Rotated(doorHandle) Opened(door)
Awesome! Now the robot has reached the goal.
Conclusion
That's it, now you know how to open a door using automated reasoning. To be honest, this is one of the tasks in which automated reasoning is involved. This kind of task is called planning, and we used a syntax like the one used in STRIPS.