Understanding the Logic Behind Artificial Intelligence

Updated on February 12, 2018
Elizabeth Rossi profile image

Elizabeth graduated Cum Laude from the University of Pittsburgh in computer science and professional writing, and has 10+ yrs experience.

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.

Dictionary
Dictionary

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's commonly 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, which are listed below, 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.

Logic Truth Tables

x
=
y
Returns
True
=
True
True
True
=
False
False
False
=
True
False
False
=
False
True
x
AND
y
Returns
True
and
True
True
True
and
False
False
False
and
True
False
False
and
False
False
x
or
y
Returns
True
or
True
True
True
or
False
True
False
or
True
True
False
or
False
False
Not
x
Returns
Not
True
False
Not
False
True

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.

Artificial Intelligence Algorithm
Artificial Intelligence Algorithm

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 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.

© 2018 Elizabeth Rossi

Comments

    0 of 8192 characters used
    Post Comment

    No comments yet.

    working

    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, turbofuture.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: https://turbofuture.com/privacy-policy#gdpr

    Show Details
    Necessary
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
    Features
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Marketing
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Statistics
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)