Difference between revisions of "DeBroglie"

From Robowiki
Jump to navigation Jump to search
m (rev0012)
m (Date, code credits, gun)
Line 8: Line 8:
 
| movement        = [[Random Movement]]
 
| movement        = [[Random Movement]]
 
| current_version = rev0012
 
| current_version = rev0012
| released        = 1 May 2012
+
| released        = 3 May 2012
 
| best_rating    = [[RumbleArchives:RoboRumble_20101129|274th]] (not updating until movement is written by me)
 
| best_rating    = [[RumbleArchives:RoboRumble_20101129|274th]] (not updating until movement is written by me)
 
| license        = [[RWPCL]]
 
| license        = [[RWPCL]]
 
}}
 
}}
  
= Name =
+
== 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.
 
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.
Line 21: Line 21:
 
This bot is very much a '''work in progress'''.
 
This bot is very much a '''work in progress'''.
  
= Design =
+
== Design ==
  
== Goals ==
+
=== 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.
 
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 ==
+
=== 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 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 [[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.
+
Information is gathered in a kD tree. The Universe feeds information to the Eyes, Wheels, and Gun which are radar, movement, and targeting respectively.
  
=== Segmentation ===
+
==== Segmentation ====
  
 
After a lot of annoying code digging every time I wanted to try a different way of segmenting/dimensioning my gathered data, I decided to put all of that code into a single static class.  All data segmenting about the current situation of the Bots is done via the Segmentation class.
 
After a lot of annoying code digging every time I wanted to try a different way of segmenting/dimensioning my gathered data, I decided to put all of that code into a single static class.  All data segmenting about the current situation of the Bots is done via the Segmentation class.
  
== Gun ==
+
=== Gun ===
  
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 gun uses precise prediction to gather angles that would have hit the enemy from each wave. Those angles are saved in the kD tree. To shoot, a histogram is generated from the k nearest situations, and the target is chosen from the histogram.  This means that DeBroglie doesn't use fixed bins at all.
 +
 
 +
Right now, DeBroglie uses a naive [[Maximum_Escape_Angle|escape angle]] calculation. A major priority in improving the gun is to fix that!
  
 
As of version 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.
 
As of version 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) ==
+
=== Wheels (Placeholder Movement) ===
  
 
The movement right now is [[User:PEZ|PEZ]]'s [[Aristocles]] movement, until I finish writing the targeting and move on to defense.
 
The movement right now is [[User:PEZ|PEZ]]'s [[Aristocles]] movement, until I finish writing the targeting and move on to defense.
  
== Eyes ==
+
=== Eyes ===
  
 
A [[One_on_One_Radar#Turn_Multiplier_Lock|turn multiplier lock]] radar with a factor of 1.95.
 
A [[One_on_One_Radar#Turn_Multiplier_Lock|turn multiplier lock]] radar with a factor of 1.95.
  
= Code =
+
== Code ==
 +
 
 +
=== License ===
 +
 
 +
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.
 +
 
 +
=== Credits ===
 +
All code written by others is under this or a more permissive license.
  
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.
+
*The kD tree is written by [[User:Rednaxela|Rednaxela]] and is [[User:Rednaxela/kD-Tree|available on this wiki]]. License: as-is with attribution.
 +
*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 a line segment and a circle intersect. License: [http://creativecommons.org/licenses/by-sa/3.0/us/ CC-by-sa 3.0]
  
 
[[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 21:57, 3 May 2012

Sub-pages:
/Version History
deBroglie
Author(s) Tkiesel
Extends AdvancedRobot
Targeting Dynamic Clustering with precise intersection
Movement Random Movement
Released 3 May 2012
Best Rating 274th (not updating until movement is written by me)
Current Version rev0012
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. The Universe feeds information to the Eyes, Wheels, and Gun which are radar, movement, and targeting respectively.

Segmentation

After a lot of annoying code digging every time I wanted to try a different way of segmenting/dimensioning my gathered data, I decided to put all of that code into a single static class. All data segmenting about the current situation of the Bots is done via the Segmentation class.

Gun

The gun uses precise prediction to gather angles that would have hit the enemy from each wave. Those angles are saved in the kD tree. To shoot, a histogram is generated from the k nearest situations, and the target is chosen from the histogram. This means that DeBroglie doesn't use fixed bins at all.

Right now, DeBroglie uses a naive escape angle calculation. A major priority in improving the gun is to fix that!

As of version 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

License

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.

Credits

All code written by others is under this or a more permissive license.