Difference between revisions of "Diamond"

From Robowiki
Jump to navigation Jump to search
m (links to displacement vector)
m (misc info update)
Line 6: Line 6:
 
| targeting      = [[Dynamic Clustering|Dynamic Clustering]], [[Displacement Vector|Displacement Vectors]]
 
| targeting      = [[Dynamic Clustering|Dynamic Clustering]], [[Displacement Vector|Displacement Vectors]]
 
| movement        = [[Minimum Risk Movement|Minimum Risk Movement]], [[Dynamic Clustering|DC]]/[[GuessFactor|GF]]-[[Wave Surfing|Wave Surfing]]
 
| movement        = [[Minimum Risk Movement|Minimum Risk Movement]], [[Dynamic Clustering|DC]]/[[GuessFactor|GF]]-[[Wave Surfing|Wave Surfing]]
| current_version = 1.392
+
| current_version = 1.41
 
| license        = [[RWPCL]]
 
| license        = [[RWPCL]]
| download_link  = http://www.dijitari.com/void/robocode/voidious.Diamond_1.392.jar
+
| download_link  = http://www.dijitari.com/void/robocode/voidious.Diamond_1.41.jar
 
| isOpenSource    = yes
 
| isOpenSource    = yes
 
| isMelee        = yes
 
| isMelee        = yes
Line 26: Line 26:
 
|    
 
|    
 
|
 
|
* It's my first [[Melee]] [[MegaBot]].
+
* It's the [[Melee]] King! For now... =)
* The gun is just a tiny bit different than most [[Dynamic Clustering]] guns.
+
* The gun uses [[Displacement Vector|displacement vectors]].
 
* It has pretty debugging graphics.
 
* It has pretty debugging graphics.
 
|}
 
|}
  
 
; How competitive is it?
 
; How competitive is it?
: Currently #4 in 1v1 and #1 in Melee (barely).
+
: Currently the Melee king and #3 in 1v1.
  
 
== Strategy ==
 
== Strategy ==
Line 48: Line 48:
 
: The gun uses Dynamic Clustering for data analysis - i.e., [http://en.wikipedia.org/wiki/K-nearest_neighbor_algorithm k-nearest neighbors] to find similar states, and [http://en.wikipedia.org/wiki/Kernel_density_estimation kernel density] among those states to settle on a firing angle. It uses [[Displacement Vector|displacement vectors]] for recording and reconstructing firing angles. It fires a [[Waves|wave]] for each scan and records the vector the enemy traveled along (interpolating missed scans, if necessary), relative to his initial heading and divided by bullet ticks. To reconstruct a firing angle, it applies one of these vectors to the enemy's current location, heading, and distance (bullet ticks). I thought this made more sense for [[Melee]] than [[GuessFactor|GuessFactors]], and it's a lot simpler and more efficient than real play-it-forward.
 
: The gun uses Dynamic Clustering for data analysis - i.e., [http://en.wikipedia.org/wiki/K-nearest_neighbor_algorithm k-nearest neighbors] to find similar states, and [http://en.wikipedia.org/wiki/Kernel_density_estimation kernel density] among those states to settle on a firing angle. It uses [[Displacement Vector|displacement vectors]] for recording and reconstructing firing angles. It fires a [[Waves|wave]] for each scan and records the vector the enemy traveled along (interpolating missed scans, if necessary), relative to his initial heading and divided by bullet ticks. To reconstruct a firing angle, it applies one of these vectors to the enemy's current location, heading, and distance (bullet ticks). I thought this made more sense for [[Melee]] than [[GuessFactor|GuessFactors]], and it's a lot simpler and more efficient than real play-it-forward.
 
: I'm also experimenting with a [[wikipedia:k-means clustering|k-means clustering]] gun that I'm calling [[TripHammer]].
 
: I'm also experimenting with a [[wikipedia:k-means clustering|k-means clustering]] gun that I'm calling [[TripHammer]].
 
; How does the [[Melee|melee]] strategy differ from [[One on One|one-on-one]] strategy?
 
: It switches to a Wave Surfing movement in 1v1 scenarios and switches to a different set of weights in the gun.
 
  
 
; How does it select a target to attack/avoid in [[melee]]?
 
; How does it select a target to attack/avoid in [[melee]]?
 
: As of 1.30, it no longer does. It aims at everyone on the battle field at once and tries to hit as many enemies as possible. (Big thanks to [[Shadow/Melee Gun]] for the excellent idea.)
 
: As of 1.30, it no longer does. It aims at everyone on the battle field at once and tries to hit as many enemies as possible. (Big thanks to [[Shadow/Melee Gun]] for the excellent idea.)
 +
 +
; How does the [[Melee|melee]] strategy differ from [[One on One|one-on-one]] strategy?
 +
: In 1v1, it switches to a Wave Surfing movement and switches to its 1v1 [[Virtual Guns]].
  
 
; What does it save between rounds and matches?
 
; What does it save between rounds and matches?
Line 67: Line 67:
  
 
; What's next for your robot?
 
; What's next for your robot?
: An honest attempt at claiming the [[Melee]] throne. =) I'm going to try not to let myself get too distracted with the 1v1 performance or the gun, but we'll see what happens.
+
: Melee: throne defense. 1v1: overtaking [[Dookious]] for #2, then contemplating the long, hard climb up towards [[DrussGT]].
  
 
; Does it have any [[White Whale|White Whales]]?
 
; Does it have any [[White Whale|White Whales]]?
: [[Shadow]], of course. I can't believe how fricken amazing that bot is in Melee.
+
: [[Shadow]], [[Portia]], and [[Glacier]] all want the melee throne, and pose the biggest threats in battles. In 1v1, [[Pris]] really gives it a whooping, along with all the other usual suspects: [[Shadow]], [[YersiniaPestis]], [[DrussGT]], and [[Phoenix]].
  
 
; What other robot(s) is it based on?
 
; What other robot(s) is it based on?
: For the most part, I tried to start with a clean slate on this one. But I did cull some ideas from the wiki and some code from some of my other bots, so I'll just run down a list of credits.
+
: I tried to start with a clean slate on this one. But I did cull some ideas from the wiki and some code from some of my other bots, so I'll just run down a list of credits.
 
:* [[BrokenSword]] - General guidance on various things, especially the minimum risk movement and bullet power management.
 
:* [[BrokenSword]] - General guidance on various things, especially the minimum risk movement and bullet power management.
:* [[Dookious]] - Diamond is using a slightly stripped down version of the Wave Surfing from Dookious, along with a variety of utility functions, including [[Precise Prediction|precise prediction]] code (itself based on [[User:Albert|Albert]]'s [[FuturePosition]]).
+
:* [[Dookious]] - Diamond's 1v1 movement was directly ported from the Wave Surfing of Dookious, along with a variety of utility functions, including [[Precise Prediction|precise prediction]] code (itself based on [[User:Albert|Albert]]'s [[FuturePosition]]).
 
:* [[Lukious]] - The tiniest bit of kernel density code and general guidance on scan distancing.
 
:* [[Lukious]] - The tiniest bit of kernel density code and general guidance on scan distancing.
 
:* [[HawkOnFire]] - I never did peek at the code, but it deserves a nod just for the wisdom [[User:rozu|rozu]] shared about minimum risk movement via this bot.
 
:* [[HawkOnFire]] - I never did peek at the code, but it deserves a nod just for the wisdom [[User:rozu|rozu]] shared about minimum risk movement via this bot.

Revision as of 15:26, 26 September 2009

Diamond
Diamond collage thumb200.png
Full Size
Author(s) Voidious
Extends AdvancedRobot
Targeting Dynamic Clustering, Displacement Vectors
Movement Minimum Risk Movement, DC/GF-Wave Surfing
Current Version 1.41
Code License RWPCL
Download
Sub-pages:
Version History - Code - DiamondHawk
Youtube
Youtube has a video of Diamond in action: click here to watch

Background Information

What's special about it?
   
How competitive is it?
Currently the Melee king and #3 in 1v1.

Strategy

How does it move?
It uses a Minimum Risk Movement, evaluating a bunch of points around itself and choosing the "safest" (least bad / most good) one. I'm still (endlessly, perhaps) tweaking the parameters, but some of the elements are:
  • Considers points in a (randomized radius) circle around itself.
  • Stay far away from other bots, weighted by their energy.
  • Stay perpendicular to other bots.
  • Don't be the closest bot to any other bots (avoid being targeted).
  • Some randomizing based on past locations.
In 1v1, it uses Wave Surfing (algorithm derived from Dookious) with Dynamic Clustering for data analysis.
How does it fire?
The gun uses Dynamic Clustering for data analysis - i.e., k-nearest neighbors to find similar states, and kernel density among those states to settle on a firing angle. It uses displacement vectors for recording and reconstructing firing angles. It fires a wave for each scan and records the vector the enemy traveled along (interpolating missed scans, if necessary), relative to his initial heading and divided by bullet ticks. To reconstruct a firing angle, it applies one of these vectors to the enemy's current location, heading, and distance (bullet ticks). I thought this made more sense for Melee than GuessFactors, and it's a lot simpler and more efficient than real play-it-forward.
I'm also experimenting with a k-means clustering gun that I'm calling TripHammer.
How does it select a target to attack/avoid in melee?
As of 1.30, it no longer does. It aims at everyone on the battle field at once and tries to hit as many enemies as possible. (Big thanks to Shadow/Melee Gun for the excellent idea.)
How does the melee strategy differ from one-on-one strategy?
In 1v1, it switches to a Wave Surfing movement and switches to its 1v1 Virtual Guns.
What does it save between rounds and matches?
Nothing between matches. Between rounds, it saves all its targeting and movement data, which includes general info about each enemy, a bunch of kd-trees, and maps of the trees' data points to displacement vectors (gun) and GuessFactors (movement).

Additional Information

Where did you get the name?
Diamond is the ex-superhero name of the main character in Powers, my favorite comic book series. That's how it initially occurred to me, as I like to name all my bots after warriors of some sort. But I'd be lying if I said I didn't think it just sounded cool.
Can I use your code?
Yes, it's released under the RWPCL.
What's next for your robot?
Melee: throne defense. 1v1: overtaking Dookious for #2, then contemplating the long, hard climb up towards DrussGT.
Does it have any White Whales?
Shadow, Portia, and Glacier all want the melee throne, and pose the biggest threats in battles. In 1v1, Pris really gives it a whooping, along with all the other usual suspects: Shadow, YersiniaPestis, DrussGT, and Phoenix.
What other robot(s) is it based on?
I tried to start with a clean slate on this one. But I did cull some ideas from the wiki and some code from some of my other bots, so I'll just run down a list of credits.
  • BrokenSword - General guidance on various things, especially the minimum risk movement and bullet power management.
  • Dookious - Diamond's 1v1 movement was directly ported from the Wave Surfing of Dookious, along with a variety of utility functions, including precise prediction code (itself based on Albert's FuturePosition).
  • Lukious - The tiniest bit of kernel density code and general guidance on scan distancing.
  • HawkOnFire - I never did peek at the code, but it deserves a nod just for the wisdom rozu shared about minimum risk movement via this bot.
  • Corbos, Simonton - Corbos for the idea to use a kd-tree to speed up our DC guns, Simonton for the idea of the (much faster for my purposes) bucket variant.