Difference between revisions of "DeBroglie"

From Robowiki
Jump to navigation Jump to search
m (Box data)
(A few updates, and an error correction)
Line 1: Line 1:
 +
; <nowiki>Sub-pages: </nowiki>
 +
: '''[[/Version History]]'''
 
{{Infobox Robot
 
{{Infobox Robot
 
| name            = [[deBroglie]]
 
| name            = [[deBroglie]]
Line 8: Line 10:
 
| released        = 28 October 2010
 
| released        = 28 October 2010
 
| best_rating    = 390
 
| best_rating    = 390
 +
| license        = [[RWPCL]]
 
}}
 
}}
  
Line 46: Line 49:
 
== Sword (targeting) ==
 
== Sword (targeting) ==
  
Currently the bot uses a [[GuessFactor Targeting (traditional)|Guess Factor]] type of targeting system, though instead of angles, it segments on 18 pixel (1/2 bot) wide slices of the arc. The best bin for the current firing situation is determined, then converted into an angle for firing.
+
Currently the bot uses a [[GuessFactor Targeting (traditional)|Guess Factor]] type of targeting system. The best bin for the current firing situation is determined, then converted into an angle for firing.
  
By using all angle measurements in radians, this lets me use '''zero''' trig functions whatsoever in the angle-to-bin (when waves break) and bin-to-angle (when firing a bullet) calculations.
+
The best bin for each firepower is determined via a simple percentage hit rate, with heavier weighting for real waves over virtual waves and a 10% penalty to bins with no real waves whatsoever. The best score for each firepower is then converted into an [[wikipedia:Expected value|expected value]] of points, yielding the net point gain the bot should expect from firing the bullet.  The firing solution with the best expected point value is used.
  
Currently, the best bin is determined via a simple score, with heavier weighting for real waves over virtual ones to (hopefully) do better against wave surfing targets.
+
Right now there are some bugs in the scoring code, as the debug printouts are reporting some impossible expectation values now and again.
  
 
== Eyes (radar) ==
 
== Eyes (radar) ==
  
[[One_on_One_Radar#Narrow_lock|Narrow Lock]] radar with a factor of 2.0.
+
[[One_on_One_Radar#Narrow_lock|Narrow Lock]] radar with a factor of 1.95.
  
 
= Testing / Performance =
 
= Testing / Performance =
Line 62: Line 65:
 
= Code =
 
= Code =
  
This bot's code (messy a state as it's in right now) is available under the [http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribution-ShareAlike 3.0 Unported] license. You can grab it off of the [[RoboRumble/Participants|roborumble participants page]] until I get a Robocode Repository account going.
+
This bot's code (messy a state as it's in right now) is available under the [[RWPCL|RoboWiki Public Code License]] - Version 1.1 or any later version.
  
 
[[Category:Bots|DeBroglie]]
 
[[Category:Bots|DeBroglie]]
 
[[Category:1-vs-1 Bots|DeBroglie]]
 
[[Category:1-vs-1 Bots|DeBroglie]]
 
[[Category:Open Source Bots|DeBroglie]]
 
[[Category:Open Source Bots|DeBroglie]]

Revision as of 06:57, 12 November 2010

Sub-pages:
/Version History
deBroglie
Author(s) Tkiesel
Extends AdvancedRobot
Targeting GuessFactor
Movement Oscillator
Released 28 October 2010
Best Rating 390
Current Version 0.3
Code License RWPCL

Name

This is my first wave surfing bot, and I'm a physicist by training, so it's named in honor of Louis de Broglie, who discovered that matter has wavelike properties. This was a foundational discovery in Quantum Mechanics.

In honor of the namesake, all data collection is done in the form of waves. Waves emanate from the bot for targeting data, and from the enemy for movement data.

This bot is very much a work in progress.

Design

Goals

I wanted to gather waves to use as targeting information, both incoming waves from the enemy for movement, but also outgoing waves from de Broglie for targeting. I wanted to reuse as little code as possible, so I've been working on implementing the wave system in as modular a way as possible.

Universe

The bot has a Universe object which contains all elements of its picture of the battlefield, including two simple Bot objects, one for itself, and one for the enemy. The Bots are updated on every scan.

The Universe feeds information to the Eyes, Wheels, and Sword which are radar, movement, and targeting respectively.

WavePredictor

The universe has two WavePredictor objects, one from the perspective of de Broglie being fired upon by the enemy, and one from the perspective of the enemy being fired upon by de Broglie. The data available to the targeting WavePredictor is (of course) more precise than the data available to the movement WavePredictor, but other than this caveat, there is total symmetry in how data is handled.

The WavePredictor handles all firing of Waves and data collection. The relevant WavePredictor can be queried by the Wheels and Sword.

Wheels (movement)

My movement plans call for a GoTo wave surfing style movement, with a choice of "safe point" designed to flatten the profile as much as possible.

The details above are currently unimplemented. Right now, de Broglie uses an old sine wave based orbiter from my earliest ever Advanced bot. It uses a compound sine function to make the movement take longer for pattern matchers to get a lock on.

It will close or open distance to an orbiting band it feels comfortable in. If close enough, however, it goes for the ram damage.

Sword (targeting)

Currently the bot uses a Guess Factor type of targeting system. The best bin for the current firing situation is determined, then converted into an angle for firing.

The best bin for each firepower is determined via a simple percentage hit rate, with heavier weighting for real waves over virtual waves and a 10% penalty to bins with no real waves whatsoever. The best score for each firepower is then converted into an expected value of points, yielding the net point gain the bot should expect from firing the bullet. The firing solution with the best expected point value is used.

Right now there are some bugs in the scoring code, as the debug printouts are reporting some impossible expectation values now and again.

Eyes (radar)

Narrow Lock radar with a factor of 1.95.

Testing / Performance

Well, something's working right targeting-wise, because the current simple gun implementation can quickly learn sample bots like Walls and SpinBot. This tells me that I'm barking up the right tree so far.

Code

This bot's code (messy a state as it's in right now) is available under the RoboWiki Public Code License - Version 1.1 or any later version.