Adapters are an important part of AnimatLab. They are a general mechanism that allows different modules to communicate with each other. One of the most obvious uses is to let the neural system interact with the physics engine. This allows you to do things like letting a neuron interface with a joint motor to make it rotate, or converting joint rotation into a current in a neuron. However, Adapters are not limited to being used to connect the physics and neural components of the program. They are also a general way to connect nodes in different neural plug-ins. Lets say you have written a neural simulation model specific to your interests. You can add this model to AnimatLab so it can be used by anyone else, and by using adapters you can connect a neuron in your model to a neuron or node in a model written by someone else.
Adapters allow you to do this because all nodes in Animatlab use a standard interface. This includes things like body parts, joints, and neurons. Part of the definition of the node is that it has certain pre-defined input and output variables. So when you have connect something like a joint as an input to a neuron it knows to interpret the signal in radians from the joint as a current into the neuron. Of course, you can not simply take the value in radians for the joint directly as the current signal though. Radians range from -3.14 to 3.14. So if you did that you would be trying to inject a current of 3.14 amps into the neuron! This would probably make a real neuron explode by super-heating the liquid inside. To be able to convert between rotation and current you need a gain function. This function takes radians as its input and outputs current. There are a variety of different types of gains that can be used, but the important thing to remember is that its the two objects, and how they are connected, that determines the input and output values used in the gain function. The gain function simply provides a way to map the values of the input variable to values in the output variable.
You never directly add an adapter. In fact, adapters do not appear in the toolbox. It is the applications responsibility to know when an adapter is needed. Any time you attempt to draw a connection between two items that do not know how to communicate natively then an adapter will be added between those two items to allow them to communicate. However, it will be up to you to know how to configure the adapter to provide meaningful input/output values. You have to understand enough about how the source and target nodes work to know what values are reasonable. In our running example of converting joint angles to current we saw that if we just translated the radians directly to current it would produce very unrealistic currents in the neuron. We needed to know that neural currents are typically in the nano-amp range. Once we know this it is easy to modify the gain function so that radians are turned into nano-amps to provide realistic input values to the neuron. When using adapters you need to keep this fact in mind and realize that it is up to you to configure the gain settings of the adapter to provide useful values.
The adapter shares all of the common properties of nodes in the neural network editor. This includes things that let you change the graphics and text of the node. For more details on these properties please click here. Adapters only have three properties are specific to itself.
This project was supported by: