Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!umcp-cs!eneevax!iarocci From: iarocci@eneevax.UUCP (Bill Dorsey) Newsgroups: net.ai Subject: simulating a neural network Message-ID: <223@eneevax.UUCP> Date: Fri, 17-Oct-86 01:34:57 EDT Article-I.D.: eneevax.223 Posted: Fri Oct 17 01:34:57 1986 Date-Received: Fri, 17-Oct-86 22:49:24 EDT Distribution: net Organization: never Lines: 65 Having recently read several interesting articles on the functioning of neurons within the brain, I thought it might be educational to write a program to simulate their functioning. Being somewhat of a newcomer to the field of artificial intelligence, my approach may be all wrong, but if it is, I'd certainly like to know how and why. The program simulates a network of 1000 neurons. Any more than 1000 slows the machine down excessively. Each neuron is connected to about 10 other neurons. This choice was rather arbitrary, but I figured the number of connections would be proportional the the cube root of the number of neurons since the brain is a three-dimensional object. For those not familiar with the basic functioning of a neuron, as I under- stand it, it functions as follows: Each neuron has many inputs coming from other neurons and its output is connected to many other neurons. Pulses coming from other neurons add or subtract to its potential. When the pot- ential exceeds some threshold, the neuron fires and produces a pulse. To further complicate matters, any existing potential on the neuron drains away according to some time constant. In order to simplify the program, I took several short-cuts in the current version of the program. I assumed that all the neurons had the same threshold, and that they all had the same time constant. Setting these values randomly didn't seem like a good idea, so I just picked values that seemed reasonable, and played around with them a little. One further note should be made about the network. For lack of a good idea on how to organize all the connections between neurons, I simply connect- ed them to each other randomly. Furthermore, the determination of whether a neuron produces a positive or negative pulse is made randomly at this point. In order to test out the functioning of this network, I created a simple environment and several inputs/outputs for the network. The environment is simply some type of maze bounded on all sides by walls. The outputs are (1) move north, (2) move south, (3) move west, (4) move east. The inputs are (1) you bumped into something, (2) there's a wall to the north, (3) wall to the south, (4) wall to the west, (5) wall to the east. When the neuron corresponding to a particular output fires, that action is taken. When a specific input condition is met, a pulse is added to the neuron corresponding to the particular input. The initial results have been interesting, but indicate that more work needs to be done. The neuron network indeed shows continuous activity, with neurons changing state regularly (but not periodically). The robot (!) moves around the screen generally winding up in a corner somewhere where it occas- ionally wanders a short distance away before returning. I'm curious if anyone can think of a way for me to produce positive and negative feedback instead of just feedback. An analogy would be pleasure versus pain in humans. What I'd like to do is provide negative feedback when the robot hits a wall, and positive feedback when it doesn't. I'm hoping that the robot will eventually 'learn' to roam around the maze with- out hitting any of the walls (i.e. learn to use its senses). I'm sure there are more conventional ai programs which can accomplish this same task, but my purpose here is to try to successfully simulate a network of neurons and see if it can be applied to solve simple problems involving learning/intelligence. If anyone has any other ideas for which I may test it, I'd be happy to hear from you. Furthermore, if anyone is interested in seeing the source code, I'd be happy to send it to you. It's written in C and runs on an Atari ST computer, though it could be easily be modified to run on almost any machine with a C compiler (the faster it is, the more neurons you can simulate reasonably). -- ------------------------------------------------------------------------------- | Bill Dorsey | | 'Imagination is more important than knowledge.' | | - Albert Einstein | | ARPA : iarocci@eneevax.umd.edu | | UUCP : [seismo,allegra,rlgvax]!umcp-cs!eneevax!iarocci | -------------------------------------------------------------------------------