# Relativity

Robo Home | Changes | Preferences | AllPages

No diff available--this is the first major revision. (no other diffs)
Relativity is an old bot. There should be some old versions lying around on RobocodeFanatics? or the RobocodeRepository Relativity3_7 is the "official" Relativity, later versions I have not really put my heart into because I developed Saturn on my "comeback" to robocoding.

Relativity3_7 was for a while second best after Rapture in melee, but was also a good one-on-one bot. Just when I was starting to beat Rapture at one-on-one, Wolverine appeared. That made me realize I either had to put in a lot more hours or take a break from robocoding.

#### How does it move?

The first bot to use AntiGravity movement Also uses a weaving movement very distantly related to Crazy

#### How does it fire?

Keeps a log of incremental moves (deltas) made by the opponents. Selects a starting point at random and happily assumes the opponent will use the exact same sequence of moves. Very robust, it averages out to shoot at the most probable position (at least that is the theory). Uses "desired time to hit" as a trimming factor for firing. This factor is decreased when I miss, increased when I hit.

#### How does it dodge bullets?

Tried to introduce bullet dodging, but I think I disabled it because I found it made my movement less random.

#### How does the melee strategy differ from one-on-one strategy?

AntiGravity movement in melee, weaving movement in one-on-one Much more conservative firing in melee

#### How does it select a target to attack/avoid in melee ?

Stores a "danger value" for each opponent based on the total bullet power it has hit me with. This then goes in as the mass in the gravity calculation (mass divided by distance-squared)

#### What does it save between rounds and matches?

In the then existing version of Robocode it saved movement logs and danger values, plus the current time-factor for firing between rounds.

#### Where did you get the name?

I thought Relativity fit well with AntiGravity

#### Can I use your code?

Sure. Just try to understand what it does. A little mention of where you got the inspiration would be appreciated, but I realize that eventually things become so common-knowledge that it might be ridiculous.

#### What's next for your robot?

No future plans for this bot, but you never know...

#### What other robot(s) is it based on?

Strategic? and CrazierTimes2?

-- tobe

Robo Home | Changes | Preferences | AllPages