TimFoden (tcf) |
Tim Foden (tcf) |
http://www.7sun.com/robocode/tcf.Drifter_1.jar http://www.7sun.com/robocode/tcf.Drifter_2.jar |
How competitive is it?Drifter 1 -- 1759 after 1358 matches. Drifter 2 -- 1774 after 1741 matches. |
http://www.7sun.com/robocode/robots/tcf.Drifter_20.jar |
How does it move? |
How competitive is it? |
Version 1: |
Roborumble rating: Drifter 20 -- 1965 after 2047 matches. |
Its a GoTo type of bot, with Shrapnel Surfing against HOT and Linear predicted bullets. Both bullets are avoided, and there is no learning to find if it's better do dodge one or the other. |
For ratings for older versions, and for results in various challenges, see the /Results? page. |
The arena area is divided up with a 25 pixel grid. The grid points closest to the centre of all opponents are initialised with a value of 1. A flood fill algorithm is then used to set all adjacent points to 2. This is then repeated with 3, and so on, until the whole grid is filled. Thus this gives an idea of where on the grid is close to and where is far from all opponents. |
How does it move? |
It also models the predicted bullets as points to avoid on the grid (initialised to 1), as well as the points half way between each of the opponents. |
Before version 20, Drifter was a GoTo type of bot, with Shrapnel Surfing against HOT, Linear, Circular and GuessFactor predicted bullets. |
Points near opponents are set to -99999999, so as to avoid hitting them. Points near bullets are set to -10000, but these are dynamic... i.e. They move depending on the simulation time in the search. |
Version 20 changed this to remove the Shrapnel, and to directly "surf" the GuessFactor data. It makes up guess factor data for the HOT, Linear and Circular predicted bullets, and basically does a simple form of CrowdTargetting to merge it's buffers into one. |
It then does a search for the path with the highest value. This search basically tries each valid destination (-8..8, -8..8) around Drifter, models how the robot would move to get to this point, and adds up the grid scores for each tick. This search process is what makes this version such a SlowBot. |
The arena area is divided up with a 25 pixel grid. The grid points are initialised by setting some of the points to 1. These points are: the points closest to the centre of each opponent, and the points halfway between each opponent. A flood fill algorithm is then used to set all adjacent points to 2. This is then repeated with 3, and so on, until the whole grid is filled. Thus this gives an idea of where on the grid is close to and where is far from all dangerous places to be (higher numbers are better.) |
Version 2: |
After the fill algorithm has completed, points near opponents are set to -999999, so as to avoid hitting them. |
This version adds learning to the bullet types to dodge. It only dodges the bullet type with the highest weighting. This is in preparation to introducing a GF based opponent bullet. |
It then does a search for the path with the highest value. |
Also, instead of searching a 17x17 square (329 points) it searches only 21 points from that square (successive diamond shapes where manhattan distance = {0, 4, 8}, and only even points (-8, -6, -4, -2, 0, etc.) This makes the search only slightly worse (I suspect this only shows for opponents that like to get close up -- Drifter has trouble running away.) |
It searches only 37 points from an (-8..8, -8..8) square. The point are (successive diamond shapes where manhattan distance = {0, 4, 8, 12}, and only even points (-8, -6, -4, -2, 0, etc.) |
This results in the increased the efficiency of the path search algorithm for this version, so it's now not quite such a SlowBot. |
Fot each point to be searched, Drifter models how the robot would move to get to this point, and adds up the grid scores for each tick. The score for each tick also includes a negative bonus for points intersecting parts of a wave. |
VisitCountStats (27 sectors) GuessFactor gun, segmented on relative heading (/45 deg) and distance (/250). |
A DynamicClustering GuessFactor gun (with 31 sectors). The available angle ahead and behind is calculated using a simple lateral acceleration model to predict reality a little better than using the simple asin(8 / bulletSpeed). ||Version | Segmentation | || 1..3 |relative heading (8 segs) |distance (4 segs)|| || 4 |lateral velociy (5 segs) |distance (4 segs)|| || 5 |abs lateral velocity (3 segs)|distance (6 segs)|| || 6..8 |abs lateral velocity (3 segs)|distance (6 segs)|lateral acceleration (3 segs)| || 11..13 |abs lateral velocity (3 segs)|distance (5 segs)|lateral acceleration (3 segs)| || 14..17 |abs lateral velocity (3 segs)|distance (5 segs)|lateral acceleration (3 segs)|distance ahead| Firepower: dist <= 100 -> 3 dist > 100 -> 2.5 max firepower = getEnergy() / 20 |
No difference. |
No difference at this time. |
Nope. It's too embarasing to put on public display! :) |
Nope. It's too embarrassing to put on public display! :) |
Improvements to movement. |
Improvements to anything that can be improved. :) |
Loads. |
Loads... For example (Drifter 13): ||Krabb.sliNk.Garm 0.9rb |-22.7| ||abc.Tron 2.02 |-25.5| ||areb.Union 1.06 |-20.3| ||chase.na.Seraphim 0.052c |-34.2 !!| ||cx.micro.Smoke_0.96 |-25.5| ||intruder.PrairieWolf 2.61 |-29.7 !!| ||voidious.mini.Komarious 1.78b |-20.7| ||mladjo.Grrrrr 0.9 |-19.2| |
Hey, I suggest you segment your gun slightly differently. First things to try are LateralVelocity (3 - 5 segments) and distance ( 5-7 segments,). Next useful is probably acceleration (accelerating, constant velocity, decelerating - make sure to use absolute values of velocity! =) ), then something like time-since-deceleration or time-since-lateral-direction-change. But don't take this as gospel, you might find your own combination that works really well =) -- Skilgannon Thanks for the comment. I'll certainly be looking into making my gun better at some point. As you've noticed... at the moment it's pretty basic! :) I literally just made it the simplest thing that could learn to hit SpinBot. Since then, I've just been working on the movement. I've got it doing pretty well on the (original -- read easy) WaveSurfingChallenge BTW :) I'll post some results at some point in the future. But your suggestion will be noted well, and in fact, I can probably use it in the movement, to get my GF based avoidance working. -- Tim Foden * [update] Ok, I refactored my code a bit, so that now any changes to the GuessFactor code works for both the gun and for the shapnel, and I changed the segmentation to use lateral velocity (for v4). This version did better than v3 by about 40 points in the RR. -- Tim Foden |