Braitenberg Vehicle Simulator

Vehicles: Experiments in Synthetic Psychology, by Valentino Braitenberg

"This is an exercies in fictional science, or science fiction, if you like that better. Not for the amusement: science fiction in the service of science. Or just science, if your agree that fiction is a part of it, always was, and always will be as long as our brains are only minuscule fragments of the universe, much too small to hold all the facts of the world, but not too idle to speculate about them."

                                                                                                                                                                                                                                                Valentino Braitenberg

This project aims to simulate some primitive robots which are given the name "Braitenberg Vehicles", after first being stated in Vehicles: Experiments in Synthetic Psycology. Before giving information about the simulator and the project, it is better to have some idea about the book and its enthralling author, Valentino Braitenberg.

Valentino Braitenberg was born in 1926, Bolzano. Being a German neuro-scientist and cybernetics, he is a specialist in communication and movement control. Furthermore, he deals with the anatomy of the nervous system, which leads him to write his revolutionary book Vehicles. Before Vehicles, he had also written a number of articles concerning artificial intelligence, cybernetics and cognitive sciences. But he is most famous for Vehicles. For the reason that he considers animal brains as "pieces of computing machinery", he had created the world of vehicles like they were real animals in their own nature. He aimed to illustrate the fundamental concept of internal structure of living mechanisms, using the connections and systems used in vehicles. Having very simple hardware, this armada of creatures show amazing complex behaviours in their world, therefore they have been used for research tools in Computational Neuroscience. Now Prof. Dr. Braitenberg is former director at the Max Planck Institute for Biological Cybernetic in Tübingen, Germany.

In 1984, Vehicles: Experiments in Synthetic Psycology is published by the MIT Press, Cambridge. Synthetic psychology is a branch in science, where biological behavior is synthesized instead of being analyzed. Braitenberg is supposed to be the father of this branch, since his researches, articles and publications ushered a new era in this field. The book became consequential not only for cybernetic psychologists, but also for future work in artificial life and the coalescence of computational AI. The discussion in the book and experiments about vehicles are leaded by "law of uphill analysis and downhill invention" which make all the stuff in the book more comprehensible, hence it is more difficult to grasp a working mechanism or system just by looking externally than to compose it up from scratch. In the light of this method, Braitenberg creates an almost-real world with the vehicles as creatures of this toy world. Braitenberg Vehicles are actually simple automatons, showing the abilities of reactive agents, thus setting a base for artificial life. Materially, these vehicles are nothing but some combination of sensors, motors and wiring. But the real excitement is how things as basic as those gather and make up an environment that is used to model our complex world. Like humans of reality, vehicles have the property of interacting with their environment. That is the most important reason of the analogy between "them" and "us", according to the development of vehicles. Figure 1 First generation of vehicles start with only one sensor and one motor connected with a wire (Figure 1). Then, even increasing motor and sensor amount to two gets things complicated. Having combinations of different wiring and two types of sensors, integrates vehicles emotions! Braitenberg experiments the purest form of fear, aggression and even love in his vehicles, as will be explained later.

Braitenberg's toy world contains things other than vehicles, as it simulates the actual world. Of course it is nonsense to compare a world including only creatures with the real one. The toy world is imagined to have everything that a sensor of a vehicle can react, light is the most common example that is used in the book. Vehicles behave differently in the way their hardware designed, when they see the light or another . Also, their behaviour changes by influence of alternating luminance of light. The most primitive vehicle, that I mentioned a moment ago, has a sensor-motor relation applying that velocity of motor is directly proportional to temperature sensed. In other words, it - let's call it Vehicle1 as in the book - accelerates when it's hot, and decelerates when it gets colder. So it stays longer in cold places and even can come to rest if it is so cold to reduce the motor force below friction force. Braitenberg concludes the creation of this vehicle with the idea of calling this creature as alive, since a dead material is not able to like cold places

Figure 2

Vehicle 2

From now on I will explain different kinds of vehicles briefly, since you will understand their behaviour better when you use the simulator. To move on, Vehicle1 will be upgraded by dublicating motor and sensor number, which is like biologically wrong dublication and forming of conjoined twins. As we have two motors and two sensors now, we have two different combination to wire them (To wire both to both is exactly Vehicle1). First think about connecting ones at same sides, calling Vehicle2a (Figure 2). Then what happens, if right sensor sees less light than left one, right motor will turn less than left and the vehicle itself will turn right, where the light source is not at. This means Vehicle2a will always move to the orientation that its source doesn't exist. If the sensors sense the light in the same amount, Vehicle2a will accelerate towards it and hit the source.

On the other hand, Vehicle2b, having its connections inversely, will behave different (Figure 2). Nothing will change if the sensors are excited same (unless we change sensor functions, will be touched on later). But consider again right sensor senses less light, the light source is at left side. This time left motor will work less, and Vehicle2b will turn to light source. We can think as it will recognize light source from wherever it is, and run towards it, and acceleretaes, and BOOM! Braitenberg defines these vehicles based on their behaviours; Vehicle2a as coward, since it dislike the source and escapes when it sees, and Vehicle2b as aggressive, since it tracks and tries to destroy the source no matters what.

Figure 3

Vehicle 3

Now having felt a little bit the wind of vehicle emotions, we can investigate how to vary them. Vehicle3a and Vehicle3b will be our next guests. As I mentioned earlier, we can change the sensor-motor functions. The simplest way to do that is to reverse, in other words, now our vehicles will move slower when they sense more. So we keep connections same as they were in 2a and 2b, but make sensors have an inhibitory effect on motors (Figure 3). Thus, Vehicle3a and 3b will decelerate without changing their orientation when their both sensors are excited the same. Figure 4 Moreover, there can be conditions where they face the light source and just stop. Analyzing Vehicle3a, it detects light source, faces it then decelerates as it gets near. Then stops and watches the light source. Whereas Vehicle 3b accelerates when it can't see the light source, and when it finds, it just decreases speed. Yes, Vehicle3 types both like the source, but they show their love in alternating ways. Vehicle3a loves the source in a permenant way, that it can't take its eyes from the light. On the other hand, Vehicle3b likes the nearby light allright, but it is always ready for another more powerful one, looking for it. That's why Braitenberg calls Vehicle3b as an explorer.

But this time we will come up with a third model, Vehicle3c. Think of all the four type of vehicles that we encountered up to now. We will combine them in Vehicle3c. Vehicle3c has eight sensors, two are Vehicle2a's sensors - uncrossed and excitory, two are Vehicle2b's sensors - crossed and excitory, two are Vehicle3a's sensors - uncrossed and inhibitory and last two are Vehicle3b's sensors - crossed and inhibitory (Figure 4). But of course these all eight sensors should not sense the same environment variable. In pairs, they will be reactant to light (as usual), temperature (as our first model), oxygen concentration and organic matter concentration. Finally we have a vehicle, robot or creature; that escapes from hot places but always stays at places full of oxygen, tries to destroy light bulbs and likes organic matters. Looking it as a whole, Vehicle3c has a system of values, and has knowledge that it tries to destroy light bulbs because it knows they heat the environment, or knows chemosynthesis because it prefers places full of oxygen and organic matter.

Vehicle 4 and more

As we are aware of the possibility to change sensor functions, henceforth we will play with them. Up to know all vehicles had direct or inverse proportionbetween its velocity and the amount of environment variable. In vehicle4 brand of robots, the graph of the function is like a hill, having a maximum speed in avarage light, decelerating when light changes positively or negatively. We can imagine that from dark to avarage light, Vehicle4a acts like Vehicle2a then from avarage to maximum light, it acts like Vehicle3a. That causes the vehicle to orbit around the source or drawing eight figures or some more different shapes (Figure 5a - Figure 5b). As the tastes of Vehicle4as with different functions are too varied, this complicated type of behaviour may make us think that these creatures have instincts. But we can make it even better than just having instincts. Another possible change in functions is to put a threshold. The vehicle will not be interested in the source untill it passes the threshold value, which makes the vehicle seem like it make decisions about the environment. And taking this decision making system as a basis, Braitenberg concludes with the traces of existance of free will in his vehicles. Then making progress in this threshold issue, it is possible to combine some threshold devices between motors and sensors or make complex input devices to create some logic instances. These threshold device complexes will be used to make vehicles' brains from now on. For example, it can know other robots, it can count, it can visit every tenth source on its way, or even it can escape from vehicles which have sensor number multiple of seven, believing that they bring bad luck. Figure 5a Redounding the number of sensors and connections, it is also possible to make a puzzle-solving vehicle! But there is a gap, for these more complicated calculations a memory is needed, and the solution is still there. It is possible to make memory with these threshold devices. Take two threshold devices, the first is connected to a red light sensor (consider as input) and the other is connected to the first one. Once a red light activates the first threshold device then it activates the second and the two devices will activate each forever, which shows that they have been activated once upon a time. This storage capability is the main block of a memory which can then be used to form real memories, much more complex but finite in the number of threshold devices. Even this finity situation can be solved. Think of a vehicle capable of leaving marks at the environment. It can not comprehend the marks but read and measure them to give a result. Then this vehicle can do almost everything that a computer does, in an infinite area that it can leave marks on.

Figure 5b

The challange for vehicles is not making more and more complex things, but to survive. Their toy world deserves to be resembled to real world especially with the war for survival in addition to environment and creatures. Like all species in the world, vehicles are also subject to natural selection, modification and evolution as well. As gods of the vehicle world, we experiment this evolution like this: First we release all brands of vehicles on a table, designing the environment to include light, temperature, oxygen, smell, sound, undulating land, everything that can affect the evolution. Then we take some vehicles from the table, copy them and put back. The ones that fall from the table looses the life-game, so we only take from table in the rate of fallen ones. Then vehicles with the best properties continue to wander through the table in next generations, whereas others are eliminated. Mistakes are also welcomed while copying, because mutations or rare species are also a part of nature. So as time goes by the brain of vehicles begins to be shaped and a kind of knowledge is formed in the process of Darwinian evolution. But this inborn knowledge is never enough, a vehicle must be able to adapt different environments to survive. At that moment, Braitenberg introduces us a different kind of wire, called Mnemotrix. What makes it special is, having a very high resistance at first, its resistance begins to fall when two end of it, is subject to current at the same time. It stays same for a while, then eventually turns into its first resistance. Putting our new Mnemotrixed-vehicle (Vehicle7) in an environment, first no current will pass on Mnemotrices. Then some related situations will trigger the other, and thanks to Mnemotrix, Vehicle7 will be able to learn, experience and reason things. For example, if all aggressive vehicles are painted red, then when each time Vehicle7 sees an aggressive red vehicle, sensor of red-vehicle and threshold device of aggressive-vehicle will be activated at the same time, decreasing the resistance of Mnemotrix between "aggressive-vehicle" and "red-vehicle". After a time, when Vehicle7 senses a red vehicle, it will understand that it is aggressive and immediately try to excape. Converse is true, when an aggresive blue or green vehicle comes, it will see it red, convincing us that this creature is making generalizations.

I know things are getting slightly complicated, but in Vehicles step-by-step all components of the development of vehicles are explained clearly. After that, Braitenberg adds an eye (or camera) to vehicles, to have the picture of the environment. Continues with creating a multi-dimensional space externally and modifies Vehicle8 to cope with this environment using its internal map of environment. Many threshold devices are used to recognize different items or movements in the environment from the data coming from the eye, object and movement detectors. After that he introduces shapes, symmetry and visual recognition to vehicles. Then a so-called improved brain - remembering, learning, reasoning, having ideas - will be next extension, using Ergotrix a new kind of wire. To sum up, in the first part of the book there are 14 vehicle models improving one-by-one and in the second part, real systems of living things are resembled with the vehicles in the book, calling Biological Notes on The Vehicles. I suggest you to read this creative and thought provoking book and step into the world of neurorobotics; not only for students, educators, physicians or engineers, but also for psychologists, biologists, neurologists and philosophers.