BuergyStrategy2: [ 12365 - 12605]
IvoBloechligerCornerHideStrategy: [ 10131 - 10388]
IliyaStrategy15: [ 5276 - 5448]
MariusSchwalbeSecondStrategy: [ 4895 - 5051]
JocelynThodeBeepBoopStrategy: [ 3454 - 3575]
SimonBrulhartAnotherStrategy: [ 3417 - 3541]
AliyaIbragimovaMyStrategy: [ 2726 - 2834]
GianlucaDemartiniShySnake3500Strategy: [ 1952 - 2007]
DjelleleddineDifallahScavengerStrategy: [ 934 - 987]
UlrichUltesNitscheWeiredStrategy: [ 843 - 883]
MariamDembeleCalibratorStrategy: [ 147 - 161]
MarcUldryFirstStrategy: [ 138 - 151]
On each playing field, the scores look a little bit different.
BuergyStrategy2: [ 17363 - 17909]
IvoBloechligerCornerHideStrategy: [ 14733 - 15407]
IliyaStrategy15: [ 7253 - 7785]
JocelynThodeBeepBoopStrategy: [ 6364 - 6723]
MariusSchwalbeSecondStrategy: [ 6098 - 6546]
SimonBrulhartAnotherStrategy: [ 5411 - 5792]
AliyaIbragimovaMyStrategy: [ 4650 - 4987]
DjelleleddineDifallahScavengerStrategy: [ 2204 - 2388]
GianlucaDemartiniShySnake3500Strategy: [ 1459 - 1577]
UlrichUltesNitscheWeiredStrategy: [ 971 - 1074]
MariamDembeleCalibratorStrategy: [ 574 - 626]
MarcUldryFirstStrategy: [ 540 - 588]
BuergyStrategy2: [ 15196 - 15738]
IvoBloechligerCornerHideStrategy: [ 12166 - 12803]
IliyaStrategy15: [ 6465 - 6952]
MariusSchwalbeSecondStrategy: [ 5604 - 5990]
SimonBrulhartAnotherStrategy: [ 4608 - 4912]
JocelynThodeBeepBoopStrategy: [ 4522 - 4810]
AliyaIbragimovaMyStrategy: [ 3469 - 3737]
GianlucaDemartiniShySnake3500Strategy: [ 1574 - 1695]
DjelleleddineDifallahScavengerStrategy: [ 923 - 1026]
UlrichUltesNitscheWeiredStrategy: [ 675 - 741]
MariamDembeleCalibratorStrategy: [ 90 - 109]
MarcUldryFirstStrategy: [ 87 - 106]
BuergyStrategy2: [ 12089 - 12508]
IvoBloechligerCornerHideStrategy: [ 9070 - 9552]
MariusSchwalbeSecondStrategy: [ 4891 - 5231]
IliyaStrategy15: [ 3695 - 3869]
SimonBrulhartAnotherStrategy: [ 2178 - 2321]
GianlucaDemartiniShySnake3500Strategy: [ 2141 - 2260]
JocelynThodeBeepBoopStrategy: [ 1980 - 2105]
AliyaIbragimovaMyStrategy: [ 1715 - 1836]
UlrichUltesNitscheWeiredStrategy: [ 806 - 893]
DjelleleddineDifallahScavengerStrategy: [ 686 - 754]
MariamDembeleCalibratorStrategy: [ 43 - 55]
MarcUldryFirstStrategy: [ 37 - 48]
BuergyStrategy2: [ 10918 - 11315]
IvoBloechligerCornerHideStrategy: [ 8026 - 8448]
IliyaStrategy15: [ 5164 - 5455]
MariusSchwalbeSecondStrategy: [ 4686 - 4969]
SimonBrulhartAnotherStrategy: [ 3247 - 3450]
JocelynThodeBeepBoopStrategy: [ 2786 - 2944]
AliyaIbragimovaMyStrategy: [ 2505 - 2665]
GianlucaDemartiniShySnake3500Strategy: [ 2261 - 2379]
UlrichUltesNitscheWeiredStrategy: [ 840 - 924]
DjelleleddineDifallahScavengerStrategy: [ 650 - 719]
MarcUldryFirstStrategy: [ 14 - 21]
MariamDembeleCalibratorStrategy: [ 12 - 19]
IvoBloechligerCornerHideStrategy: [ 6050 - 6342]
BuergyStrategy2: [ 5819 - 5998]
IliyaStrategy15: [ 3406 - 3576]
MariusSchwalbeSecondStrategy: [ 2777 - 2935]
GianlucaDemartiniShySnake3500Strategy: [ 2162 - 2289]
JocelynThodeBeepBoopStrategy: [ 1399 - 1510]
SimonBrulhartAnotherStrategy: [ 1384 - 1487]
AliyaIbragimovaMyStrategy: [ 1071 - 1165]
UlrichUltesNitscheWeiredStrategy: [ 804 - 899]
DjelleleddineDifallahScavengerStrategy: [ 113 - 142]
MariamDembeleCalibratorStrategy: [ 5 - 10]
MarcUldryFirstStrategy: [ 3 - 6]
Can a strategy know on which field it plays?
Not directly. There might be additional fields to the 5 fields provided (although the probability for this is low). Best you can do is compute a string representing the field in the constructor and comparing that string to stored strings to reliably identify individual fields. This allows you to tune your strategy to different field.
Is it possible / authorized to add variables in our strategy class, but outside the computeNextStep method?
Yes, of course, you may add any variable you please. I recommend initializing as much as possible in the constructor of the strategy. I recommend static memory structures to enhance speed.
Name your class FirstnameSurnameXXXXXXStrategy, like, for instance, IvoBloechligerSuperDuperStrategy.java. Send the Java-File by e-mail to Ivo Blöchliger. Also indicate, if your Strategy shall already be tested. Intermediate test results will be online publicly (scores and some selected gif-Files showing the last 20 iterations before your snake died). Your source code will not be published, of course.
You may also use another programming language that compiles for the JVM. However, I will not be able to spend much time getting your code to work. I recommend to send a dummy strategy to me, so I can test it. For the final submission provide a single jar-File containing everything your strategy needs to run. You must also provide the source code with instructions how to build your project.
| Field size | 40x30 |
| Number of goodies on field | 1 |
| Number of goodies until game over | 100 |
| Number of steps until game over | 3000 |
| Points for a goodie | 300 |
| Points for surviving until game over | 500 |
| Points for "killing" another snake | 1000 |
| Points for bumping into another snake or a wall | -500 |
| Points for suicide | -1000 |
| Length increase per goodie | 5 |
| Points earned per step | 1 |
At each step, every snake advances exactly one step in the direction computed by the method "computeNextStep()". If one cannot walk on the next field-element, the snake dies. Its tail continues to retract until the snake has vanished from the field.
A snake must move at each step (it cannot stand still), and it should not move backwards (it dies immediately since it crushes into itsself).
A snake starts at 0 points with length 5.
Each snake-element on the field has a counter, for how many more steps it remains on the field (you can see this value with Element.getTimer()) That means, if a snake dies, its head stops to advance and its tail follows up until the whole snake disapears.
If a snake eats a goodie, the tail continues to advance until the position of the goodie, where it stays for 5 steps.
A snake A is "killed" by another snake B, if snake A bumps into the body of snake B.
If a snake bumps into itself, it is considered suicide.
If two snakes bump into each other head to head, both loose points and do not get points rewarded for killing another snake.
At each step, computeNextStep() is called once. No more than 20ms real time shall be spent! If a Strategy exceeds this time limit, its snake may die. Here is the exact procedure:
If unsure, you may measure time with
// at the beginning of your method
long timeStarted = System.nanoTime();
// do something
// check available time
if (System.nanoTime() - timeUsed > 1e6*19) {
// time is up, terminate as quickly as possible!
}
Strategies being caught in endless loops (i.e. not terminating for more than several seconds) will be permanently disqualified.
A snake dies if the next position is neither empty nor a goodie or if the next position would be occupied by two heads simultanously. Then both snakes die, of course.
A SecurityManager will be used to execute your methods. This SecurityManager does not allow anything, save for loading of an inner class. (So accessing private fields using reflection or any other funny business should be off the table now).
You are not allowed to create Threads. If you know of any practical way to enforce this or detect transgression, please let me know.
Basically stuff you've always wanted but you never dared to buy (most items include LEDs or remote controls, possibly both). I will keep posting pictures here as the stuff arrives. The fish is to be filled with Helium, it then can be piloted through the air. The helicopter still flies, despite my crashes.