From RoboWiki
< User:Pedersen(Redirected from Hubris)
Jump to: navigation, search

Hubris is the wanton humiliation of an opponent. In modern times, it is used to mean arrogance and exaggerated pride. In the context of Robocode, it has several applications. A high rating in the Roborumble is achieved not simply by defeating your opponents, but by utterly annihilating them. It is also not uncommon for bot authors to send a bot to the competition without basic testing for errors. And finally I don’t think any of us have devoted so much time to Robocode without telling ourselves that the top spot is rightfully ours, and we but need to reach forth to grasp it from the charlatans who have usurped the throne.

I have christened this tank thus to remind me to test exhaustively, that I may in time truly pound the snot out of the weak and give what for to the rest.

Subsections: /Workshop



  • Redesigned physics model. The storage of points, directions, magnitudes, and their various combinations has been revamped. The main purpose of this was to ensure that entities that are presumed to not change over time were not being changed over time. For example, if you associate an opponent data snapshot with a wave and then update the opponent data with a later scan, you don’t want the wave’s data updated. My previous implementation allowed for such mistakes to occur, which are very difficult to detect.
  • Emphasis on graphical debugging. New features and old are being tested with graphical representations of the data involved before the logic is implemented. By knowing that I am collecting and manipulating the data correctly, the writing and testing of the logic is easy.
  • Redesign of movement engine. Movement has always been a bit sketchy for my tanks. My first implementation was simply to bounce off walls at 45 degrees without hitting them, which worked marvelously in melee for some reason. Then I created a vector-based movement system, which allowed multiple movement methodologies to coexist. Eventually I modified it to attempt to reach a position in the least amount of time, but it never really worked satisfactorily, especially with wall avoidance. The new version finds the best transition between two snapshots: the present position, heading, and velocity, and a final position, heading, and velocity.
  • Reintroduction of team support. Hat Tourney style communication support is to be implemented. Team strategy will be implemented in order to have something to communicate other than just opponent and bullet data. The ability to act upon communications, and determining when to act upon them, will also be added.

Weapons Platform

Each opponent has an array of weapons associated with them. These weapons track overall performance statistics and, in the case of wave-based guns, records of 'guess-factor' hits and performance statistics for each segmentation slice.

My present default gun selection is a set of wave-based 'guess-factor' guns that follow a progression in segmentation. These segments were chosen based on performance against the TC2K6 opponents, primarily CassiusClay, GrubbmGrb, and Butterfly. Each segment is divided into 5 slices, except for bullet flight time, which is 10.

  • Gun 1: Lateral Velocity (5 slices total)
  • Gun 2: Gun 1 + Closing Velocity (25 slices total)
  • Gun 3: Gun 2 + Clockwise and Counter-Clockwise Distance To Wall (625 slices total)
  • Gun 4: Gun 3 + Bullet Flight Time (6250 slices total)
  • Gun 5: Gun 4 + Shots Since Last Full Stop (31259 slices total)
  • Gun 6: Gun 4 + Shots Since Last Reversal (31259 slices total)

Each slice contains a bin of 201 double values, ranging in effective value from -1.1 to 1.1. Doing a bit of math, on the above gun loadout, that's 59523 segment combinations, for 11964123 bin values. Initializing the gun array upon scanning an opponent for the first time was causing me to skip about 50 turns, so I adapted it to only initialize a segment and its bins (and performance statistics) when the scenario is first encountered. Now no turns are skipped (Robocode v1.5.2, prior to CPU constant relaxing).

For each tick that a wave passes through an opponent, I measure the minimum and maximum angles that would have hit the opponents, and then I 'drape' this range across the bins for the original segment. This provides 3-4 (more or less depending on closing velocity) reads for each wave, quickly providing peaks to aim for.

Hat League Support

This bot is extends TeamRobot, and supports the Hat League's common Message Format. Not all communication is acted on (i.e. suggested opponents for scanner and targeting lock), but all message types are processed.
Pressing 'c' will toggle verbose team message confirmations, allowing other Hat League hopefuls to test pairing their bots with a bot they have not authored.

Runtime Visual and Console Debugging Toggles

Various debugging options can be toggled on the fly by key presses:

  • w: inbound, outbound, and teammate waves
  • v: virtual bullets
  • b: guess-factor gun bins
  • m: movement
  • s: scanner subsystem
  • t: turret subsystem
  • c: communication subsystem (confirms received messages)


  • Color Theme by Voidious. As my first (and hopefully last) act of outright theft from an open source bot, I have copied the color theme of Dookious. I imagine that a lot of meticulous effort went into its design, and that Voidous has a really good monitor, because on my 24" Gateway at home (which is creamy goodness), it looks really classy. Thank you, Voidious.
Personal tools