LightChaser help
LightChaser is a program that simulates a light-sensitive "creature" whose movement is controlled by ANN.This is what our creature looks like (after being magnified). It has three light sensors. Each sensor reads the light intensity exatly from the center of sensor (the black dot surrounded by a blue circle). So the creature doesn't actually "see" like we do, it just senses the intensity of light on it. It is similar to the situation when you close your eyes: you don't see anything, but you sense the intensity of light on your eyes. For example when you are in a dark room with your eyes closed and somebody points a flashlight at your face, you can sense it. The creature has three sensors, so it can figure out if the light intesity changes in some direction. For example if the upper sensor gives higher light intensity readings than the other two sensors, then most probably the light intensity rises towards "up" direction.
Creature's movement is controlled by ANN. This ANN reads in sensor readings (which should be in range from 0 to 1) and returns movement information. Currently it works this way:
- The first input to ANN comes from the lower left sensor.
- The second input comes from the upper sensor.
- The third input comes from the lower right sensor.
The description of outputs may look a bit weird at first. The catch is that our neurons can only output a value from 0 to 1, but not any negative values. So if we want the creature to be able to move both to the left and to the right, we can calculate the horizontal speed this way:
- The first output of ANN says how fast the creature should move to the left direction.
- The second output says how fast to move right.
- The third output says how fast to move up.
- The fourth output says how fast to move down.
speed_x = speed_right - speed_leftSimilar principle applies to the vertical speed.It is apparent that speed_x and speed_y can only be in a range from -1 to +1. If this is too slow, then it is possible to speed up the creature by multiplying both speeds with a speedup_factor. You can do it by pressing some keys, described later on this page.
So the creature needs ANN with exactly 3 inputs and 4 outputs. If these values are different, LightChaser will say so and ask to load correct ANN.
OK, now we have enough information to start the LightChaser program. It should look something like this:
However, it is very likely that you immediately get an error message about incorrect configuration file. This is because LightChaser tries to read config_generated.txt, which is the same file that Trainer usually modifies, and which often doesn't contain what LightChaser needs. To load a correct ANN, press "L" and choose some other configuration file. Examples for LightChaser usually begin with config_lc_ and also contain a short description (read it with Notepad or any other text editor).
On the screen you will see the same creature described before and a moving spotlight. When creature is under the spotlight, it will usually do something (depending on the ANN it contains).
The help about keys in LightChaser:
- To move the spotlight, move your mouse.
- To move the creature, hold down "Alt" (the left one) and move your mouse. It can be useful when creature wanders somewhere on the edge of screen and you want to get it back to the center.
- To change the size of spotlight, press mouse buttons (left button increases and right button decreases).
- To change the horizontal speed of spotlight, press "8", "9" or "6" on NumPad (which is usually located on the right side of keyboard. If you don't have any, then... too bad :) It may be a problem with portable computers. You can fix it easily in source code if you have C++ programming knowledge and Allegro library, or you can write me and ask to fix it.). Pressing "8" decreases the speed_x, "9" increases and "6" zeroes. However, speed_x is not the absolute value of horizontal speed, but the actual value, meaning that when speed_x < 0, then spotlight moves left, and when speed_x > 0, it will move right. Hence the interesting behaviour of buttons "8" and "9" (try it and you will know what I mean). This approach to changing the speed allows, for example, to make the spotlight bounce on the edge of screen like a basketball (hold down "9", for example).
- To change the vertical speed of spotlight, press "4", "7" or "5" on NumPad. Pressing "4" decreases the speed_y, "7" increases and "5" zeroes. Behaviour is similar as described in previous point for speed_x.
- To change the speedup_factor of the creature (described somewhere above), press "/", "*" or "-" on NumPad. Pressing "/" decreases the speedup_factor, "*" increases and "-" sets it back to default (which should be 3).
- To load another ANN into the creature, press "L". There are several examples included with this software package, they usually start with conf_lc_ and also contain a short description (read it with Notepad or any other text editor). Feel free to create new ones with Trainer (read the description of creature again to make sure you create correct ANNs).
If the loaded configuration file does not describe weights of connections, then they are assigned randomly between values -max_weight and +max_weight.
If the network in configuration file is very big, then you have to wait a little bit while it is being loaded. Very big ANN will also slow down the work of program.
- To get a short help about keys in LightChaser, press "F1".
- To save a screenshot into bitmap file screenshot.bmp, press "F12". However, that does not work in menus (in help and in loading menu).
- And finally, to exit the program, press "Esc". If your network is very big and computer has a hard time working on it, you have to hold down Escape until you see a text "ESC pressed, will QUIT".