Fijne vakantie! -- Jonathan |

by Vic Stewart

News - Chat - /OldDiscussion

Locke is a robot to test a targeting method I've been thinking about for a while. I won't be happy with it until it enters the RoboRumble top 15.

It uses Raiko's movement.

It uses a SelfOrganizingObservationLog? gun. When a wave hits, the Log records how far and in what direction the enemy has travelled since firing the wave. Along with that Observation, a number of situational parameters are stored. The Log is ordered in such a way that similar Observations will become neighbours. When aiming, the Log searches for such a neighbourhood of Observations and uses these to calculate the most likely future position of the enemy.

Well...ehm... ask Jamougha :-)

Melee? What's that?

Between matches: Nothing. Between rounds: the SOOL?.

From Orson Scott Card's book Ender's Game. Locke is the pseudonym of Ender's brother Peter.

Sure, just give the authors due credit, according to the Wiki License.

Just making the new SOOL gun work properly.

best rating: **1868**

v0.7.5.5 2004-08-28 RR:1857 radical tweaking of weights, removed 'towards wall, near corner' category v0.7.5.4 2004-08-27 RR:1857 reverted to 0.7.5.2, added FrontWallRatio and RearWallRatio dimensions v0.7.5.3 2004-08-17 RR:1856 removed no walls category special weightings v0.7.5.2 2004-08-17 RR:1868 reverted to 0.7.5, increased blind man's stick accuracy by taking velocity into account v0.7.5.1 2004-08-09 RR:1860 reverted to 0.7.4, different weights only for no walls category v0.7.5 2004-08-06 RR:1863 different weights for each category v0.7.4 2004-08-03 RR:1862 added blind man's sticks and Category dimension. Decreased TimeSinceLastVelChange weight. v0.7.3.1 2004-07-22 RR:1855 reverted to 0.7.1.2, very radically changed weights of dimensions v0.7.3 2004-07-22 RR:1838 reverted to 0.7.1.2, doubled weight of TimeSinceLastVelChange dimension v0.7.2.1 2004-07-22 RR:1841 segment size 9 v0.7.2 2004-07-19 RR:1843 reverted to 0.7.1.2, number of bins increased from 75 to 97 v0.7.1.4 2004-07-19 RR:1842 segment size 17 v0.7.1.3 2004-07-19 RR:1839 segment size 25 v0.7.1.2 2004-07-18 RR:1849 segment size 19 v0.7.1.1 2004-07-17 RR:1839 back to original search loop size, segment size reduced from 49 to 11 v0.6.9 2004-06-26 RR:1843 slightly more accurate search loop, completely removed post round rebalancing of the log v0.6.8.9 2004-06-26 RR:1843 Bulletpower 2.0 v0.6.8.8 2004-06-25 RR:1842 Bulletpower 1.9 v0.6.8.7 2004-06-23 RR:1835 Bulletpower 1.8 v0.6.8.6 2004-06-22 RR:1847 stop firing when <1 energy except when distance<140 v0.6.8.5b 2004-06-21 RR:1842 undoing 0.6.1 tweak that cost me 9 points v0.6.8.4 2004-06-21 RR:1840 getting rid of slowbot predicate v0.6.8.3 2004-06-20 RR:1845 conserving firepower when me or enemy are almost out of energy v0.6.8.2 2004-06-19 RR:1838 changed power 3 distance from 180 to 140 v0.6.8.1 2004-06-19 RR:1837 reverted to 0.6.6, Bulletpower 2.0 v0.6.7 2004-06-18 RR:1832 added MyHeading segmentation v0.6.6 2004-06-18 RR:1839 reduced RelativeHeading weight from 100 to 10 ^ without MusashiTrick -------------------- MS difference: 50 points exactly v with MusashiTrickbest rating:

v0.6.6 2004-06-17 RR:1889 reduced RelativeHeading weight from 100 to 10 v0.6.5 2004-06-17 RR:1889 reverted to 0.6.3, at the end of each round now re-inserts the oldest 1000 observations v0.6.4 2004-06-16 RR:1882 small tweak in log ordering: added some randomization to avoid 'bad streaks' v0.6.3 2004-06-13 RR:1890 reverted to 0.5.10.8, increased search loop size, fixed design error in log re-ordering algorithm v0.6.1 2004-06-11 RR:1879 reverted to 0.5.10.8, fixed design error in log re-ordering algorithm v0.6.0.1 2004-06-11 RR:1881 fixed two small bugs in new log searching algorithm v0.6 2004-06-11 RR:1877 new log searching algorithm v0.5.10.8 2004-06-10 RR:1888 the [[PEZ]] branch: restored the RelativeHeading segmentation axis v0.5.10.7 2004-06-10 RR:1876 the [[PEZ]] branch: fires waves every tick v0.5.10.6 2004-06-10 RR:1867 the [[PEZ]] branch: removed RelativeHeading segmentation dimension v0.5.10.5 2004-06-09 RR:1876 the [[PEZ]] branch: added lastVelocity segmentation dimension v0.5.10.4 2004-06-08 RR:1879 the [[PEZ]] branch: added Bullet Power segmentation dimension v0.5.10.3 2004-06-08 RR:1877 the [[PEZ]] branch: replaced TimeSinceLastDecelleration with TimeSinceLastVelocityChange dimension v0.5.10.2 2004-06-08 RR:1877 the [[PEZ]] branch: fixed small bug introduced in 0.5.10.1 v0.5.10.1 2004-06-07 RR:1877 the [[PEZ]] branch: reverted to 0.5.8; firepower = 1.9 except when d<180 fp=3 v0.5.9.2 2004-06-05 RR:1850 trying fixed segment size = 149 (was 49) v0.5.9.1 2004-06-05 RR:1871 trying fixed segment size = 15 (was 49) v0.5.8 2004-05-31 RR:1870 reverted to 0.5.4, fixed bug ETA differed from ATA, realigned waves (as in 0.4.1) v0.5.7 2004-05-29 RR:1863 reverted to 0.5.4, added Close Range fixedETA bulletpower calculation v0.5.6 2004-05-29 RR:1864 reverted to 0.5.4, increased firepower against weaker enemies v0.5.5 2004-05-28 RR:1864 time_since_last_decelleration segment parameter squared, decreased range to 70 v0.5.4 2004-05-28 RR:1870 reverted to 0.5, fixed a small bug, wall/corner/last_dec segment params now rooted v0.5.3 2004-05-27 RR:1866 reverted to 0.5, fixed a small bug and now fires and collects waves every tick v0.5.2 2004-05-27 RR:1859 reverted to 0.5, BulletETA and RelativeHeading dimension weights now 2 and 4 respectively v0.5.1 2004-05-27 RR:1860 increased weight of BulletETA dimension, again aligned waves v0.5 2004-05-26 RR:1868 updated to Raiko 0.43 movement, fixed the broken MusashiTrick v0.4.1 2004-05-18 RR:1813 fixed bug in wave alignment. v0.4.100 2004-05-11 RR:1820 increased weight of RelativeHeading dimension

I guess summer has struck again. Why robocoding when you can do fun stuff outside in the sun, right? Me too, but also I've been a little busy with work lately. Mind you, I have by no means retired.... I have some stuff up my sleeve yet! :-) --Vic

Version 1.7.5.2 is going good. Are you nervous? -- PEZ

No, not really. I am expecting at most a slight improvement. Like you, I also noticed it started out real good, but I saw that it caught a Scruchi-pu match and many top bot matches early on, which always boost my ratings. 58% against the current king does feel good I must admit :-) --Vic

Can you describe some how the Observations are compared? Are some situational parameters more important than others? How "deep" is a situation? And such. =) -- PEZ

Ok, I'll give you a sneak preview (I had planned to write a detailed desciption when I am happy with the gun):

The gun can basically be split in two major parts:

- filling the Log with data
- aiming

Filling the Log goes like this:

- a wave is fired every tick
- along with the wave situational parameters are stored
- an array of Situational parameters is called a Situation
- one situational parameter is called a Dimension

- along with the wave situational parameters are stored
- waves that hit the enemy are processed and removed from the wave manager
- the path the enemy travelled since firing the wave is stored in a pair of doubles:
- distance travelled
- angle travelled (0: straight forward, +-180: fully reversed, 90: 90 degreees clockwise, etc.)

- the Situation and the distance/angle data are combined into an Observation
- the Log searches for the index where the corresponding Situations match the Observation most closely
- the Log inserts the Observation using that index

- the path the enemy travelled since firing the wave is stored in a pair of doubles:

Aiming goes like this:

- the current Situation is assessed
- the Log searches for the index where the corresponding Situations match current Situation most closely
- the Log determines the positive and negative offset boundaries (resulting in a small subset of the Log)
- a GuessFactor array is prepared
- every Observation in this subset is processed for Multiple Choice using the GF bin:
- if the distance/angle travelled takes the Observation outside the battlefield it is discarded
- the distance/angle travelled is converted into a GuessFactor
- the GF is added to the corresponding GuessFactor bin (if the botwidth spans multiple GF bins, these will be filled as well)
- closer (more similar) Observations get a higher weight in the multiple choice

- the winning GF bin is converted back into a firing angle and returned

Searching the Log goes like this:

- an outer loop iterates through the Log in a maximum (currently 50) number of iterations
- in each iteration the Observation is compared with the given Situation
- the compare function returns a value: lower is more similar

- in each iteration the Observation is compared with the given Situation
- the closest Observation found by the outer loop is used for a finer search
- this finer search is done by an inner loop that iterates through +- 300 (currently) adjacent Observations

Comparing Situations goes like this:

- weights for all Dimensions are determined
- a loop iterates over each dimension
- the difference between the comparer and comparee (squared) is multiplied by the Dimension weight and added to the grand total

- the grand total is returned

Currently I am using 10 Dimensions, and I'm planning to add at least three more very soon. One of the advantages of this system is that there is practically no limit to the number of Dimensions you can use.

--Vic

Thanks! I had a hunch about the basic scheme it seems. I think my next gun will be in this style. Resin failed, but it has some similarities and might work as a start. Now, I guess I'll have some reading up to do on the MultipleChoice issue. I take it the Situations are built on state at the time of fire? -- PEZ

- Yes. About your next gun: it's great that you may build something similar. That way we can share experiences. --Vic

What are blind man's sticks? --Ph

It's a BlindMansStick. -- PEZ

Tomorrow morning I'm going on a three week holiday :-) To the sunny country of Italy! Hopefully I'll return relaxed and with a few good ideas to help Locke get to 1880+ points ;-). Secondly, I hope to really get started on my new movement system after this vacation. Thirdly, I'll be thinking about the 'other' targeting algorithm we've been busy with in the last few weeks and hopefully come up with something useful. See you then! --Vic

Fijne vakantie! -- Jonathan