**3.1 The robot kinematic model**

The kinematic model of the robot is described by the following equations:

$$\begin{aligned} \dot{X}\_R &= \upsilon \quad \cos \theta\\ \dot{Y}\_R &= \upsilon \quad \sin \theta\\ \dot{\theta} &= \alpha \end{aligned} \tag{6}$$

Where

$$\dot{X}\_{\mathbb{R}'} \dot{Y}\_{\mathbb{R}'} \theta \,\mathrm{or}$$

represent the horizontal, vertical components of the robot linear velocity *v*, its orientation angle and its angular velocity, respectively. Once a suitable control algorithm determines *v* and *ω* , it is straightforward to determine the corresponding *νr , νl* values by solving the following 2 simultaneous equations:

$$
\omega \upsilon = \frac{\upsilon\_r + \upsilon\_l}{2} \quad \omega = \frac{\upsilon\_r - \upsilon\_l}{l} \tag{7}
$$

where *l* is the distance between the right and left wheels to yield:

$$\mathbf{v}\_r = \frac{2\mathbf{v} + \alpha l}{2}, \mathbf{v}\_l = \frac{2\mathbf{v} - \alpha l}{2} \tag{8}$$

It is clear from (7) that an average positive (negative) velocity indicates forward (reverse) motion along the robot current axis orientation. Similarly, it is clear from (8), that a positive (negative) difference between *ν<sup>r</sup>* and *νl* indicates a rotate-left or counter-clockwise (rotateright or clockwise) action. In case both wheels speeds are equal in magnitude and opposite in sign, the robot rotates in-place.

#### **3.2 Open vs closed loop solutions of the path tracking problem**

Consider a path with known parametric representation *xt, yt* . In this case, the robot reference linear and angular velocities (denoted *ref* and *ref v ω* ) can be calculated based on the known desired performance. For the robot to follow the desired path closely, its velocity should be tangent to the path. Thus the reference velocities can be computed using:

In this example, an ANN is adapted to assist a differential-wheel robot in tracking an arbitrary path. Fig. 2 illustrates the geometry of the problem. The robot kinematic model, the need for a closed loop solution, the choice of a suitable representation for the ANN's inputs and outputs as well as the initialization, training and interpretation of the weights of

> cos sin

(6)

(7)

*v = ,v =* (8)

*X =v θ Y =v θ*

*X ,Y , R R <sup>θ</sup>,<sup>ω</sup>*

represent the horizontal, vertical components of the robot linear velocity *v*, its orientation angle and its angular velocity, respectively. Once a suitable control algorithm determines *v* and *ω* , it is straightforward to determine the corresponding *νr , νl* values by solving

> 2v 2v 2 2 *r l*

It is clear from (7) that an average positive (negative) velocity indicates forward (reverse) motion along the robot current axis orientation. Similarly, it is clear from (8), that a positive (negative) difference between *ν<sup>r</sup>* and *νl* indicates a rotate-left or counter-clockwise (rotateright or clockwise) action. In case both wheels speeds are equal in magnitude and opposite

Consider a path with known parametric representation *xt, yt* . In this case, the robot reference linear and angular velocities (denoted *ref* and *ref v ω* ) can be calculated based on the known desired performance. For the robot to follow the desired path closely, its velocity should be tangent to the path. Thus the reference velocities can be computed

*<sup>ω</sup> <sup>=</sup> <sup>l</sup>*

*+ ωl ωl*

The kinematic model of the robot is described by the following equations:

*R R*

 

*θ = ω*

2 *r l v +v v = r l v v*

where *l* is the distance between the right and left wheels to yield:

**3.2 Open vs closed loop solutions of the path tracking problem** 

**3. Case study: Robot path tracking** 

the obtained ANN, are discussed below.

the following 2 simultaneous equations:

in sign, the robot rotates in-place.

**3.1 The robot kinematic model** 

Where

using:

$$\begin{aligned} \upsilon\_{ref} &= \sqrt{\dot{x}\left(t\right)^2 + \dot{y}\left(t\right)^2} \\ \upsilon\_{ref} &= \frac{d}{dt} \sin^{-1}\left(\frac{\dot{y}\left(t\right)}{\upsilon\_{ref}}\right) \end{aligned} \tag{9}$$

Applying the control inputs ( and *ref ref v ω* ) (or equivalently (*vr* and *vl*)) to the robot would enable it; in the absence of noise and other types of inaccuracies; to follow the required path. This open loop design will be called the *"direct forcing case".* 

However, to assist the ANN in learning the concept of a path (not an instance of a path) as well as making it robust against disturbances, we need to find a closed-loop control law. This is not straightforward because the kinematics model is nonlinear. In what follows, our objective is to show how the proposed ANN-based framework can provide reliable closedloop control; of the form shown in Fig. (3); compared to the direct forcing case. In Fig. (3), the role of the Robot kinematics simulator is to predict the robot location at the current time step given its current control inputs.

For the purpose of illustration, we will restrict our case study to the following family of paths:

$$x(t) = bt; 0 \le b \le 1 \quad \text{and} \quad y(t) = ct^3; -1 \le c \le 1$$

where *'t'* is the time vector= [0 (start time):0.05(time step):1 (final time)].

The ANN is trained on randomly chosen 11 members of this family and tested on different 11 members of the same family. To demonstrate the robustness of the proposed approach an additive disturbance (of uniform distribution) is added to both *v* and *ω* . The value of the disturbance can reach up to 200% of *v* value and 100% of *ω* value.

#### **3.3 Choice of the ANN's inputs and outputs**

Several possible input-output choices exist. The first has been reported in [11]. The time is the input and the speeds are the output. An alternative choice is to consider the coordinates (x, y) of each point on the path; as inputs; and the corresponding actions (speeds); as output. The third choice is to input the path as a whole as a single input vector and the corresponding sequence of actions (speeds) as a single output vector. All these choices share two fundamental disadvantages. First, it is impossible to interpret the trained weights as fuzzy rules. Furthermore, the ANN does not learn the "concept" of path tracking in general. Instead, it learns to track a single path only. In addition, the first and second choices do not explicitly capture the relation between consecutive path points. To overcome these limitations, we investigated different combinations of ANN inputs and outputs.

Only the two input-output combinations, that produced the best results, are discussed:

i. Case "A":

The inputs to the ANN are chosen to be:

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

Knowledge of the range of each input and output variables helps in the proper initialization of both the weights and biases. Recall that *Ni* is the number of inputs, *No* is the number of outputs, *Nh* is the number of hidden neurons (which corresponds to the number of rules used by the ANN in decision making). Biases are stored in a matrix *Bc* of dimensions *Ni* x *Nh* : Thus, each column of *Bc* corresponds to a certain rule. Each entry (row number, column number), in *Bc,* contains the threshold to which the corresponding input is compared in a particular rule (corresponding to that column). The weights connecting the inputs to the hidden neurons are stored in a matrix *Whc* of dimensions *Ni* x *Nh* . As before, each column corresponds to a certain rule. This time, however, the sign of the number in each entry (row number , column number), in *Whc,* controls the comparison operator with the corresponding threshold stored in *Bc* (negative corresponds to "less than", while positive corresponds to "greater than"). Thus, each column from *Bc* together with the corresponding column from *Whc* determine the antecedent of a 'SLANCV' rule. The weights connecting the hidden neurons to the output neurons are stored in a matrix *Woc* of dimensions *Nh* x *No* . The numbers in each row of *Woc* indicate the outputs (consequents) suggested by a certain rule. Such an interpretation of the weights/bias matrices as rules antecedents/ consequents helps in selecting suitable initial values for the ANN's parameters as well as understanding its decisions after training. For example, at initialization, the values in each row of *Bc* should be constrained to lie within the range of possible values for this input. For instance, if the third

Fig. 4. Block diagram of the system in case study case A

**3.4 Initialization and knowledge incorporation phase** 

Fig. 3. A typical closed loop Block diagram for the flow of information in the Robot Path Tracking Problem


Refering to Fig. (2), is calculated using the following equations:

$$\beta = \tan^{-1}\left(\frac{Y\_G - Y\_R}{X\_G - X\_R}\right), \alpha = -\theta + \beta$$

 the deviations between the actual and reference robot linear and angular velocities (*vref* – *vrob*) and ( *ω ω ref rob* )

The outputs are the corrections (increase/ decrease) ( *inc inc v ,ω* ) needed for (*v*, *ω* ) to keep following the required path. Fig. 4 shows the block diagram of this system.

$$
\begin{array}{ccc}
\text{iii} & \text{Case } \text{''B''} \\
\end{array}
$$

The inputs and outputs are as in case A, with the following two additional inputs:

the previous control inputs (*v*, *ω* ).

Fig. 5 shows the block diagram of this system.

Fig. 3. A typical closed loop Block diagram for the flow of information in the Robot Path

is calculated using the following equations:

*G R*

the deviations between the actual and reference robot linear and angular velocities

The outputs are the corrections (increase/ decrease) ( *inc inc v ,ω* ) needed for (*v*, *ω* ) to keep

<sup>1</sup> tan *G R*

*Y Y <sup>β</sup> <sup>=</sup> X X*

following the required path. Fig. 4 shows the block diagram of this system.

The inputs and outputs are as in case A, with the following two additional inputs:

*G R GR ρ = X X +Y Y*

' that the robot needs to rotate to orient itself in the direction of the goal.

,*= θ + β*

the distance ' *<sup>ρ</sup>* ' to the goal point, 2 2

Tracking Problem

the angle '

ii. Case "B"

Refering to Fig. (2),

(*vref* – *vrob*) and ( *ω ω ref rob* )

the previous control inputs (*v*, *ω* ).

Fig. 5 shows the block diagram of this system.

Fig. 4. Block diagram of the system in case study case A

#### **3.4 Initialization and knowledge incorporation phase**

Knowledge of the range of each input and output variables helps in the proper initialization of both the weights and biases. Recall that *Ni* is the number of inputs, *No* is the number of outputs, *Nh* is the number of hidden neurons (which corresponds to the number of rules used by the ANN in decision making). Biases are stored in a matrix *Bc* of dimensions *Ni* x *Nh* : Thus, each column of *Bc* corresponds to a certain rule. Each entry (row number, column number), in *Bc,* contains the threshold to which the corresponding input is compared in a particular rule (corresponding to that column). The weights connecting the inputs to the hidden neurons are stored in a matrix *Whc* of dimensions *Ni* x *Nh* . As before, each column corresponds to a certain rule. This time, however, the sign of the number in each entry (row number , column number), in *Whc,* controls the comparison operator with the corresponding threshold stored in *Bc* (negative corresponds to "less than", while positive corresponds to "greater than"). Thus, each column from *Bc* together with the corresponding column from *Whc* determine the antecedent of a 'SLANCV' rule. The weights connecting the hidden neurons to the output neurons are stored in a matrix *Woc* of dimensions *Nh* x *No* . The numbers in each row of *Woc* indicate the outputs (consequents) suggested by a certain rule. Such an interpretation of the weights/bias matrices as rules antecedents/ consequents helps in selecting suitable initial values for the ANN's parameters as well as understanding its decisions after training. For example, at initialization, the values in each row of *Bc* should be constrained to lie within the range of possible values for this input. For instance, if the third

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

*Objg Objg(Par + <sup>ε</sup>) Objg(Par <sup>ε</sup>) <sup>=</sup> Par* 

where *<sup>ε</sup>* is a very small number, typically <sup>11</sup> *<sup>ε</sup> <sup>=</sup>* <sup>10</sup> . *Pari* is the ith element of the vector *Par*

For case 'A', the number of adjustable parameters is 2\* (4 (inputs) \* 4 (hidden neurons/ rules)) + 4 (hidden neurons)\* 2 (outputs), which equals 40 parameters. For case B, the number of adjustable parameters is 2\* (6 (inputs) \* 7 (hidden neurons/ rules)) + 7 (hidden neurons)\* 2 (outputs), which equals 98 parameters . Figs. (6 and 7) show the results for cases

It is clear that case 'B' is more robust to disturbance. However, both cases clearly outperform

The fact that case 'B' produced better results is to be expected. Certainly, feedback provides memory to the system and helps in accumulating knowledge, which is an essential aspect of learning. We tried two types of feedback; direct feedback in which the ANN learns the link between its own outputs ( *inc inc v ,ω* ) and the errors in performance and indirect feedback in which the ANN learns the link between a certain action (*v*, *ω* ) and the errors in performance. The second memory type produced better results. Appendix A compares these results obtained

using our approach with those obtained using conventional ANN [1,6,7] and ANFIS [8].

Fig. 6. Results for case A. It is clear that closed loop ANN-based control is more robust to

disturbances than open-loop direct forcing

*i i*

(11)

2<sup>ε</sup>

'A' and 'B', respectively.

the open loop (direct forcing) case.

*i*

input is *ρ* , then the entries in the third row of *Bc* should all be positive. Similarly, if the first output is the velocity correction *inc v* then the first column of *Woc* can take both negative /positive small values to allow the ANN to increase or decrease the robot speed while avoiding instability.

Fig. 5. Block diagram of the system in case study case B

#### **3.5 Training phase**

To train the ANN, the following objective function is minimized:

$$
abla \mathbf{j} \mathbf{g} = \frac{1}{N\_p} \sum\_{p=1}^{N\_p} \sum\_{i=1}^{K\_i} \rho\_i^p \tag{10}$$

where ' *<sup>p</sup> <sup>i</sup> ρ* ' is the distance between the desired location on the pth path and the corresponding robot's actual location at the ith time instant, *Ki* is the number of points along the path to be tracked and *Np* is the number of paths used in training. Since the objective function is not a closed form function (in the ANN weights and biases) and can only be computed through a simulator, a numerical optimization algorithm is used [10], [11], where gradients are computed using a numerical version of the Broyden–Fletcher– Goldfarb–Shanno (*BFGS*) optimization algorithm. The gradients are calculated numerically using the following formula:

input is *ρ* , then the entries in the third row of *Bc* should all be positive. Similarly, if the first output is the velocity correction *inc v* then the first column of *Woc* can take both negative /positive small values to allow the ANN to increase or decrease the robot speed while

avoiding instability.

**3.5 Training phase** 

using the following formula:

where ' *<sup>p</sup>*

Fig. 5. Block diagram of the system in case study case B

To train the ANN, the following objective function is minimized:

1 1

*<sup>i</sup> ρ* ' is the distance between the desired location on the pth path and the

*p p= i=*

corresponding robot's actual location at the ith time instant, *Ki* is the number of points along the path to be tracked and *Np* is the number of paths used in training. Since the objective function is not a closed form function (in the ANN weights and biases) and can only be computed through a simulator, a numerical optimization algorithm is used [10], [11], where gradients are computed using a numerical version of the Broyden–Fletcher– Goldfarb–Shanno (*BFGS*) optimization algorithm. The gradients are calculated numerically

*p i*

*objg = <sup>ρ</sup> <sup>N</sup>* (10)

1 *Np Ki*

$$\frac{\partial Objg}{\partial Par\_i} = \frac{Objg(Par\_i + \varepsilon) - Objg(Par\_i - \varepsilon)}{2\varepsilon} \tag{11}$$

where *<sup>ε</sup>* is a very small number, typically <sup>11</sup> *<sup>ε</sup> <sup>=</sup>* <sup>10</sup> . *Pari* is the ith element of the vector *Par*

For case 'A', the number of adjustable parameters is 2\* (4 (inputs) \* 4 (hidden neurons/ rules)) + 4 (hidden neurons)\* 2 (outputs), which equals 40 parameters. For case B, the number of adjustable parameters is 2\* (6 (inputs) \* 7 (hidden neurons/ rules)) + 7 (hidden neurons)\* 2 (outputs), which equals 98 parameters . Figs. (6 and 7) show the results for cases 'A' and 'B', respectively.

It is clear that case 'B' is more robust to disturbance. However, both cases clearly outperform the open loop (direct forcing) case.

The fact that case 'B' produced better results is to be expected. Certainly, feedback provides memory to the system and helps in accumulating knowledge, which is an essential aspect of learning. We tried two types of feedback; direct feedback in which the ANN learns the link between its own outputs ( *inc inc v ,ω* ) and the errors in performance and indirect feedback in which the ANN learns the link between a certain action (*v*, *ω* ) and the errors in performance. The second memory type produced better results. Appendix A compares these results obtained using our approach with those obtained using conventional ANN [1,6,7] and ANFIS [8].

Fig. 6. Results for case A. It is clear that closed loop ANN-based control is more robust to disturbances than open-loop direct forcing

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

Fig. 8. An illustration of the rules extraction from weights and biases matrices.

*SLANCV v v > ω ω > ρ > α < then increase v by v = increase ω by ω = SLANCV v v < ω ω > ρ > α >*

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

*ref rob*

*then increase v by v = decrease ω by ω =*

*SLANCV v > ω < v v> ω ω >*

1.258573, 0.817993, 0.4339714,

*decrease v by v = increase ω by ω = SLANCV v < ω > v v< ω ω <*

*SLANCV v > ω > v v< ω*

*increase v by v = increase ω by ω =*

*ref rob ref rob*

*ref rob ref rob*

*ref rob ref rob*

Similarly, the rule-base for case 'B' is summarized as follows:

0.6266

*then d*

*SLANCV v v <*

*decr*

*ref rob*

0.3354632, 0.0125876, 0.6606180, 0.0061404

0.2589412, 0.8426717, 0.5563425, 0.2103250

*ω ω < ρ > α >*

0.6156011 0.8038080

0.6117282, 0.4437878

0.4927100, 0.0680181

0.2173556, 0.35925

29

0.3642978 0.8061992

*ref rob ref rob*

*ref rob ref rob*

*ref rob ref rob*

*ref rob r*

 040, 0.9027552, 0.6558773, 0.1211869

*inc inc*

*inc inc*

*inc inc*

*inc inc*

1.1800783, 0.5797996, 0.3283071, 0.1895662,

0.2235206, 0.7800814, 0.7777185, 0.7120344,

1.4049258, 0.3766352, 0.0756778, 0.7105109,

0.9930632, 0.8202830, 0.1180958, 0.6506539,

 

*ecrease v by v = increase ω by ω =*

1.2352848, 0.3088343

1.246724, 0.2514984

*ρ > α > then*

1.5151515, 0.0003327

*ease v by v = decrease ω by ω = SLANCV v > ω < v v< ω ω <*

*decrease v by v = decrease ω by ω =*

*SLANCV v < ω > v v> ω ω <*

*increase v by v = decrease ω by ω =*

0.1169906, 0.2358675

0.1156700, 0.2116636

*ρ > α < then*

*ρ < α < then*

*ρ > α < then*

*inc inc*

*inc inc*

*inc inc*

*ρ > α > then*

*inc inc*

*inc inc*

0.9311723, 0.8552953 0.485575, 0.6095190, 0.7308372, 0.3436044

0.1034854 0.3097751

0.4279759, 0.7131302

0.5549105, 0.5208952

*ref rob ref rob*

0.0552364,

*ef rob*

*ω >*

Fig. 7. Results for case B. It is clear that closed loop ANN-based control is more robust to disturbances than open-loop direct forcing. It is evident that adding to the ANN inputs the control actions at the previous step improved the results compared to those of case A.

#### **3.6 Rule extraction, analysis and post-processing**

Following the guidelines given in section 3.4, rule extraction from the trained weights and biases becomes straightforward.

Fig. (8) illustrates how the rules, for case 'A', have been extracted. The discovered rule-base is summarized as follows :

Fig. 7. Results for case B. It is clear that closed loop ANN-based control is more robust to disturbances than open-loop direct forcing. It is evident that adding to the ANN inputs the control actions at the previous step improved the results compared to those of case A.

Following the guidelines given in section 3.4, rule extraction from the trained weights and

Fig. (8) illustrates how the rules, for case 'A', have been extracted. The discovered rule-base

**3.6 Rule extraction, analysis and post-processing** 

biases becomes straightforward.

is summarized as follows :

Fig. 8. An illustration of the rules extraction from weights and biases matrices.

0.3354632, 0.0125876, 0.6606180, 0.0061404 0.9311723, 0.8552953 0.485575, 0.6095190, 0.7308372, 0.3436044 *ref rob ref rob inc inc ref rob ref rob SLANCV v v > ω ω > ρ > α < then increase v by v = increase ω by ω = SLANCV v v < ω ω > ρ > α > then d* 0.1034854 0.3097751 0.2589412, 0.8426717, 0.5563425, 0.2103250 0.4279759, 0.7131302 0.6266 *inc inc ref rob ref rob inc inc ref rob ecrease v by v = increase ω by ω = SLANCV v v > ω ω < ρ > α < then decrease v by v = decrease ω by ω = SLANCV v v <* 040, 0.9027552, 0.6558773, 0.1211869 0.5549105, 0.5208952 *ref rob inc inc ω ω < ρ > α > then increase v by v = decrease ω by ω =* Similarly, the rule-base for case 'B' is summarized as follows: 1.1800783, 0.5797996, 0.3283071, 0.1895662, 1.2352848, 0.3088343 0.6156011 0.8038080 1.258573, 0.817993, 0.4339714, *ref rob ref rob inc inc ref rob r SLANCV v > ω < v v> ω ω > ρ > α > then increase v by v = increase ω by ω = SLANCV v > ω > v v< ω* 0.0552364, 1.246724, 0.2514984 0.6117282, 0.4437878 0.2235206, 0.7800814, 0.7777185, 0.7120344, 1.5151515, 0.0003327 *ef rob inc inc ref rob ref rob ω > ρ > α > then decrease v by v = increase ω by ω = SLANCV v < ω > v v< ω ω < ρ > α < then decr* 0.4927100, 0.0680181 1.4049258, 0.3766352, 0.0756778, 0.7105109, 0.1169906, 0.2358675 0.2173556, 0.35925 *inc inc ref rob ref rob inc inc ease v by v = decrease ω by ω = SLANCV v > ω < v v< ω ω < ρ < α < then decrease v by v = decrease ω by ω =* 29 0.9930632, 0.8202830, 0.1180958, 0.6506539, 0.1156700, 0.2116636 0.3642978 0.8061992 *ref rob ref rob inc inc SLANCV v < ω > v v> ω ω < ρ > α < then increase v by v = decrease ω by ω =* 

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

Fig. 10. Results of case B after retraining with only the parameters corresponding to rules 5 degree of firing and its "then" part allowed to vary in addition to adding a new rule 8 with the same SLANCV part as rule 5 to co-fire with it and to provide corrective action. It is clear

that this retraining improved the results.

$$\begin{aligned} \text{SLANCV} \quad v & \approx 0.7807096, \quad \rhd 0.4849204, \quad v\_{n\text{f}} - v\_{nb} > 0.4796375, \quad \alpha\_{n\text{f}} - \alpha\_{rb} > 0.5922044, \\ \rho &\approx 1.2921157, \quad a \gg 0.2758564 \quad \text{then} \\ \text{increase} \quad v & by \quad v\_{\text{inc}} = 0.3424317, \quad \text{increase} \quad a \quad by \quad a\_{\text{inc}} = 0.8207999 \\ \text{SLANCV} \quad v \ll 0.5131913, \quad a \rhd - 0.2240559, \quad v\_{n\text{f}} - v\_{rb} < -0.4493099, \quad \alpha\_{n\text{f}} - \alpha\_{rb} > 0.7691425, \\ \rho &\approx 1.0904348, \quad a \gg 0.2174491 \quad \text{then} \\ \text{dcrcase} \quad v \quad by \quad v\_{\text{inc}} = -0.5255254, \quad \text{increase} \quad \alpha \quad by \quad \alpha\_{\text{inc}} = 0.8943484 \end{aligned}$$

In order to improve system performance and remove any inconsistencies, the rules above must be analysed. The following rule analysis procedure is limited to case 'B'. This procedure is assisted by a plot of the DOF (Degree-Of-Firing) of each rule (output of sigmoid) versus time. Such plots help in visualizing which rules the ANN is applying at each time instant and judging the decision/ performance made at this particular time. In particular, it is highly useful to identify dominant rules (rules having relatively high outputs) at the time a wrong decision is made. Correction is then possible by retraining the ANN keeping all rules fixed except the faulty dominant one. For example, as shown in Fig. 9, at the time the deviation from the desired path becomes maximum, rule 5 is dominant followed by rule 4. Accordingly, three different strategies, have been attempted, to retrain the ANN, to improve its performance. In all three strategies, all rules have been kept fixed except:


Fig. 9. Preliminary results of case B before post-rule analysis processing. The dashed curves represent the degree of firing of each rule with time. It is clear that rule 5 is the dominant rule at the time the deviation from the desired path became maximum.

1.2921157, 0.2758564

1.0904348, 0.2174491

*ρ < α > then*

In order to improve system performance and remove any inconsistencies, the rules above must be analysed. The following rule analysis procedure is limited to case 'B'. This procedure is assisted by a plot of the DOF (Degree-Of-Firing) of each rule (output of sigmoid) versus time. Such plots help in visualizing which rules the ANN is applying at each time instant and judging the decision/ performance made at this particular time. In particular, it is highly useful to identify dominant rules (rules having relatively high outputs) at the time a wrong decision is made. Correction is then possible by retraining the ANN keeping all rules fixed except the faulty dominant one. For example, as shown in Fig. 9, at the time the deviation from the desired path becomes maximum, rule 5 is dominant followed by rule 4. Accordingly, three different strategies, have been attempted, to retrain the ANN, to improve its



Fig. 9. Preliminary results of case B before post-rule analysis processing. The dashed curves represent the degree of firing of each rule with time. It is clear that rule 5 is the dominant

rule at the time the deviation from the desired path became maximum.

*ρ > α > then*

0.5131913, 0.2240559, 0.4493099,

*decrease v by v = increase ω by ω =*

*SLANCV v < ω > v v< ω*

performance. In all three strategies, all rules have been kept fixed except:

*Wh*c ), and their then part (4th and 5th row of *Woc*),

*increase v by v = increase ω by ω =*

*SLANCV v < > v v> ω ω >*

0.7807096, 0.4849204, 0.4796375, 0.5922044,

*inc inc ref rob*

*inc inc*

0.3424317, 0.8207999

0.5255254, 0.8943484

*ref rob ref rob*

0.7691425,

*ref rob*

*ω >*

Fig. 10. Results of case B after retraining with only the parameters corresponding to rules 5 degree of firing and its "then" part allowed to vary in addition to adding a new rule 8 with the same SLANCV part as rule 5 to co-fire with it and to provide corrective action. It is clear that this retraining improved the results.

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

2 2 1 2 2 1, 2 <sup>1</sup> 1 12 22 1 <sup>2</sup> 4 2.1 4 4 3 3, 2 2. <sup>3</sup> *Sixh <sup>x</sup> f x x = ·x + ·x + x ·x + + ·x ·x ; x x*

The global minimum is *f xx = ;xx =* 1, 2 1.0316 1, 2 0.0898,0.7126 0.0898, 0.7126 *, .*

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

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

<sup>4</sup>

The camel objective function is defined as follows

Fig. 11. Camel function objective function.

Function.

Fig. 11 shows a plot of the camel objective function.
