Difference between revisions of "DeBroglie"

From Robowiki
Jump to navigation Jump to search
m (multimode and rank links)
(Updated for 0.85)
Line 5: Line 5:
 
| author          = [[User:Tkiesel|Tkiesel]]
 
| author          = [[User:Tkiesel|Tkiesel]]
 
| extends        = [[AdvancedRobot]]
 
| extends        = [[AdvancedRobot]]
| targeting      = [[GuessFactor Targeting (traditional)|GuessFactor]]
+
| targeting      = [[Dynamic Clustering]] with [[Waves/Precise_Intersection|precise intersection]]
| movement        = [[Multi-Mode]]:
+
| movement        = [[Random Movement]]
*[[Wave_Surfing/GoTo_Surfing|GoTo wave surfing]]
+
| current_version = 0.85
*[[Oscillator_Movement|Oscillator]]
+
| released        = 26 April 2012
| current_version = 0.66
 
| released        = 13 October 2010
 
 
| best_rating    = [[RumbleArchives:RoboRumble_20101129|274th]]
 
| best_rating    = [[RumbleArchives:RoboRumble_20101129|274th]]
 
| license        = [[RWPCL]]
 
| license        = [[RWPCL]]
Line 33: Line 31:
 
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 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.
+
Information is gathered in a kd-tree, courtesy of [[User:Rednaxela/kD-Tree|Rednaxela's open source kd-tree]] implementation. The Universe feeds information to the Eyes, Wheels, and Gun which are radar, movement, and targeting respectively.
  
=== WavePredictor ===
+
== Gun ==
  
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.
+
Writing [[Waves/Precise_Intersection|precise intersection]] from scratch was a fun adventure. The code is atrocious looking to a professional, I'm sure, but it was a fun puzzle!  Right now, DeBroglie uses a naive [[Maximum_Escape_Angle|escape angle]] calculation. A major priority in improving the gun is to fix that!
  
The WavePredictor handles all firing of Waves and data collection. The relevant WavePredictor can be queried by the Wheels and Sword.
+
As of 0.85 the gun is a step forward in data gathering, courtesy of the Dynamic Clustering, but a step back in sophistication regarding choosing the best fire angle and deciding whether or not to fire.  Bringing those elements back up to par are a major priority.
  
== Wheels (movement) ==
+
== Wheels (Placeholder Movement) ==
  
When there are hostile waves in the air, deBroglie uses [[Wave_Surfing/GoTo_Surfing|GoTo wave surfing]] movement, randomly picking a point that is within a certain percentage range of the safest point on the wave.
+
The movement right now is [[User:PEZ|PEZ]]'s [[Aristocles]] movement, until I finish writing the targeting and move on to defense.
  
When no waves are in the air, or when too close to effectively surf, deBroglie uses the old oscillator movement 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, and rams aggressively.
+
== Eyes ==
  
== Sword (targeting) ==
+
A [[One_on_One_Radar#Turn_Multiplier_Lock|turn multiplier lock]] radar with a factor of 1.95.
 
 
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.
 
 
 
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 5% 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. If there is no firing solution that is expected to generate positive points, the robot doesn't fire.
 
 
 
== Eyes (radar) ==
 
 
 
[[One_on_One_Radar#Narrow_lock|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 =
 
= Code =

Revision as of 19:38, 26 April 2012

Sub-pages:
/Version History
deBroglie
Author(s) Tkiesel
Extends AdvancedRobot
Targeting Dynamic Clustering with precise intersection
Movement Random Movement
Released 26 April 2012
Best Rating 274th
Current Version 0.85
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.

Information is gathered in a kd-tree, courtesy of Rednaxela's open source kd-tree implementation. The Universe feeds information to the Eyes, Wheels, and Gun which are radar, movement, and targeting respectively.

Gun

Writing precise intersection from scratch was a fun adventure. The code is atrocious looking to a professional, I'm sure, but it was a fun puzzle! Right now, DeBroglie uses a naive escape angle calculation. A major priority in improving the gun is to fix that!

As of 0.85 the gun is a step forward in data gathering, courtesy of the Dynamic Clustering, but a step back in sophistication regarding choosing the best fire angle and deciding whether or not to fire. Bringing those elements back up to par are a major priority.

Wheels (Placeholder Movement)

The movement right now is PEZ's Aristocles movement, until I finish writing the targeting and move on to defense.

Eyes

A turn multiplier lock radar with a factor of 1.95.

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.