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.
All during this I was hearing âUh oh!â sounds. I alt-tabbed back into the game to find I was the only snake on the board. I saw a little blue thing in front of me, but it always stayed in front of me as if it was part of the graphic. Not sure what to think about that. Iâm not sure if I saw any of the food you mentioned. There was some greenish stuff on the ground I thought might be it, so I ran over it, but it was still there after I ran over it. Perhaps there was no food? Seeing as how I had noticed in my initial flash of the game there were opponents, but now they were gone, I decided to restart the game. I backed hit Escape and then Enter to start a new game, and was disappointed to find that it was reloading the graphics all over again. Shouldnât that only need to happen once? Anyway, I got back into the game, wandered around a bit, toying with how the arrow keys worked, and watched 3 AI snakes wander up to the top of the screen and off the board, resulting in the âUh oh!â sounds again. Now I know what that means! But yeah, the very first thing they did was go straight to death
it is rip from the music for the Anaconda mini-game from timesplitters 2 for Xbox on which this game is based on. I have no artistic talent be it graphical or musical (as witnessed by my âgrassâ sprite