Difference between revisions of "Diamond"

From Robowiki
Jump to navigation Jump to search
m (updating version & download url)
m (Update rankings)
 
(24 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Navbox small
 
| title        = Sub-pages
 
| page1        = Version History
 
| page2        = Code
 
}}
 
 
{{Infobox Robot
 
{{Infobox Robot
 
| author          = [[User:Voidious|Voidious]]
 
| author          = [[User:Voidious|Voidious]]
| image          = Diamond_small.png
+
| image          = Diamond_collage_thumb200.png
| caption        = [[:Image:Diamond_large.png|Full Size]]
+
| caption        = [[:Image:Diamond_collage.png|Full Size]]
 
| extends        = [[AdvancedRobot]]
 
| extends        = [[AdvancedRobot]]
| targeting      = [[Dynamic Clustering|DC]]-[[Displacement Targeting|Displacement Targeting]]
+
| targeting      = [[Dynamic Clustering]], [[Displacement Vector]]s, [[GuessFactor]]s
| movement        = [[Minimum Risk Movement|Minimum Risk Movement]], [[Dynamic Clustering|DC]]-[[Wave Surfing|Wave Surfing]]
+
| movement        = [[Minimum Risk Movement|Minimum Risk]], [[Dynamic Clustering|DC]]/[[GuessFactor|GF]]-[[Wave Surfing]]
| current_version = 1.115
+
| current_version = 1.8.28
| license        = [[RWPCL]]
+
| released        = 2009
| download_link  = http://www.dijitari.com/void/robocode/voidious.Diamond_1.115.jar
+
| best_rating    = 2nd 1v1 (2017),
 +
1st Melee (2012)
 +
| license        = [http://www.gzip.org/zlib/zlib_license.html zlib]
 +
| download_link  = http://robocode-archive.strangeautomata.com/robots/voidious.Diamond_1.8.28.jar
 +
| source_link    = https://github.com/Voidious/Diamond
 
| isOpenSource    = yes
 
| isOpenSource    = yes
 
| isMelee        = yes
 
| isMelee        = yes
 
| isOneOnOne      = yes
 
| isOneOnOne      = yes
 
}}
 
}}
 
+
{{Navbox small
 +
| title        = Sub-pages
 +
| page1        = Version History
 +
| page2        = DiamondHawk
 +
}}
 +
{{Youtube|dqHmp_kMz-U}}
 
== Background Information ==
 
== Background Information ==
  
 
; What's special about it?
 
; What's special about it?
{| cellspacing="0" cellpadding="0" border="0"
+
: Oh, nothing, really. Well, since you asked...
|    
+
:* Took the [[Melee]] throne from [[Shadow]].
|
+
:* By far the top [[Dynamic Clustering|DC]] surfer.
* It's my first [[Melee]] [[MegaBot]].
+
:* Pioneered using [[Bullet Shadow]]s in Wave Surfing.
* The gun is just a tiny bit different than most [[Dynamic Clustering]] guns.
+
:* The Melee [[Wall Smoothing]] is quite graceful.
* It has pretty debugging graphics.
+
:* Melee guns use [[Displacement Vector|displacement vectors]] and fire lots of waves from alternate sources.
|}
+
:* Pretty debugging graphics.
 +
:* Two alternate color schemes!
 +
:* The source code is available under a [[wikipedia:Permissive free software licence|permissive license]] - have fun! (And try to learn something!)
  
 
; How competitive is it?
 
; How competitive is it?
: Very competitive. Hopefully. =)
+
: Very! #2 in 1v1 behind [[DrussGT]], #3 in Melee behind [[Firestarter]] and [[Neuromancer]].
  
 
== Strategy ==
 
== Strategy ==
  
; How does it [[Movement|move]]?
+
; How does it [[:Category:Movement|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:
+
: In melee, it uses a [[Minimum Risk Movement]], evaluating a bunch of points around itself and choosing the best one. I'm always tweaking the parameters, but some of them are:
:* Considers points in a (randomized radius) circle around itself, plus a few additional points near the current destination.
+
:* Stay far away from other bots.
:* Stay far away from other bots, weighted by their energy.
 
 
:* Stay perpendicular to other bots.
 
:* Stay perpendicular to other bots.
:* Don't be the closest bot to any other bots (avoid being targeted).
+
:* Don't be the closest bot to any other bots (to avoid being targeted).
:* Some randomizing based on past locations and reversing direction.
+
:* Weight risks by energy and bullet damage factors.
: In 1v1, it uses [[Wave Surfing]] that is a slightly stripped down version from [[Dookious]], but with [[Dynamic Clustering]] for data analysis.
+
:* Some randomizing based on past locations.
 +
 
 +
: In 1v1, it uses [[Wave Surfing]] with [[Dynamic Clustering]].
 +
:* [[Precise Prediction|Predict]]s where he would intersect the enemy [[wave]] if he orbits clockwise, counter-clockwise, or slams on the brakes. Calculate the danger for this position based on where we've detected enemy bullets.
 +
:* For each predicted spot on the first wave, branch from that position and predict clockwise/counter-clockwise/stop on the second wave. Take the lowest danger.
 +
:* Weight the wave dangers by time to impact and bullet power.
 +
:* Multiply in a distancing factor.
 +
:* Choose the safest of the 3 movement options.
  
; How does it [[Targeting|fire]]?
+
; How does it [[:Category:Targeting|fire]]?
: 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 Targeting|displacement vectors]] for recording and reconstructing the firing angle. It fires a [[Wave]] for each scan (interpolating wave break locations if necessary) and records the vector the enemy traveled along, 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.
 +
 
 +
: In Melee, it uses [[Displacement Vector|displacement vectors]] for recording and reconstructing firing angles - I think that makes more sense than [[GuessFactor|GuessFactors]] since enemies aren't necessarily moving relative to you, and it's a lot simpler and more efficient than real [[Play It Forward]]. In 1v1, it uses GuessFactors with [[Maximum Escape Angle/Precise|precise MEA]]. It uses [[Waves/Precise Intersection|precise intersection]] and interpolates missed scans when necessary.
 +
 
 +
: I also experiment with gun stuff quite a bit with [[User:Voidious/WaveSim|WaveSim]]. My latest experiments involve using a [[RetroGirl/Gun]] for the first few shots of a 1v1 battle.
 +
 
 +
; 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|melee]] strategy differ from [[One on One|one-on-one]] strategy?
 
; 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.
+
: In 1v1, it switches to a Wave Surfing movement and to its 1v1 [[Virtual Guns]].
 
 
; How does it select a target to attack/avoid in [[Melee|melee]]?
 
: A combination of energy and distance, with a slight bias to the current enemy.
 
  
 
; What does it save between rounds and matches?
 
; 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-Tree|kd-trees]], and maps of the trees' data points to displacement vectors (gun) and [[GuessFactor|GuessFactors]] (movement).
+
: Nothing between matches. Between rounds, it saves all its targeting and movement data, which includes general info about each enemy, a bunch of [[Kd-Tree|kd-trees]], and maps of the trees' data points to displacement vectors and GuessFactors.
  
 
== Additional Information ==
 
== Additional Information ==
  
 
; Where did you get the name?
 
; Where did you get the name?
: Diamond is the ex-superhero name of the main character in [http://en.wikipedia.org/wiki/Powers_(comics) 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.
+
: Diamond is the ex-superhero name of the main character in [[wikipedia:Powers (comics)|Powers]], my favorite comic book series. I like to name all my bots after warriors of some sort, but I'd be lying if I said I didn't just think it sounds cool.
  
 
; Can I use your code?
 
; Can I use your code?
: Yes, it's released under the [[RWPCL]].
+
: Yes, it's released under the [http://www.gzip.org/zlib/zlib_license.html zlib license]. You can find it in the JAR and I put v1.8.28 up at [https://github.com/Voidious/Diamond GitHub/Voidious/Diamond].
  
 
; 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.
+
: I'd love to take the 1v1 throne. A lot. =) But I'm probably retired from writing Robocode bots.
  
 
; 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.
+
: [[DrussGT]]
  
; 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've taken plenty of ideas from the wiki and utility code from a few places.
:* [[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.
:* [[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 surfing algorithm was originally ported from Dookious, along with a variety of utility functions, including [[Precise Prediction|precise prediction]] code based on [[User:Albert|Albert]]'s [[FuturePosition]].
:* [[Lukious]] - The tiniest bit of kernel density code and general guidance on scan distancing.
+
:* [[HawkOnFire]] - No code, but it deserves a nod 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.
+
:* [[User:Corbos|Corbos]], [[User:Simonton|Simonton]] - Corbos for the idea to use a kd-tree to speed up our DC guns, Simonton for the bucket variant.
:* [[User:Corbos|Corbos]], [[User:Simonton|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.
+
:* [[Shadow]] - Pioneered the [[Shadow/Melee Gun]], which is an amazing advancement in Melee targeting.
 +
:* [[User:Rednaxela|Rednaxela]] - Introduced us to [[Waves/Precise Intersection|precise intersection]] and [[Gun Heat Waves]], and I also use his lightning fast [[User:Rednaxela/kD-Tree|kd-tree]].
  
 
[[Category:MegaBots]]
 
[[Category:MegaBots]]

Latest revision as of 20:45, 1 October 2017

Diamond
Diamond collage thumb200.png
Full Size
Author(s) Voidious
Extends AdvancedRobot
Targeting Dynamic Clustering, Displacement Vectors, GuessFactors
Movement Minimum Risk, DC/GF-Wave Surfing
Released 2009
Best Rating 2nd 1v1 (2017),

1st Melee (2012)

Current Version 1.8.28
Code License zlib
Download
Source
Sub-pages:
Version History - DiamondHawk
Youtube
Youtube has a video of Diamond in action: click here to watch

Background Information

What's special about it?
Oh, nothing, really. Well, since you asked...
How competitive is it?
Very! #2 in 1v1 behind DrussGT, #3 in Melee behind Firestarter and Neuromancer.

Strategy

How does it move?
In melee, it uses a Minimum Risk Movement, evaluating a bunch of points around itself and choosing the best one. I'm always tweaking the parameters, but some of them are:
  • Stay far away from other bots.
  • Stay perpendicular to other bots.
  • Don't be the closest bot to any other bots (to avoid being targeted).
  • Weight risks by energy and bullet damage factors.
  • Some randomizing based on past locations.
In 1v1, it uses Wave Surfing with Dynamic Clustering.
  • Predicts where he would intersect the enemy wave if he orbits clockwise, counter-clockwise, or slams on the brakes. Calculate the danger for this position based on where we've detected enemy bullets.
  • For each predicted spot on the first wave, branch from that position and predict clockwise/counter-clockwise/stop on the second wave. Take the lowest danger.
  • Weight the wave dangers by time to impact and bullet power.
  • Multiply in a distancing factor.
  • Choose the safest of the 3 movement options.
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.
In Melee, it uses displacement vectors for recording and reconstructing firing angles - I think that makes more sense than GuessFactors since enemies aren't necessarily moving relative to you, and it's a lot simpler and more efficient than real Play It Forward. In 1v1, it uses GuessFactors with precise MEA. It uses precise intersection and interpolates missed scans when necessary.
I also experiment with gun stuff quite a bit with WaveSim. My latest experiments involve using a RetroGirl/Gun for the first few shots of a 1v1 battle.
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 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 and GuessFactors.

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. I like to name all my bots after warriors of some sort, but I'd be lying if I said I didn't just think it sounds cool.
Can I use your code?
Yes, it's released under the zlib license. You can find it in the JAR and I put v1.8.28 up at GitHub/Voidious/Diamond.
What's next for your robot?
I'd love to take the 1v1 throne. A lot. =) But I'm probably retired from writing Robocode bots.
Does it have any White Whales?
DrussGT
What other robot(s) is it based on?
I tried to start with a clean slate on this one. But I've taken plenty of ideas from the wiki and utility code from a few places.