**4. Directions for future research: Solving general optimization problems**

The proposed approach can be applied to general optimization problems and not just pathtracking. From an abstract point of view, any optimization problem can be mapped to a goal-tracking problem in which:


Hence, over the different iterations the ANN is expected to suggest a sequence of corrections that helps in approaching the required objective function value.

This approach to optimization is expected to be less prune to local minima trapping, provides better insight into the nature of the investigated problem and can easily deal with multi-objectives/ errors optimization. For example, in the robot path tracking problem, *ref rob ref rob , ρ,v v , ω ω* were error measures that, ideally are required to be all zeros. In this case, the robot perfectly tracks the desired path and remains tangent to it at all times. This property (being tangent at all times) is desirable, from a practical point of view, because even if the robot path is close to the desired path but with too many frequent changes of orientation, wear out will occur to the robot parts and it will be questionable whether the robot can, practically, makes these moves).

#### **4.1 Illustrative example: Minimizing the camel benchmark function**

The camel objective function is defined as follows

38 Recurrent Neural Networks and Soft Computing

Although the rule analysis method presented, helped in improving the results, it still needs improvement. In fact, rule analysis is a rather complex task. Understanding the logic behind the rules (why each rule recommends a particular consequent given a certain antecedent) is

1. Rules operate in parallel and collectively. Each rule recommends a certain consequent depending on the context of the neighbouring rules. Collectively, the overall decision

2. According to the training algorithm, rules recommend certain consequents in order to minimize the desired objective function which is a function of the robot

3. Rules are derived through batch (off-line) training. Therefore, the overall objective function is minimized over time and not at a particular instant (rules are derived based on a global point of view). Therefore, a rule may not sound reasonable to employ at a certain moment. This what makes it necessary to train an ANN over a certain family of curves. Different families of curves are expected to require different

4. Rule analysis is a trial and error process. Its complexity is proportional to the

The proposed approach can be applied to general optimization problems and not just pathtracking. From an abstract point of view, any optimization problem can be mapped to a

The input is the absolute difference between the objective function value at the current

The output is the correction, to the current solution, recommended by the ANN. This is

Hence, over the different iterations the ANN is expected to suggest a sequence of corrections

This approach to optimization is expected to be less prune to local minima trapping, provides better insight into the nature of the investigated problem and can easily deal with multi-objectives/ errors optimization. For example, in the robot path tracking

zeros. In this case, the robot perfectly tracks the desired path and remains tangent to it at all times. This property (being tangent at all times) is desirable, from a practical point of view, because even if the robot path is close to the desired path but with too many frequent changes of orientation, wear out will occur to the robot parts and it will be questionable

*, ρ,v v , ω ω* were error measures that, ideally are required to be all

**4. Directions for future research: Solving general optimization problems** 

The goal point is the desired performance or desired objective function value.

**3.7 Discussion** 

kinematics.

global rules.

goal-tracking problem in which:

problem, *ref rob ref rob*

not simple for the following reasons:

helps achieving the desired objective.

dimensionality (number of independent variables).

solution and the desired objective function value.

Time evolution corresponds to iterations.

fed-back as an input to the ANN at the next iteration.

that helps in approaching the required objective function value.

whether the robot can, practically, makes these moves).

Fig. 11. Camel function objective function.

The global minimum is *f xx = ;xx =* 1, 2 1.0316 1, 2 0.0898,0.7126 0.0898, 0.7126 *, .* Fig. 11 shows a plot of the camel objective function.

Fig. 12. Block diagram of the system used to find the global minimum of the camel objective Function.

A Framework for Bridging the Gap Between Symbolic and Non-Symbolic AI 41

Fig. 13. The results of using the proposed approach to find the global minimum of the camel objective function. The top figure shows the degree of firing of the different rules versus iteration number. The bottom figure depicts the objective function value versus iteration

number. The approach successfully converged to the global minimum.

To apply the proposed ANN-based approach to find the global minimum of this function, the closed loop system in Fig. 12 has been adopted. The inputs to the ANN are the values of 1 2 *x x* and at the previous iteration, the absolute difference between the desired value of the objective function at the current iteration and its current actual value. The outputs of the ANN are the recommended corrections to 1 2 *x x* and (increase or decrease). The ANN weights and biases were estimated numerically as before such that the ANN minimize the camel objective function. The desired value for the objective function at any iteration is chosen to be slightly less than its current value (For example, for decrratio=0.85, the desired objective function at a certain iteration =decrratio\* the actual objective function value corresponding to the current solution). This idea is borrowed from [13], where it has been recommended to be adopted with any optimization method. The ANN has been trained, as before, using a numerical BFGS algorithm, where the objective function to be minimized is defined as :

$$Obj = \rho\_F \tag{12}$$

where, *Fρ* is the absolute difference between the desired objective function value and its actual value at the last iteration. The rules extracted from the trained ANN are as follows:

$$\begin{aligned} \text{SLANCV} \quad \mathbf{x}\_1 &> 0.6755704, \quad \mathbf{x}\_2 > 1.5209156, \quad \rho > 0.0161157, \\ \text{decrease} \quad \mathbf{x}\_1 &\quad \text{by} \quad \mathbf{x}\_{\text{line}} = -0.0668506 \quad \text{decrease} \quad \mathbf{x}\_2 &\quad \text{by} \quad \mathbf{x}\_{\text{2inc}} = -0.0203858 \\ \text{SLANCV} \quad \mathbf{x}\_1 &> 1.4023561, \quad \mathbf{x}\_2 > 0.4688876, \quad \rho > 0.1058053, \\ \text{increase} \quad \mathbf{x}\_1 &\quad \text{by} \quad \mathbf{x}\_{\text{line}} = 0.0617143 \quad \text{decrease} \quad \mathbf{x}\_2 &\quad \text{by} \quad \mathbf{x}\_{\text{2inc}} = -0.0195689 \\ \text{SLANCV} \quad \mathbf{x}\_1 &> 0.6147782, \quad \mathbf{x}\_2 < 0.1270187, \quad \rho < 1.504679, \\ \text{increase} \quad \mathbf{x}\_1 &\quad \text{by} \quad \mathbf{x}\_{\text{1inc}} = 0.0301060 \quad \text{d} \text{cr} \text{case} \quad \mathbf{x}\_2 &\quad \text{by} \quad \mathbf{x}\_{\text{2inc}} = -0.0128413 \\ \text{SLANCV} \quad \mathbf{x}\_1 &> 0.0459426, \quad \mathbf{x}\_2 > 0.3802873, \quad \rho < 0.5840457, \\ \text{decrease} \quad \mathbf{x}\_1 &\quad \text{by} \quad \mathbf{x}\_{\text{1inc}} = -0.0279751 \quad \text{d} \text{cr}$$

Fig. 13 shows the results (the objective function value versus iteration number). Clearly, the ANN-based optimization technique found the global optimal (The initial solution was 1 2 *x= x=* 2.5, 2.5 ). When using the BFGS technique to minimize the camel objective function, with the same learning rate, the algorithm completely diverged. For a lower learning rate, direct BFGS reached the global optimal. However, ANN-based optimization offers greater promise for higher dimensions/ multi-objective/ error problems and provides insight into the solution through the analysis of the derived rules. A key reason for the robustness of the ANN-based optimization over direct optimization is that it explores the objective function and derives problem-dependent heuristics (as opposed to meta-heuristics).

An important direction for future investigation is the use of concepts borrowed from "robust optimization" to enhance the quality of the rules extracted from the ANN. Robust optimization concepts can be applied at two different levels:

 At the action level, we can include noise during ANN training. The error in pathtracking can be defined as a function of the difference between the average expected location and the desired location as well as the variance (or standard deviation of this error). This will make the ANN develop a decision strategy that is more prudent and is less likely to cause divergence from the desired path, in case of disturbance.

To apply the proposed ANN-based approach to find the global minimum of this function, the closed loop system in Fig. 12 has been adopted. The inputs to the ANN are the values of 1 2 *x x* and at the previous iteration, the absolute difference between the desired value of the objective function at the current iteration and its current actual value. The outputs of the ANN are the recommended corrections to 1 2 *x x* and (increase or decrease). The ANN weights and biases were estimated numerically as before such that the ANN minimize the camel objective function. The desired value for the objective function at any iteration is chosen to be slightly less than its current value (For example, for decrratio=0.85, the desired objective function at a certain iteration =decrratio\* the actual objective function value corresponding to the current solution). This idea is borrowed from [13], where it has been recommended to be adopted with any optimization method. The ANN has been trained, as before, using a numerical BFGS

where, *Fρ* is the absolute difference between the desired objective function value and its actual

1 1inc 2 2inc

0.6755704, 1.5209156, 0.0161157,

1.4023561, 0.4688876, 0.1058053,

0.6147782, 0.1270187, 1.504679,

0.0459426, 0.3802873, 0.5840457,

0.0668506 0.0203858

0.0617143 0.0195689

0.0301060 0.0128413

0.0279751 0.0338863

1 1inc 2 2inc

1 1inc 2 2inc

1 1inc 2 2inc

Fig. 13 shows the results (the objective function value versus iteration number). Clearly, the ANN-based optimization technique found the global optimal (The initial solution was 1 2 *x= x=* 2.5, 2.5 ). When using the BFGS technique to minimize the camel objective function, with the same learning rate, the algorithm completely diverged. For a lower learning rate, direct BFGS reached the global optimal. However, ANN-based optimization offers greater promise for higher dimensions/ multi-objective/ error problems and provides insight into the solution through the analysis of the derived rules. A key reason for the robustness of the ANN-based optimization over direct optimization is that it explores the objective function

An important direction for future investigation is the use of concepts borrowed from "robust optimization" to enhance the quality of the rules extracted from the ANN. Robust

 At the action level, we can include noise during ANN training. The error in pathtracking can be defined as a function of the difference between the average expected location and the desired location as well as the variance (or standard deviation of this error). This will make the ANN develop a decision strategy that is more prudent and is

less likely to cause divergence from the desired path, in case of disturbance.

value at the last iteration. The rules extracted from the trained ANN are as follows:

*SLANCV x > x > ρ > decrease x by x = decrease x by x = SLANCV x > x > ρ > increase x by x = decrease x by x =*

1 2

1 2

1 2

*LANCV x > x < ρ < increase x by x = decrease x by x = SLANCV x > x > ρ < decrease x by x = decrease x by x =*

1 2

and derives problem-dependent heuristics (as opposed to meta-heuristics).

optimization concepts can be applied at two different levels:

*Objg = <sup>F</sup>ρ* (12)

algorithm, where the objective function to be minimized is defined as :

*S*

Fig. 13. The results of using the proposed approach to find the global minimum of the camel objective function. The top figure shows the degree of firing of the different rules versus iteration number. The bottom figure depicts the objective function value versus iteration number. The approach successfully converged to the global minimum.

A Framework for Bridging the Gap Between Symbolic and Non-Symbolic AI 43

The fact that the antecedent of a rule depends on both the bias of the corresponding hidden neuron and the weights from inputs-to this hidden neuron makes it difficult the use of known inputs constraints in weights/biases initialization. Thus, we are forced to use small random weights and biases initially, train the ANN, extract the rules and then re-train in case some of the rules yield un-plausible antecedents. For our case study, 3 out of the 7 rules

1.1959689, 0.1675315, 0.8878251, 0.1353403,

6.6637447, 5.8271221

*ref rob ref rob*

. The overall system output is computed as a

*<sup>f</sup> = w <sup>f</sup>* , *Nh* is the number of rules

1

*Nh j k jk j=*

2.7918388, 0.2060677,

 

Fig. 14 illustrates a typical ANFIS architecture for the case of a 2 inputs 1, 2 *x x* single output, 2 rules example. *Aij* is the membership function of the ith input in the jth rule. The DOF of a rule is computed using the 'Product' operator, i.e. it is the product of the output of the membership functions of a certain rule (Layer 2). NORM units (Layer 3) divides the individual DOF of each rule by the sum of DOF of all rules to produce a normalized degree of firing *wj* . Layer 4 computes the consequent of each rule j for each output k, *jk f* as a

which equals 2 in Fig. 14). Similarly, to be able to compare our approach to ANFIS [8], we use the same block diagram given in Fig. 5 but replacing the typical feed-forward ANN with an ANFIS. The ANFIS formulation does not impose restrictions on membership function's choices. Therefore, sigmoid membership functions have been chosen, for the purpose of comparison with our approach. In this case, the membership function of the jth rule takes the

*Aij ij i ij = ax c* sig

Our approach can be viewed as a modified ANFIS system with the *'Product*' operator replaced by the 'ior' operator and with 0 *ijk p =* . As indicated by the results (Fig. 15), these modifications enhance the performance considerably. ANFIS training involves the estimation of the parameters , *ijk jk p r* for each rule contributing to the output as well as the membership functions parameters *ij ij a ,c* of each rule. The extracted rules after training are

*SLANCV v < w > v v> ω ω > ρ < α < decrease v by v = decrease ω by ω =*

*inc inc*

had un-plausible antecedents. For example, one of the rules stated:

Clearly comparing *ρ* to a negative threshold is not logical.

1

weighted sum of the different rules consequents (

*Ni jk ijk jk i f = p +r* 

function of the inputs

form:

as follows:

 At the weights/biases level, robust optimization can be used to develop robust rules. Rules are robust when they are reachable from different weight initializations (i.e. they are not sensitive to a particular initialization) and lead to acceptable performance when subject to small perturbations.
