Neural nets, fuzzy and crisp, in the design of an artificial ... - IEEE Xplore

4 downloads 0 Views 337KB Size Report
buckley @math.uab.edu. Thomas Feuring. University of Siegen. Department of Electrical Engineering and Computer Science. Holderlinstr. 3,57068 Siegen ...
Neural Nets, Fuzzy and Crisp, in the Design of an Artificial Agent James J. Buckley University of Alabama at Birmingham Department of Mathematics Birmingham, Alabama, 35294, USA buckley @math.uab.edu Thomas Feuring University of Siegen Department of Electrical Engineering and Computer Science Holderlinstr. 3,57068 Siegen, Germany [email protected]

Yoichi Hayashi Meiji University Department of Computer Science 1-1-1 Higashimita, Tama-ku, Kawasaki, 214-8571, Japan hayashiy‘3cs.meiji.ac.jp ber=. = (ul/az,a3/u4) with u2 = a3 w e s a y z i s a triangular shaped fuzzy number. An a c u t of fuzzy number puts, and pmducing verbal, and non-verbal outputs,as suggestions(comA, which we write as ?I[a],is {zl?I(z) 2 a} for 0 < a 5 1. mands) to the user. The “ears“ of the system is a trained fuzzy neural net, A[O], of 2,is the closure of the union of all the t h e ~ r a i n ” a f u z z y e ~ a n d i ~ ~ o u t h ~ i s a t r a i n~ n ~the n esupport ~ A[a],0 < a 5 1. KeywonLr--fuzzy neural net, fuzzy expert system,neural net The paper extends our previous publications ([l], [2]). The differences from these chapters is that now we have a fuzzy I. INTRODUCTION neural net for input translator and now the rule structure (see A diagram of an artificial agent (AA) is shown in Figure 1. Section 3) is different within the fuzzy expert system. We The rest of this paper discusses, in detail, all the parts of this also allow interactions between the verbal suggestions from figure. The last section contains our summary, conclusions the fuzzy expert system producing final output to the user. Absnucr-This paper discussesthe design featuresof an artificialagent whicb is to interact with the user(s) accepting verbal, and non-verbal in-

and suggestions for further research. 11. INPUTTRANSLATOR We now introduce the notation to be used. We place a “bar” over letter -a- to denote a fuzzy subset of the real numbers. The input translator acts as the ears of the system translatSo A, B, C, all represent fuzzy subsets of R. A trapezoidal ing the input signals into trapezoidal shaped fuzzy numbers for fuzzy number T is defined by four numbers a1 < az 5 input into the fuzzy expert system. First we must discuss the a3 < a4 where the membership function is a trapezoid with structureof these signals. base on [ul,a41 with membership value one on [uz,u3I1_We get a triangular fuzzy numier if u2 = u3. We write T = A. Input Signuls (ur/az, u3/u4). For any A its membership function evaluThe input signals may be numeric, or non-numeric. The folated at z E R is written a(z).A trapezoidal shaped fuzzy lowing examples describe the different input signals and exnumber is partially specified by four -numbers a1 < az 5 ample 1is continued into the next section. a3 < a4 where: (1) the graph of 9 = M ( z )is continuous and monotonically increasing form (ul,0) to (my 1)on [ul,az]; (2)z ( z ) = 1on [az,4;( 3 )the graph of y = M ( z ) is con- Example 1. The system acts as an artificial agent to a pilot tinuous and monotonically decreasing from (u3,l) to (a4y 0) landing an airplane. There are four numeric variables U = alon [us,ad]; and (4) = 0 for z < a1 and z > u4. We titude, ca = change in altitude, s = speed and cs change in (ul/a, u3/u4) for trapezoidal shaped fuzzy num- speed. Values for these four variables could be fed directly to write

z

=

v(z)

0-7803-5529-6/99/$10.00 01999 IEEE

2414

Verbal, Numeric

Verbal, Numeric

output Translator

Input Translator

Neural Net

Fuzzy Neural Net

A

I

7 Discrete

Fuzzy

Fuzzy Set

System

Number

Fig. 1. Artificial Agent.

the fuzzy expert system, as in fuzzy control, but instead will be input to a fuzzy neural net. These numeric variables are not precise real numbers (all infinite decimal places) but may be thought of as trapezoidal (shaped) fuzzy numbers. Suppose a value for a is given as 3,500 Ft because these values are only measured in intervals of 100Ft. So, a really belongs to the interval [3450.n, 3550.q. Next, because of errors in measurement "a" can be represented as the trapezoidal fuzzy number (3350/3450,3550/3650). So, we would consider inputting this fuzzy number, for altitude, into the fuzzy expert system. However, inputting a into the fuzzy neural net (discussed in the next subsection) performs a similartransformationproducing a trapezoidal shaped fuzzy number for input to the fuzzy expert system.

Our FNNs will be layered, feedforward, neural nets where the weights and bias terms are all trapezoidal fuzzy numbers. The input is a real number and the output a trapezoidal shaped fuzzy number. In a 1-K- 1FNNthe input is real z,the weights fiom input to the j-th neuron in the second layer are Wlj, and the weights from the j-th unit in the second layer to the output neuron are Ujl . Each neuron in the second layer (and maybe also in the outputneuron) has transferfunction f(z)= (l+e-l)-'. The bias term for ?e j-th neuron in the second layer is Woj and To is the bias ter n (could be zero)for the output unit. The output 0 is computed as

-

-

B. Fuzzy Neural Net

(1)

j=1

Example 2. Non-numeric data. Omitted from the proceedings.

K

o = C D j l f ( W 1 j X +Woj) ,

if the output neuron has no f nor bias term. Equation (1) is evaluated using a-cuts and interval arithmetic [6]. We will require separate WNs for each variable.

We first describethe structureof our fuzzy neural net (FNN) and then returnto Example 1 to show how it produces input to Example 1 (cont'd.) We Q ;;na separate FNN for a,cu,s and the fuzzy expert system. cs. Let us only consider the one for a = altitude in detail. The

2415

= to minimum of a is a1 (that of the airport) and maxa = U,,,. everythrng is OK Q14 = drop down slightly; and The interval - [at, - a,,]$ divided up into n1 trapezoidal fuzzy high, drop down quickly. is defined separately for change numbers AI, A2, ...,A,, . The training set for the FNN is in altitude. Let llmbe the verNext we need the meaning of the { ~ ~ l , ~ 1 ~ , ~ ~ 2 , ~ 2 ~ , . . . , ~ a n l , ~(2) , , )bal } translation of 5 m 5 M. 11m is the suggestion resulting from 71and CA. For example 113 could be "keep deWe have successfully used an evolutionary algorithm before in scending at the same rate". solving fuzzy problems ([31, [4]), so we assume this can also The block of rules for 9 and is be used to train a fuzzyneural net. Let us abbreviate equation (1) as F " ( z) = D. So, the FNN has been trained so that Rz, : If = &] and = Q4k], then VS2 = , (5) F " ( a i ) = Ai, 1 5 i I nl. Given a, a value for altitude, m ( a ) = Z is the input to the fuzzy expert system for vari- 1 5 s I N2. Now VS2 is the suggestion for speed and the able altitude. The FNN performs non-linear interpolation be- Q31,Q4kare defined, and interpreted, as for altitude. VS2 is tween & and &.We do not believe people reason in terms of the discrete fuzzy set precise numerical values. Given real number a, humans reason in terms of regions, or intervals, for altitude. Therefore, we transform a to X so that fuzzyreasoning will be performed on A. This produces a robust reasoning method. -So we have one trained m N 1 for a, another FMv2 for The FES finds the p in VS2 given input S,CS. VS2 is also a,. ..,and E " 4 for a. sent to the output translator. Let 12p be the verbal suggestion corresponding to 12p results from inputs on speed. 124 111. Fuzzy EXPERT SYSTEM could be "increase speed slightly". Now we are able to describe the internal computations of the We keep the four variables a = altitude, cu = change in altitude, s = speed and cs = change in speed. There is a FES in determining the a's and p's in VS1 and VS2, respecseparate FNN for each variable so let F " 1 be for altitude, tively. Initially all a's and p's are set to zero. We only describe .., and FNN4 for change in speed. The output from each the evaluation of a RI, since it is the same for 7&, . Fmvi will be a trapezoidal shaped fuzzy number so we set To evaluate a RI, we first need to compute the value of the be some comparisons p = Qli] and [CA = Q2J. Let ''W -= FMvl(a), CA = FNN~(cu), -S = m N 3 ( ~ and A ) CS = F " 4 (a)These . are then inputted to the fuzzy expert measure of equality between fuzzy numbers, then the value of [A = Qli] is system (EES). The FES processes, through blocks of fuzzy rules, the fuzzy xi = Q(z,Qli) * (7) numbers Z, 3 and ?%to produce discrete fuzzy sets. There will be one block of rules for 2 and and a separate One could use the height of the intersectionbetween and g1 This is a major change from the which is block of rules for 3 and (8) xi = SUP ( ~ ( & 4 , Q l i < ~ , >,) FES in ([l], [2]). The reason for this change will be explained at the end of this section. The block of rules for and is for -'IQ". So, we assume that Xi = Q ( 2 , a l i ) and @(CA, QZj) = X j have all been computed. Define 1218 : If = &] and = Gzj],then VS1 = V m , (3) ^Is = xi) , (9) 1 5 s 5 NI. In this rule VS1 = verbal suggestion (comare specially designed for all rules, for some t-norm .'2 The value of the antecedent mand) for altitude and the Gli and for each variable. VS1 is a discrete fuzzy set of rule 121, is now 7s.To obtain the ai in VSr we need to aggregate the over all rules. vs1 = Let rm -be all s in {1,2,. ..,NI} whose consequence has (4) ' VS1 = Um,form = 1,...,M. Thememoryupdatealgorithm now computes the a's as follows where ai is the membership value of the fuzzy set in VS1. Givenx and the FESis to construct VS1. VS1 willbe sent (10) a m = C { Y ~E~r S m) > to the output translator. To define the Qli and Q2j let us consider Qli for the value for 1 5 rn 5 M ,for t-conorm C. The t-conorm C has been of altitude. Thegli give qualitativeevaluationfor altitude and extended to more than two variables through associativity. Similarly, the FESfinds the p's in VS2. The reason for writpossible definitions are shown in Figure 2. Possible linguistic interpretations,assuming thz plane is coming into l e d , are ing the rules this way, as two separate blocks, is to drastically Q11 = too low, pull UP fast; Q12 = pull UP slightly; Q13 = reduce the total number of rules. In ([l], [2]) there was one

a2j

-

umd

[s

[m

vp.

.

a,

m.

[z

a [a

mi,

a2j

{ E , . . .'"},

vA4

vi

2416

vp

bz

az Fig. 2. Fuzzy Numbers for the Value Altitude in the Fuzzy Expea System.

block of rules where the antecedent in each rule was written (1,0,0,0,0,1) could result in A = (O,O,O,O,1) where I5 means “abort (do not land), pull fast”. as Why do we suggest a NN for the output translator? Because, due to the FES, we would not expect to obtain but instead z* = crisp output like z = (1,0,0,0,0,1) (0.8,0.5,0.2,0.4,0.6,0.9). The NN is to do the non-linearinterpolation from the training set to inputs like z* . Actually, the training set described above is too small to If there are 5 &’s for each variable as in Figure 2, then there would be 54 = 625 rules. But there are only 52 = 25 rules expect the NN to do a good job in non-linear interpolation. We need to expand the training set to include pattern like in RI#and 25 rules in 7Ez, giving a total of 50 rules. The job of the output translator now becomes combining VS1 and VS2 ((0.8,0.5,0.2,0.4,0.6,0.9), (AI, A2, As, A4, A,)), but the problem is to find the correct values for the Ai. We would use into one find set of suggestions for the user. a method, as described in ([I], [2]), to estimate good values for the Ai,and thus obtain the larger training set. IV. OUTPUTTRANSLATOR The output translator, a neural net 0, is to combine VSx and VS2 into the final VS where

and the I’s represent final statements to the user. , L Y M ) and (PI, ...,PP) into F i t concatenate ( ( ~ 1..., (21,2 2 ,. ,ZL),L = M P. The NN will have topology L-K-T.Theinputsarethezi,l SLandtheoutputsareAt, 1 5 t 5 T.Let T , O .e T < 1,beathresholding constant. The output translator will send It to the user only if At 2 T . If At 2 T , then It is sent to the user together with its confidence value At. A voice box could be used to translate It into words for the user. In order to discuss the training set assume M = P = 3, T = 5 s o 2 = ( c Y ~ , c Y ~ , c Y ~ and , ~ ,let ~ ~A, P=~ (AI,A2, .- ,A,). Then the training set could consist of pairs likez = ( l , O , O , l , O , O ) , A = (O,l,O,O,O)orz = (1,l; O,O, 1,0), A = (0, 0, 1,0,O)depending on the meaning of the It in VS. Interaction between the verbal suggestions for altitude and speed can exist, which is another improvement over the models in ([l], [2]). For example, 2 =

+

..

.

si

v.

SUMMARY AND CONCLUSIONS

This paper described a system we called an artificial agent. A trained fuzzy neural net is the “ears”, a fuzzy expert system the ‘‘brain”, and a trained neural net the “mouth”. The input translator, the fuzzy neural net, translates real number input to fuzzy number output, which then becomes the input to the fuzzy expert system. A fuzzy neural net is needed here because it produces fuzzy number output from real number input. Training algorithms for fuzzy neural nets have been a problem in the past, but we have had success in using evolutionary algorithms to solve fuzzy problems ([3], [4]). So, we would employ an evolutionary algorithm to train the fuzzy neural nets. A fuzzy expert system is designed to process the output from the fuzzy neural net to produce input to the output transla)tor. This fuzzy expert system did not use approximate reasoning but is modeled after the fuzzy expert system shell FLOPS [5]. If we have some data to “tune” the fuzzy expert system, then we would try another evolutionary algorithm to do the tuning. Using an evolutionary algorithm to tune a fuzzy expert system is a topic of future research. The output translator, a trained regular neural net, trans-

2417

lata the output of the fuzzy expert system to final suggestions (commands) for the user(s). It is trained using the standard backpropagation algorithm. The challenge is to now actually build such a system.

REFERENCES JJ. Buckley and T. Feuring, Computing with Words in Control, in: LA.Zadeh and J. Kacprzyk (eds.), Computingwith Words in Infonnationhtelligent Systems 2, Series: Studies in Fuzziness No. 34,Physica Verlag, Heidelkxg, 1999, to appear. JJ.Buckley and T. Feuring, Fuzzy and Neural: Interactions and Applications,Series: Studies in Fuzziness No. 25, Physica-krlag, Heidel-

berg, 1999,Chapter 11. JJ. Buckley andT. Feuring, EvolutionaryAlgorithm Solutionsto Fuzzy Problems: Fuzzy Linear Programming,Fuzzy Sets and System. To a p P.

JJ. Buckley and T. Feuring, Linear and Non-Lina Fuzzy Regression: EvolutionaryAlgorithm Solutions, Fuzzy Sets and Systems.To appear. FLQPS:URL:http:llusers.aol.com/wsiler R.E. Moore, Methods and Applications of Interval Analysis, SIAM Studies in Applied Mathematics, Philadelphia, 1979.

2418

Suggest Documents