It has been a while since i have updated the public version of AnacondaNet, i have been slowly plugging away in the shadows (when work lets me ) and have come to a point where i have implemented a very primitive AI for computer opponents.
[s]At the moment i have having issues with JGF, so it is available as downloadable executable jar: http://www.geocities.com/budgetanime//AnacondaNet.html
This version is a cut down version to reduce file size. The massive scrollable background has been removed and a static background with âmovement indicationâ sprites added. (i.e. grass, rocks)[/s]
Update: Through various means i have managed to reduce the size of the full graphic version from 7meg to 3.29meg and as such i have decided to replace the old graphically reduced version with this one. download the jar here http://www.geocities.com/budgetanime//AnacondaNet.html
At the moment the AI is the result of two state vector summation of forces. The first state is that is not avoiding collision, in this state there there is a summation of two forces: head toward food and try to keep distance between other snakes.
The second state is that of avoiding collision with other snakes, its own body or the boundaries of the world. This is done by testing the intersection with two âfeelersâ in front of the snake with a proity based on how close the collision is with the snakeâs head and turning appropriately (depending on which feeler has first been intersected. In order to try to have sustained avoidance turns, once in an avoidance turn it will not stop the turn unless a closer collision is detected with more than twice the piroity or if avoidance is nolonger needed. This sustained avoidance turn was needed as the snake would start to avoid and then promptly change direction as the other feeler recieves a slightly higher priority causing a wiggling motion and no avoidance.
Ultimatily there will be more forces added as well as more states to try and make a more difficult opponent. Some form of unique identities will be created for the snake AI by applying some random weights on different behaviours such as âfearfulnessâ i.e. keep away from other snakes or âgreedinessâ be far more attracted to food, etc.
I would like some ideas on what could be added to the snake AI that would make it seem more âintelligentâ.
Please let me know what you think of the AI as it stands, keeping in mind it is very primitive.
Some controls that may be handy for testing:
Backspace - remove snake labes
Backslash - show AI debuging (i.e. show snake feelers and collision point indicators)
Tab - add extra body segement to your self.
pressing ESC any time will close the current game and return you to the game menu.
I have noticed that some firewalls adversly effect the game, if you have problems, set the âuse TCPâ option in the game options to true.
To change the number of AI opponents nagivagte to: Game Options->Server Options->AI opponents and change the value. There is a maximum of 500, but that is very slow, i recommend 30-50 snakes.