# What is Logic in AI

In this article, we will learn about how Artificial intelligence is making a global impact this decade. We will discuss how AI can take good decisions in different fields. Whenever a human being tries to answer a question, it checks according to logic whether the answer fits with logic or not. Same in the field of Artificial Intelligence Logic is important. Logic is a systematised and formal approach to thinking, inference, and problem-solving based on norms, principles, and links between propositions or statements. It applies inductive or deductive reasoning to analyse and evaluate data for an acceptable and fair conclusion. Logic is used in fields like Mathematical, philosophical, computer-related, and Artificial Intelligence.

Artificial intelligence (AI) is built on logic. The collection of rules determines how computers can be trained to think critically, pick up new information, and make judgements. Thanks to logic's structure and framework, AI systems can analyse data, come to conclusions, and conduct actions based on those conclusions.

Let’s have a detailed look at how logic is used in artificial intelligence (AI) and talk about some intelligent systems that are made.

## What is Logic in AI?

Logic in Artificial Intelligence is a systematic set of guidelines that specify how information is represented and processed to get favourable outcomes. It offers a framework for thinking critically about the world, making choices, and dealing with issues. Many AI technologies, such as expert systems, knowledge graphs, and decision trees, are built on logic.

There are mainly two types of logic which are used in Artificial Intelligence.

• Deductive logic
• Inductive logic

### Deductive Logic

Deductive Logic uses the top-down approach to find its reasoning, which helps it to decide and make decisions. This logic first works with broad premises or guiding principles to find specific findings or forecasts.

Let’s understand deductive reasoning with an example. For example, we can use deductive reasoning to determine that Ravi is mortal if we know that all humans are mortal and that Ravi is a human.

### Inductive Logic

On the other hand, inductive logic uses the bottom-up method to find its reasoning, which helps it to decide and make decisions. It starts with specific observations or facts, general principles or theories derived to find the outcomes.

Take a look at this example, and it will help you to understand inductive logic. For example, we might use inductive reasoning to conclude that all crows are black because we noticed that every one of them is black.

Artificial Intelligence makes use of both inductive and deductive logic. Deductive logic is used in rule-based and expert systems, where precise rules are employed to generate specific conclusions. But, when we use data to derive broad patterns and principles, inductive logic is used to make machine learning models and data analytics.

## How is Logic Used in AI?

We learn what logic is which is used in AI. Let’s look at how AI uses logic to create different types of systems.

• AI uses logic in different ways. One of the most significant applications of logic in AI is the creation of expert systems. Expert systems are AI programs created to mimic the judgements of people with specialised knowledge in a given field. Typically, they are created utilising a knowledge base of rules and a reasoning engine that can adapt them to different circumstances.
• Logic is frequently used to express the rules in expert systems. For example, a rule could be "if P then Q," which tells that if statement P is true, statement Q must also be true. Expert systems can use these rules to make judgements and give users recommendations.
• Another significant use of AI is used in Knowledge graphs. In these graphs, knowledge is stored and represented in a database structure. They are frequently used between various data kinds or ideas to depict complex connections between various items. In a knowledge graph, nodes represent individual things, and edges show connections between those nodes. Logic operators like "and," "or," and "not" can be used to identify the edges to reflect higher-level interactions between the items.
• Logics are also used to create AI decision trees. It is an algorithm that can be used to judge based on a set of rules.
• AI also uses logic to create decision trees. One form of an algorithm that can be used to make judgements based on a set of rules is decision trees. A decision is divided into many more minor, more straightforward decisions that can individually be described using logic for them to function.

## Conclusion

This article taught us what logic is and how it is used in Artificial Intelligence. Logic offers the structure for decision-making, learning, and reasoning in AI systems. Some AI technologies that use logic are expert systems, knowledge graphs, and decision trees. Logic will continue to be crucial in creating intelligent systems as AI develops.