ARTIFICIAL NERVOUS SYSTEMS The Genetic ... - Semantic Scholar

1 downloads 0 Views 68KB Size Report
Computational Models Section, Computer Science Division, ... Artificial Nervous Systems, Genetic Programming (GP), Genetic Algorithms. (GAs), GenNets ... robot), called LIZZY, which consisted of fully connected neural network modules.
ARTIFICIAL NERVOUS SYSTEMS The Genetic Programming of Production-Rule-GenNet Circuits Hugo de Garis Computational Models Section, Computer Science Division, Electro Technical Lab (ETL), 1-1-4 Umezono, Tsukuba Science City, Ibaraki, 305, Japan. tel : + 81 298 58 5870, fax : + 81 298 58 5871 email : [email protected] Center for Artificial Intelligence, Computer Science Department, George Mason University (GMU), 4400 University Drive, Fairfax, Virginia, VA 22030, USA. tel : + 1 703 993 1558, fax : + 1 703 993 3729, email : [email protected] CADEPS Artificial Intelligence and Artificial Life Research Unit, Universite Libre de Bruxelles (ULB), Ave F.D. Roosevelt 50, C.P. 194/7, B-1050, Brussels, Belgium, Europe. tel : + 32 2 650 2779, fax : + 32 2 650 2785, email : [email protected] Keywords : Artificial Nervous Systems, Genetic Programming (GP), Genetic Algorithms (GAs), GenNets (Genetically Programmed Neural Network Modules), Artificial Creatures, Biots (Biological Robots), Detector GenNets, Decision GenNets, Motion GenNets, Production-Rule-GenNets, Complexity Independence of GAs, ALife, 1000GenNet Biots, Darwinian Robotics, GenNet Accelerators, Software Programmable Hardware, Darwin Machines. Abstract : A year ago, the author evolved a simulated artificial creature (biot, i.e. biological robot), called LIZZY, which consisted of fully connected neural network modules (called GenNets), whose weights were evolved such that each GenNet performed some desired behavior, such as making the biot walk straight ahead, turn clockwise or anticlockwise, peck, or mate [de Garis 1990, 1991, 1993]. Other such GenNets were evolved to detect sinusoidal frequencies, or signal strengths, or signal strength differences, etc. However, the middle layer, between the detector and the motion GenNets, was implemented with traditional symbolic production rules, for reasons of computer simulation speed. Every time a GenNet was added to the system, simulation speed dropped. This paper "completes" the above work, by proposing a model which shows how a circuit of production-rule-GenNets (i.e. GenNets which behave like production rules), can be evolved which implements the middle or "decisional" layer, which takes signals outputted from the detector GenNets, and then decides which motion GenNet should be switched on. This work takes a first step towards the evolution of whole nervous systems, where circuits of GenNet modules (of appropriate types) are evolved to give a biot a total behavioral performance repertoire.

2 1. Introduction As mentioned in the abstract, the author was forced to use conventional symbolic production rules to implement the middle decision layer between detector and motion GenNets. This was felt to be unsatisfactory, because the whole point of the exercise was to evolve a biot based on GenNet modules. This paper proposes how the intermediate decision layer can be evolved, so that the incoming signals, as processed by the detector GenNets are able, via the decision layer, to switch on the appropriate motion GenNet. The aim of the exercise is to evolve an artificial nervous system. The artificial nervous system described in this paper, is largely "supervised", i.e. the fitness definition used to drive the evolution was closely linked to a set of predefined and desired targets. However, later research will be devoted to more "open ended" evolution, where artificial nervous systems can be evolved whose fitness definitions will be much less constrained. The ultimate open ended fitness definition would be simply to survive and reproduce. As computer technology progressively allows more elaborate simulations, this kind of "open ended" evolution becomes more feasible. We begin this paper with a description of the behavioral characteristics that the artificial nervous system that is to be evolved should have. These characteristics are presented in section 2 in the form of symbolic production rules (i.e. a set of preconditions, and an action). To begin with, some background on LIZZY, the biot whose nervous system this is to be, will be presented. FIG. 1 shows LIZZY, a simulated quadruped biot, whose detectors and motion controllers are GenNets (i.e. Genetically Programmed Neural Network Modules [de Garis 1990, 1991, 1993]. Genetic Programming (GP) is the art of using Genetic Algorithms (GAs) to build/evolve complex systems. Since GAs are driven only by the fitness values of the systems they are evolving, the internal complexities of the evolving systems are irrelevant (provided that the fitness values keep increasing, i.e. that the systems are evolvable). This "complexity independence" of GAs allows one to evolve systems of complexity levels well beyond what is humanly comprehensible, hence one has a tool to "extend the boundary of the buildable". This ability to build/evolve complex systems (e.g. neural network dynamics or artificial embryos [de Garis 1993], etc) is the great attraction of GP.

FIG. 1 LIZZY - AN ARTIFICIAL CREATURE (BIOT) One application of GP that the author has investigated over the past few years [de Garis 1990, 1991, 1993], has been the evolution of complex time-dependent behaviors of fully connected neural networks. The traditional neural network training algorithms (e.g. backprop, recurrent backprop) cannot compete with GP in terms of the complexity of behaviors that GP can cope with. GenNets were so versatile, that the author believed it

3 would be possible to build whole artificial nervous systems using them as basic building blocks. Very briefly, a GenNet is made by evolving the weights of a fully connected neural network. If there are N neurons in the GenNet, there will be N2 connections and hence weights. These weights (usually with an absolute value less than 1.0) can be expressed in binary fraction format (e.g. P = 6 to 8 bits per weight) and one bit for the sign. These weights are concatenated onto a single bit string GA chromosome of total length N*N*(P + 1) bits. These chromosomes are mutated and (uniformly) crossed over in the usual GA fashion, such that their time dependent outputs do what one wants, whatever it is. LIZZY had an average-signal-strength detector GenNet at each antenna tip. By detecting differences in these two strengths, LIZZY was able to orientate toward or away from the source of the signal. LIZZY also contained a frequency detector, where the assumption was made that the 3 types of creature in its environment (prey, predators, and mates) emitted a characteristic frequency (i.e. low frequency for predators, middle frequency for mates, high frequency for prey). LIZZY would orientate toward a prey or mate, approach, peck at a prey, or mate with a mate, then walk away. LIZZY would orientate away from a predator and flee. The five behaviors LIZZY possessed were, walk straight ahead, turn clockwise, turn anticlockwise, peck (by pumping with the front feet), and mate (by pumping with the back feet). Each of these behaviors was generated by a separate GenNet. To switch between behaviors A and B, the outputs of GenNet A were input into GenNet B. Since the evolved behaviors (probably) took the form of limit cycles in the phase space of their motions, behavior B always occured, independently of when the behavior switch was made. 2. Production-Rule-GenNets and their Circuits This section describes the fundamental assumptions made in the model which served as the "evolutionary framework" for the artificial nervous system. An evolutionary framework, is the set of assumptions, parameter ranges, etc which determine the search space within which the Genetic Algorithm used is to operate. The basic unit used to build/evolve the circuit, was the production-rule-GenNet (p-r-GenNet), shown in FIG. 2. 1.0

S2

S1

S2

DESIRED OUTPUT

0.6

OF 0.0

0.4 DESIRED OUTPUT

0.2

Production Rule

0.8

O

GenNet

OF 1.0 0.0 0.0

0.2

0.4

0.6

0.8

1.0

S1

FIG. 2 PRODUCTION-RULE-GenNet

FIG. 3 EVOLVING A P-R-GenNet

Production-rule-GenNets are evolved to obey production rules of the form :IF ((input S1 > or < const C1)&(input S2 > or < const C2)) THEN output O = 1.0, ELSE output O = 0.0

4 To evolve such a p-r-GenNet, see FIG. 3 which represents the production rule :IF ((input S1 > 0.4)&(input S2 < 0.6)) THEN output O = 1.0, ELSE output O = 0.0 The fitness definition for this GenNet was :FITNESS = Inverse of ( \i\su(n=1,36, )(dn - an)2 ) where n ranges over the 36 pairs of inputs (S1, S2). The desired outputs dn are either 1.0 or 0.0 depending upon whether the (S1, S2) "coordinates" lie inside or outside the shaded region respectively. The an represent the actual outputs. In practice, these actual values were very nearly 0.0 in the "white" region, and roughly 0.7 in the "grey" region. Note, it was assumed S1 and S2 were positive reals, with values < 1.0 Experience shows that these production-rule-GenNets can be evolved for any combination of constant pairs and inequality pairs. It was thought that it might be possible to evolve artificial nervous systems by using these p-r-GenNets as building blocks. For example, it might be possible to incrementally evolve a network of these p-r-GenNets, so that they could serve as the middle layer for LIZZY. It might also be possible at a later date to evolve p-r-GenNet circuits which act as production systems, and hence be capable of manipulating symbols. However, since the ideas presented in this paper are still in an early stage of development, only a rather simple artificial nervous system will be proposed here. FIG. 4 shows an example of a circuit which is built up from production-ruleGenNets (p-r-GenNets). Each p-r-GenNet has two inputs, and a single output which can fan out indefinitely. Detector 1 Action 1 1

5

9

Detector 2 Action 2 2

6

10

Detector 3 Action 3 3

7

11

4

8

12

Selected Action

Detector 4

Action 4 Detector 5

FIG. 4 A CIRCUIT of PRODUCTION-RULE-GenNets Several characteristics can be observed from FIG. 4. In this simple model, each pr-GenNet (oval shaped in FIG. 4) has its own production rule of the form :IF (input1 >< c1)&(input2 >< c2) THEN out = 1.0, ELSE out = 0.0

5 The outputs from the detectors as well as the inequality constants ci, are assumed to be real numbered values di in the range 0.0 < di < 1.0. The actions are assumed to be mutually exclusive, so that only one action is used to switch on one motion GenNet from a library of motion GenNets. These motion GenNets control the effectors such as the legs of a biot, and hence only one of them can be active at any one time. For this experiment, the detectors and motions used were :Detectors i) ii) iii) iv) v) vi) vii) viii)

Predator detector (low frequency detection), PRED. Mate detector (middle frequency detection), MATE. Prey detector (high frequency detection), PREY. Signal-strength detector at mouth, Mss. Signal-strength at left antenna tip, LAss. Signal-strength at right antenna tip, RAss. Difference of signal-strengths at antenna tips, L-Rss. Difference of signal-strengths at antenna tips, R-Lss.

Motions i) ii) iii) iv) v)

Walk straight ahead, WALK. Turn clockwise, CLK. Turn anticlockwise, ACLK. Peck at food (raise and lower front legs), PECKING Mate with mate (raise and lower back legs), MATING

Threshold Constants i)

thrMss = A threshold constant beyond which pecking or mating can begin, once the Mss is sufficiently high. ii) thrL-R = A threshold constant for rotation. Examples of Behavioral Rules i) ii) iii) iii) iv) iv) v) vi)

If ((PREYor MATE)&(L-Rss > thrL-R)) Then ACLK If ((PREYor MATE)&(R-Lss > thrL-R)) Then CLK If ((PREYor MATE)&(R-Lss < thrL-R)) Then WALK If ((PRED)&(L-Rss > thrL-R)) Then CLK If ((PRED)&(R-Lss > thrL-R)) Then ACLK If ((PRED)&(R-Lss < thrL-R)) Then WALK If ((PREY)&(Mss > thrMss)) Then PECKING If ((MATE)&(Mss > thrMss) Then MATING

The way in which these detectors and actions translate into input/output training vectors to evolve the p-r-GenNet circuit will be discussed in a later section. Each p-r-GenNet needs to be supplied with the following parameters :a) The inequality (> or or to or , and a 0 means