AI: what else is in AI besides machine learning
Tags: ai
Published: 2023-06-15 20:38:46

Artificial intelligence is a very ample field, its birth is not as recent as one thinks, however it is constantly evolving. We talked about machine learning in a [previous article](https://dev.to/eleonorarocchi/ai-what-is-machine-learning-472n), which is one of the fields of AI, but it is only one.

We have said that artificial intelligence is a field of study that deals with developing systems or machines capable of performing activities as human intelligence would perform them, i.e. reasoning, learning, applying problem-solving and making decisions.

Machine learning is a specific approach to AI that focuses on the ability of a machine to learn from data without being explicitly programmed. In fact, algorithms and training data are provided so that the machine learns from them so as to make predictions or make decisions based on this data. Machine learning relies on identifying patterns and trends in data and using algorithms to adjust and improve model performance based on those patterns.

However, there are other approaches, let's see some of them together.

##Symbolic logic
This approach is based on formal logic, that is a branch of logic which, rather than on the meaning of prepositions or their semantic content, analyzes their structure and the relationships between them.

Formal logic is also called symbolic logic, precisely because it involves representing prepositions with symbols and using logical connectors to connect them.

Through the rules of logic, new prepositions can then be derived from existing ones.

##Rule-based reasoning
In this case, rules are predefined so as to define specific actions to be taken when certain situations occur.

These are logical rules, which link premises to actions or conclusions.

The AI system applies these rules to the available inputs, thus evaluating the conditions and determining which rules are satisfied, then performs the corresponding actions associated with the satisfied rules.

This approach is preferable when there is great knowledge of the application domain. Conversely it is not particularly suitable for very complex or ambiguous situations, when the conditions are not deterministic.

##Neural networks
This approach uses a network of nodes, called neurons, connected to each other with the aim of exchanging information through weighted connections, where the associated weight represents the importance of that connection in the processing process.

Neurons are organized into layers, usually divided into three main parts: the input layer, the (optional) hidden layers, and the output layer.

The training takes place by alternating two phases.

Input data is presented to the neural network through the input layer, from here each neuron in a subsequent layer receives inputs from neurons in previous layers, processes them and produces an output using an activation function, so up to the output layer , which provides the final result of the network. This phase is called _forward propagation_.

Once the output is obtained, the discrepancy between the expected output and the desired output value is calculated. This error is then back-propagated through the network, changing connection weights to reduce it. Consequently, during this phase, the weights of the connections are updated based on the extent of the error committed. This phase is called _backpropagation_.

The two phases are repeated for a certain number of iterations to ensure that the neural network learns and improves its performance.

Neural networks are used to make predictions or decisions about new input data.

This approach is widely used in image recognition, machine translation, text classification, speech recognition.

##Case-based reasoning
This approach relies on using previous cases as a knowledge base for solving new problems.

It generally includes four main phases:

1. Retrieve: The system searches its database of previous cases for those relevant to the current problem, determined based on similar characteristics of the problem or desired outcomes.
2. Reuse: The system uses the recovered cases to find solutions or suggestions applicable to the current problem.
3. Review (Revise): the solution or suggestion is examined and evaluated, possibly changes or adaptations can be made to address the specifics of the problem or to improve the solution.
4. Retain: The current case or solution is added to the database of previous cases.

The approach is indicated when there is no direct algorithmic solution or the environment is subject to frequent changes.

The main use cases are medical diagnostics, industrial maintenance, user assistance, process planning and many others, where experience and adaptation to new scenarios are important to achieve good results.

##Optimization and research
Optimization and search are approaches used in AI to solve complex problems and find optimal solutions. These approaches involve mathematical modeling of a problem and applying specific algorithms to find the best possible solution.

Optimization aims to find the best solution in a set of alternatives that meet the desired criteria.

Some common optimization algorithms used in AI include:

1. Genetic algorithms inspired by the theory of biological evolution
2. Local search algorithms that iteratively explore nearby solutions trying to improve the target
3. Linear programming algorithms used to solve linear optimization problems
4. Combinatorial optimization algorithms designed to solve optimization problems where the solutions are sequences or combinations of discrete elements

Search instead focuses on the systematic exploration of a set of possible solutions to find the one that satisfies the specific requirements of the problem and is based on different search algorithms.

##Inductive learning
Inductive learning is an approach in AI that involves acquiring general knowledge and rules from specific examples or training data with the aim of extracting hidden patterns, relationships or structures from the training data and applying them to new data or similar problems.

This approach is used in cases of:

1. Classification, to train a model to distinguish between different classes or categories.
2. Regression, to model relationships between variables and predict continuous or numerical values.
3. Knowledge extraction, so to extract knowledge and rules implicit in the data.
4. Clustering, to identify natural structures or groups in the data without the need for predefined labels.

Inductive learning algorithms include decision trees, random forests, support vector machines, neural networks, and many more. These algorithms try to find models or functions that minimize error or otherwise maximize accuracy while learning, allowing the model to generalize and make predictions or knowledge extraction on new data.