Difference between revisions of "DeBroglie"

From Robowiki
Jump to navigation Jump to search
m (Grammar fixups, sword section additions)
m (rank update)
 
(43 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{Navbox small
 +
| title        = Sub-pages
 +
| page1        = Version History
 +
| page2        = Archived Talk 2010
 +
}}
 
{{Infobox Robot
 
{{Infobox Robot
 
| name            = [[deBroglie]]
 
| name            = [[deBroglie]]
 +
| image          = Broglie 7.jpeg
 +
| caption        = Louis de Broglie, winner of the 1929 Nobel Prize for Physics
 
| author          = [[User:Tkiesel|Tkiesel]]
 
| author          = [[User:Tkiesel|Tkiesel]]
 
| extends        = [[AdvancedRobot]]
 
| extends        = [[AdvancedRobot]]
| targeting      = [[Averaged_Bearing_Offset_Targeting|Orbit Offset]]
+
| targeting      = [[Dynamic Clustering|DC]] - [[GuessFactor|Guess Factors]]
| movement        = simple orbiter
+
| movement        = [[Dynamic Clustering|DC]] - [[Wave Surfing]]
| current_version = 0.2
+
| current_version = rev0108
| released        = 25 October 2010
+
| best_rating    = [[RumbleArchives:RoboRumble 20120723|31]]
| best_rating    = N/A
+
| download_link  = https://dl.dropboxusercontent.com/u/75978227/tjk.deBroglie_rev0108.jar
 +
| license        = [[ZLIB|zlib]]
 
}}
 
}}
  
= Name =
+
== Background Information ==
 
 
This is my first wave surfing bot, and I'm a physicist by training, so it's named in honor of [[wikipedia:Louis_de_Broglie|Louis de Broglie]], who discovered that matter has [[wikipedia:Matter_wave|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 every 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 [[Wave_Surfing/GoTo_Surfing|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.
+
; Where did you get the name?
 +
: This is my first wave surfing bot, and I'm a physicist by training, so it's named in honor of [[wikipedia:Louis_de_Broglie|Louis de Broglie]], who discovered that matter has [[wikipedia:Matter_wave|wavelike properties]]. This was a foundational discovery in Quantum Mechanics. In 1929 de Broglie received the first ever Nobel Prize given to a student thesis.
  
== Sword (targeting) ==
+
; What's special about it?
 +
: The targeting and movement draw on a central Universe object that contains the entire situational picture, with a Bot object that represents each robot on the field.
  
Currently the bot uses an [[Averaged_Bearing_Offset_Targeting|Averaged Bearing Offset]] 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.
+
; How competitive is it?
 +
: rev0108 is in the upper 40s in the [http://literumble.appspot.com/Rankings?game=roborumble RoboRumble] and middle of the pack in the [http://literumble.appspot.com/Rankings?game=gigarumble GigaRumble].
  
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.
+
== Strategy ==
  
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.
+
; How does it [[Movement|move]]?
 +
: [[Wave Surfing]], using data stored in [[Dynamic Clustering|a kD tree]] with [[Waves/Precise_Intersection|precise intersection]]. The algorithm is [[Wave Surfing/True Surfing|true surfing]] based on concepts in the [[Wave Surfing Tutorial|wave surfing tutorial]].
  
The design of the WavePredictor will allow Sword to easily implement a [[Virtual_Guns|virtual guns]] style system, especially an [[Anti-Surfer_Targeting|anti-surfer]] system, since deBroglie will use the exact same class to surf enemy waves as it uses to target with its own waves. In other words, adding a "shoot where a wave surfer would go" method is going to be essentially already done once my bot actually surfs waves in the first place.  This is what I'm looking forward to in terms of the symmetry of the design: if I implement [[True_Surfing|true wave surfing]] as a movement, I can also immediately shoot at it!
+
; How does it fire?
 +
: [[GuessFactor Targeting]] using [[Dynamic Clustering|a kD tree to store data.]] [[Waves/Precise_Intersection|Precise intersection]] is used to determine the fire angles that would have hit. Several different targeters are used in a [[Virtual Guns]] array. The best gun to use is chosen via a [[wikipedia:Condorcet method|Condorcet]] vote.
  
== Eyes (radar) ==
+
; What does it save between rounds and matches?
 +
: Nothing between matches. Between rounds all surfing and targeting data is saved.
  
[[One_on_One_Radar#Narrow_lock|Narrow Lock]] radar with a factor of 2.0.
+
== Additional Information ==
  
= Testing / Performance =
+
; Can I use your code?
 +
: DeBroglie is an open source bot available under the [[ZLIB|zlib license]]. A few files here and there have an extra clause attached.
  
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.
+
; What's next for your robot?
 +
: Nothing. Development on deBroglie has ended. A few big chunks of the code will live on in [[User:Tkiesel/Copernicus|Copernicus]].
  
= Code =
+
; What other robot(s) is it based on?
 +
: All code written by others is under some form of permissive open source license.
  
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.
+
:*The [https://bitbucket.org/rednaxela/knn-benchmark kD tree] is written by [[User:Rednaxela|Rednaxela]]. License: as-is with attribution.
 +
:*The [[User:Rednaxela/FastTrig|FastTrig lookup table and methods]] are written by a host of amazing folks at this wiki, starting with [[User:Rednaxela|Rednaxela]], but including [[User talk:Rednaxela/FastTrig|other great Robocode luminaries]].
 +
:*Parts of the precise prediction are accomplished with the help of [http://www.openprocessing.org/visuals/?visualID=8009 code] originally by [http://local.wasp.uwa.edu.au/~pbourke/geometry/sphereline/raysphere.c Paul Bourke], adapted by [http://www.openprocessing.org/portal/?userID=54 REAS @ OpenProcessing.org] and further adapted by me. This code determines if and where a line segment and a circle intersect. License: [http://creativecommons.org/licenses/by-sa/3.0/us/ CC-by-sa 3.0]
 +
:*The gun ranking uses [http://code.google.com/p/voteutil/ voteutil] by Brian Olson. It is available under the [http://www.gnu.org/licenses/lgpl.html LGPL version 3].
 +
:*The movement uses the wonderful setBackAsFront() method from [[User:Voidious|Voidious']] [[Wave Surfing Tutorial]]. Great piece of code!
  
 
[[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]]
 +
[[Category:MegaBots|DeBroglie]]

Latest revision as of 19:03, 18 November 2014

Sub-pages:
Version History - Archived Talk 2010
deBroglie
Broglie 7.jpeg
Louis de Broglie, winner of the 1929 Nobel Prize for Physics
Author(s) Tkiesel
Extends AdvancedRobot
Targeting DC - Guess Factors
Movement DC - Wave Surfing
Best Rating 31
Current Version rev0108
Code License zlib
Download

Background Information

Where did you get the 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 1929 de Broglie received the first ever Nobel Prize given to a student thesis.
What's special about it?
The targeting and movement draw on a central Universe object that contains the entire situational picture, with a Bot object that represents each robot on the field.
How competitive is it?
rev0108 is in the upper 40s in the RoboRumble and middle of the pack in the GigaRumble.

Strategy

How does it move?
Wave Surfing, using data stored in a kD tree with precise intersection. The algorithm is true surfing based on concepts in the wave surfing tutorial.
How does it fire?
GuessFactor Targeting using a kD tree to store data. Precise intersection is used to determine the fire angles that would have hit. Several different targeters are used in a Virtual Guns array. The best gun to use is chosen via a Condorcet vote.
What does it save between rounds and matches?
Nothing between matches. Between rounds all surfing and targeting data is saved.

Additional Information

Can I use your code?
DeBroglie is an open source bot available under the zlib license. A few files here and there have an extra clause attached.
What's next for your robot?
Nothing. Development on deBroglie has ended. A few big chunks of the code will live on in Copernicus.
What other robot(s) is it based on?
All code written by others is under some form of permissive open source license.