Notice: Undefined index: template in /var/www/vhosts/gamesfleadh.ie/httpdocs/wp-content/plugins/flickr-badges-widget/template.php on line 146

Resources – Robocode

SentryBot code

Robocode 2017 official version

 

SentryBot behaviour used for Robocode Ireland 2017 Competition

Robocode for 2014 was redesigned so that a robot receives no energy or points for hitting the SentryBot, this approach will be used for 2017

Flemming Larsen (maintainer of Robocode) and Dr Liam Noonan (LIT Tipperary) have been working on Robocode to encourage teams to develop robots that utilise a strategy for movement and attacking.
A trend had developed over the past few years of walls within walls robots that use linear movements to move around the screen. Other trends included using the Sentry robot as an energy and points bank so as to achieve a higher score.

In 2014 we implemented a new BorderSentry class to achieve this which uses the idea of a BorderArea (coloured red) which allows the SentryBot to cause damage to robots. If the robots are in the “safe zone” (coloured blue) the SentryBot bullets do not cause any damage. We recommend a safe zone of 100×100 in the middle of the screen which implies a border area of 300. The safe zone concept only applies to bullets from the SentryBot.

Robocode can be downloaded directly from the Robocode web site the version we will use for 2017 is 1.9.2.6.

The SentryBot should be placed in c:\robocode\robots\sentry. SentryBot (you will need to extract the zip file and copy the robot to the folder c:\robocode\robots\sentry)

You also need to configure inside Robocode the Options->Preferences sub menu to show the Sentry Border Area (in red) . Tick the box beside the option Visible Sentry Border

The Robocode Arena for 2015 has the following properties:

Battlefield Size – 800×800

Sentry Border Size 300

The new SentryBot has the following properties:

  • Spawns randomly along the edge and does not move
  • Robots receive no energy or points for hitting it
  • If a robot is in the safe zone when hit by the SentryBot bullet it receives no damage
  • Utilises linear targeting, this means that robots that move in straight lines will be easy targets, robots that move in random directions, curves or parabolas will be difficult targets
  • Target Acquisition Algorithm (lines 392 to 438)
    • Set the target robot to be the one that exhibits the largest change in X or Y from the previous scan
    • Each robot has a delta value which is either the change in X or Y (whichever is larger)
    • maxDelta decides which robot becomes the target
    • If a robots delta is greater than maxDelta it becomes the new target
    • Robots inside safe zone will not be damaged by fire from the sentry robot