# Reactive Obstacle-Avoidance Systems for Wheeled Mobile Robots Based on Artificial Intelligence
## 2 Artificial Intelligence, Obstacle Avoidance, and Navigation
The bias neuron is added with the weighted inputs to create the net input (see Equation (1)):  
\[n=w_{1,1}x_{1}+w_{1,2}x_{2}+w_{1,3}x_{3}+...+w_{1,N}x_{N}+b \tag{1}\]  
In matrix form, Equation (1) will become as described in Equation (2), where matrix \(\mathbf{X}\) stands for the input matrix:  
\[n=\mathbf{W^{*}X+b} \tag{2}\]  
Finally, the neuron output can be written as in Equation (3):  
\[y=f(\mathbf{W^{*}X+b}) \tag{3}\]  
where \(b\) represents the bias, and \(f\) is a transfer function (see Figure 2b,c) that is chosen depending on the application; this function will adjust the parameters \(w\) and \(b\), depending on the learning rules, all this to achieve a specific input/output relationship. An important characteristic that must be chosen when an ANN is designed is its transfer function (\(f\)). The selection is made from two possibilities: (a) _linear_ will not limit the output of the functions between any range, or (b) _nonlinear_ makes it easier for the model to adapt to data diversity, and it can differentiate among the outputs. The objective of the transfer function (also known as transformation, activation, or threshold function) is to  
Figure 2: (a) Single-layer network and transfer functions; (b) log-sigmoid, and (c) hyperbolic tangent. avoid outputs from reaching very large values that can stop ANN and inhibit training [23]. A variety of transfer functions exist, such as hard limit transfer, symmetrical hard limit, log-sigmoid, and hyperbolic tangent sigmoid. In this case, log-sigmoid transfer function \(f=\frac{1}{1+e^{-\theta}}\) is one of the most used on ANN applications, which takes the input (\(\pm 1\)) and adjusts the output into the range 0 to 1 (see Figure 2b), because it is a differentiable function and is commonly applied in multilayer networks trained with backpropagation [24]. Additionally, hyperbolic tangent sigmoid transfer function \(f=\frac{e^{\theta}-e^{-\theta}}{\theta^{2}+e^{-\theta}}\) is related to a bipolar sigmoid that has an output in the range of (\(\pm\)) (see Figure 2c). This function is a good trade-off, where speed is more important than the transfer function's exact shape. Two principal architectures can be distinguished for ANNs:  
* Feed forward network: Information travels in one direction between layers (input, hidden, and output) without affecting the past, present, or future layer. In other words, feedback between layers does not exist. * Recurrent network: This network at least has one loop or feedback, allowing for storing information about its past calculations. Their capability to model temporal sequences of input-output pairs has given them success in natural language processing (NLP) applications: machine translation, speech recognition, and language modeling. The ANNs can also be classified based on their learning/training types [18]:
* Supervised learning: On this training, each input is associated with an output, which will be the desired output (target). The training process is performed until the network \"learns\" to associate each input to its corresponding and desired output. * Unsupervised learning: In this case, only the input is supplied to the network; the network learns by itself, adapting some internal features of the input presented a priori. * Reinforcement learning: Here, a set of inputs is presented to the network; if the output provided by the network is \"ok\", then the connection weights are increased (reward); otherwise, the weights decrease (penalty). This learning type is also known as \"reward-penalty learning\". One of the most used ANN architectures is the Multi-Layer Perceptron (MLP), a feed-forward ANN; it can have any number of inputs and one or more hidden layers. It generally applies linear combination functions on its input layers and has some number of outputs with any activation function. Nowadays, ANNs are widely used in machine learning applications, such as autonomous navigations, where different types of inputs are provided, as images and distance measures.