|
![]() |
|
Using SALSAComponentsSalsa is a program that simulates many species of artificial creatures (critters) in a world. That world and each critter species are described in parameter files that can be edited using a text editor. The program itself is controlled from the graphical interface using menus and buttons. InterfaceYou will run the program from its graphical interface. You are also able to modify worlds and critters by editing the files that specify those worlds and critters. WindowsSeveral windows appear when you run the program. Salsa is the main controller. You can load and save worlds and critters from here. You can also begin, pause and end a run. Finally, you can set a few parameters and look at some of the messages that the simulation produces (such as how many time steps have elapsed in the simulation, or what critter/environment files were last loaded). The Salsa window must be selected (click on it) in order to access the menus. Another window that appears is the world window, which will show the current location of rocks and critters in the simulation. It is initially empty. The last window that (usually) appears is a placement window that allows you to place rocks and "fertile areas" (places where food will grow) in the world. Once the simulation is ready to begin (a world has been created/loaded and critters have been added to it), three windows will appear: STM, reinforcement, and strength&age. STM shows what each critter's current memory looks like (its sensor and action values). reinforcement shows the rewards and punishments for critter, due to each particular cost (e.g., hitting a wall) or benefit (e.g., eating food). strength&age shows each critter's current strength and how old it is. When a critter's strength reaches 0, it is dead. In each of these three windows (STM, reinforcement, strength&age), the critters are ordered from top-to-bottom in the same order they were loaded. So, if you loaded 5 critters named "L" and then you loaded 3 named "T", the top 5 information bars of each of these windows would correspond to the "L" critters and the last 3 bars would be the "T" critters. SALSA windowThis is the main control center. You can load in worlds and critters; create new worlds; start, pause, and step through runs, and set a few general parameters. You can also read messages from Salsa, indicating what critters and environments it has just loaded, what time step the simulation ended at, and various other events. You can determine how much output appears in this message window by setting the "verbosity" from the Options menu item, Set display parameters.
World windowDisplays the current contents of the world.
Reinforcement windowShows the reinforcement of each critter, broken down into punishments and rewards for each action. These are proportions of the total reinforcement received by the critter over its lifetime (the proportions shown are reset each time you press the Run button). If the rewards bar is longer than the punishments bar, the critter is at least receiving an overall positive reinforcement, and thus its strength should be increasing.
You can click on any critter's information bar in this window and the critter it belongs to will become highlighted in cyan for a moment. It's best to Interrupt the run and view the critters this way. Strength and age windowShows the strength (green) and age (magenta) for each critter. If strength gets to 0 and the simulation is set so that critters don't die (they are "reincarnated"), then a new critter will take its place with a high strength again. You can tell that this has happened since the age bar will be reset to 0. Old critters are a sign that those critters have learned how to survive well in their world.
As with the reinforcement window, each critter's information bar can be clicked and the corresponding critter in the world will light up. STM windowThe state of each critter's input and output are shown here. These would be the values for the last timestep, so you can step through the simulation, watch an action, and then look at the corresponding STM bar for that critter to see why it did that. If a critter doens't have a particular sensor or effector, it won't have any graphical information in that column. Touch has 5 values displayed in the same colors as the thing being touched (nothing, soft plant, hard plant, critter, rock). Vision is in color, so each bar will be one of the colors in the world that the critter is seeing. Sonar has 5 values, and the darkness of the bar corresponds to how close the object detected is (darker = closer). The states of the effectors are shown on the right hand side of the display. Each possible action gets a separate bar, since each action is represented by a single neuron in the critter's neural net. The bar's color indicates how active that particular neuron is. No color is an activation of 0, red is negative (darker red is a larger negative number) and green is positive (darker green is a larger positive number). Some actions have only one value, while others have multiple values. For examlpe, Eat requires one neuron. Move, on the other hand, requires as many neurons as the kinds of move for this critter. In the case below, critters can move only one space at a time, so only the first of 4 possible move columns shows any activation (the other spaces are there since other critters might have more movement possibilities). For each critter's information bar, you can see what its most likely output will be by looking for the action with the highest activation. In the case of the very first critter, Turn is slightly green, and this is the highest of all activations. So, the critter will most likely turn. However, since actions are probabilistic (even though they're biased), the critter might choose a different action than Turn this time.
As with the reinforcement window, each critter's information bar can be clicked and the corresponding critter in the world will light up. LTM Window(Information on this window to come soon.) Critter filesEach critter has a number of parameters associated with it, including its name, values for its sensors and effectors, and its learning parameters (learning rate, discount rate, exploitation rate). These parameters are all specified in a separate text file for each critter species. Once a critter has been added to the world, its parameters cannot be changed. However, a critter's parameter file can be changed, the world cleared, and critters of that type reloaded. Each parameter has a name and is followed by a value. Usually, the value is an integer (only name gets a character value). Parameter names must be spelled correctly, although case (upper/lower case) doesn't matter. A parameter is separated from its value by spaces, tabs or newlines (pressing the return/enter key). In addition to parameter name/value pairs, the file also contains lines that look like this: // This critter can only turn one cell (60 degrees) at a time turn 1 The first line is a comment. The second line is an actual parameter name and value pair. The comment is ignored; it is placed there so that a human can read this file later and perhaps understand what's going on a bit better. A comment begins with two front-slashes, //. Everything on the rest of the line is ignored. You can put comments anywhere you like. You can also use comments to "remove" a parameter temporarily, and then delete the // later to add the parameter back in: // This critter can only turn one cell (60 degrees) at a time //turn 1 In the lines above, the original comment is there, but now the parameter/value pair has been commented out. It is as if the parameter were deleted. This is a useful trick to use when making small changes since you don't have to remember every previous parameter change - just comment out the old one and put in a new one. Each critter species gets a name, and you can see this name pasted on those critters' icons in the world. This is one single character, as in X. The file for critter X is called critsX by convention. You can call these files anything you want, however. If a critter's name is longer than 1 character, the rest of the name will be ingnored.
For all sensor and effector parameters, if the parameters for that sensor/effector are deleted or commented out, then that sensor/effector will not exist in the critters (except that all critters will be able to eat, move and turn). Otherwise, the critter will have that ability to whatever degree the parameters indicate. Sensor parameters:
Effector parameters:
Reinforcement learning parameters:
If you want to edit a critter type's parameters, open up its parameter file in your text editor, change the parameters you want, then save the changes. You then need to load in the critters from the Load critters menu option (under the File menu). (When you load critters, you will be asked for how many critters of that type should appear in the world (5 is the default). Type in the number, then press return or click OK.) Environment filesA world consists of many parameters. First is a set of punishments and rewards for each of the critter actions. There are also specfications for the number of rocks and plants, how rocks and plants appear, and a few miscellaneous options. Parameters relating to rocks and plants (and one for critters):
Parameters relating to costs/rewards of critter actions. All "Incr" values should be positive, and all "Decr" values should be negative.
Setup filesA setup file specifies what world and what critters are to be used. You can load in more critters than are specified in the setup file, if you wish, by using the Load critters menu option under File. Notes and Advice
|