Understanding the Logic Behind Artificial Intelligence

The Science of Logic

Logic as defined by Merriam-Webster’s online dictionary is, “A science that deals with the principles and criteria of validity of inference and demonstration; the science of the formal principles of reasoning.”

The question comes to mind then: how can software be programmed to infer conclusions using human reasoning and rationale?

To start, let’s gain a better understanding of the science behind logic.

Logic looks at preset equations and rules, and then compares the data in question against those rules to decide whether something is true/false, right/wrong, on/off, etc. The following is a hypothetical example of a conditional statement used in logic:

Rule: If a person sleeps in, then they’ll probably be late for brunch.
Problem: Joe overslept.
Solution: Joe will probably be late for brunch.

So to infer the correct solution to this problem, let’s figure out what is true versus false and then look to what are called the “Truth Tables”, which are used in common logic to identify the outcome.

Rule: If a person sleeps in, then they’ll probably be late for brunch. TRUE
Problem: Joe overslept. TRUE
Solution: Joe will probably be late for brunch. TRUE

Looking to the truth tables, we see that TRUE and/or TRUE returns TRUE. The full truth tables, give examples of the basic equations used in logic and their conclusions. These common mathematical tables are useful to memorize or keep in mind when constructing algorithms (instructions) in computer programming.

What Does Artificial Intelligence Use to Make Decisions?

Artificial Intelligence (AI) is the branch of computer science that researches and studies the ability to program software that uses logic to make decisions, mimicking that of human rationale, only faster and more accurate.

So how does it accomplish this? AI derives logical conclusions based on a combination three main factors which include:

  • Archived historical data is used as a basis to construct the rules and logical conclusions that fit the scenario.
  • Fresh incoming data continually adds to the basis to further support the logic
  • Real-time human interaction occurs when a decision isn’t clear.

These factors are the keys used in building and training the complex algorithms that perform problem-solving calculations.

Programming Logic for Artificial Intelligence

In the computer programming used to create the AI algorithms, logic translates into “Boolean” values of true and false based on conditional if/then statements.

True versus False decisions come from the ‘if this, then that’ logic.

Much like we calculated the correct solution to whether or not Joe would probably be late for brunch, AI will calculate the problem and arrive at the same conclusion.

AI has the historical data as a basis, and the logical business rules programmed into its algorithm. So when the machine receives a question or problem, within milliseconds AI calculates the available outcomes, verifies what is true and false, and then based on the truth tables it will select the most accurate and logical choice.

AI enables machines to make the best decisions possible, essentially giving them the ability to learn, reason, and understand. This is referred to as Machine Learning (ML), which is the matured branch of AI that applies its methodologies into the workforce and uses this science to perform everyday practical tasks.

Applying Conditional Statements to Artificial Intelligence

The following are simple business logic rules that can be applied to AI algorithms, based on conditional if/then statements.

  • If the student receives over 60% on a test
    then report a passing grade;
  • If a client has money in their account;
    then calculate interest;
  • If a customer buys items in quantities of 12 or more;
    then calculate a discount of 10%;

Adding another layer to the if/then, is an alternate ‘else’ statement if the true condition fails.

  • If the student receives over 60% on a test; 
    then report a passing grade; 
    else report a failing grade.
  • If a client has money in their account;
    then calculate interest; 
    else charge an overdraft fee.
  • If a customer buys items in quantities of 12 or more; 
    then calculate a discount of 10%;
    else charge a shipping fee.

Does AI Ever Make Bad Logic Calls?

As with any software, a necessary recovery plan should be in place in case of replete failure. However, it should not be necessary to double-check the results, logic, or accuracy of automation software once it’s been implemented, since it programmatically will not make errors in judgement.

Automation software products, like WorkFusion’s Smart Process Automation (SPA) are smart enough to realize it needs help when it encounters something it cannot understand. The software is actually programmed with this in mind, to expect that scenarios will arise when its decision-making ability is impeded, or if the choice isn’t 100% clear.

In cases like this, rather than proceeding and using less than accurate logic which could potentially result in making a bad decision, intelligent automation software will ask for human assistance.

Improving ‘Thought Processes’ within Machine Learning

It might sound somewhat tedious to continually have to supervise applications using ML, having to constantly intervene every time it comes across unexpected or unknown data that it doesn’t know how to process.

That’s the beauty of intelligent automation software.

Once human assistance has intervened with the correct decision, the software will “learn” from those escalations. Remember the three key factors above that comprise AI algorithms? They include fresh incoming data and human interaction.

This new data that was received during the escalation, enables ML to continuously adapt and improve its own ability to automate, leaving the doors wide open to change… and enabling the logically-based rational master-machine to also be able to ‘go with the flow’ and ‘roll with the punches’.

The Future of Artificial Intelligence and Machine Learning

AI and ML are on a threshold of automating and advancing modern day society to new levels. Like with any technology, there are advantages and disadvantages to consider.

AI and ML will only ever be as good as the human logic and business rules that are built into it and the base algorithms. However with it’s ability to calculate, learn, and adapt as needs change and grow, it’s easy to see how they can rapidly become an integral part of any business looking to gain a competitive edge in the marketplace.