<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://robowiki.net/w/index.php?action=history&amp;feed=atom&amp;title=HawkOnFire%2FUnderstanding_HawkOnFire</id>
	<title>HawkOnFire/Understanding HawkOnFire - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://robowiki.net/w/index.php?action=history&amp;feed=atom&amp;title=HawkOnFire%2FUnderstanding_HawkOnFire"/>
	<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=HawkOnFire/Understanding_HawkOnFire&amp;action=history"/>
	<updated>2026-04-14T16:05:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>http://robowiki.net/w/index.php?title=HawkOnFire/Understanding_HawkOnFire&amp;diff=53422&amp;oldid=prev</id>
		<title>MultiplyByZer0: Small fixups</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=HawkOnFire/Understanding_HawkOnFire&amp;diff=53422&amp;oldid=prev"/>
		<updated>2017-10-24T20:29:18Z</updated>

		<summary type="html">&lt;p&gt;Small fixups&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 20:29, 24 October 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Youtube|7e9qyOmo6nc|HawkOnFire}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Youtube|7e9qyOmo6nc|HawkOnFire}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Rozu]] released the source to his breakthrough melee bot, [[HawkOnFire]], when he saw that people were genuinely interested in it some time ago. Since then, I think it's been on everyone's todo list to take a look at it. You can view it [&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;https:&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;/gist.github.com/MultiplyByZer01/de3cab614d348ac7cf40127adc97c9ae &lt;/del&gt;here].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Rozu]] released the source to his breakthrough melee bot, [[HawkOnFire]], when he saw that people were genuinely interested in it some time ago. Since then, I think it's been on everyone's todo list to take a look at it. You can view it [&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[HawkOnFire&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Code|&lt;/ins&gt;here&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;appears &lt;/del&gt;that [[Rozu]] took some time to edit and fix up the code before uploading it here, and for the benefit of clarity, it compiles to be a bit larger than the barely-micro size &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;that &lt;/del&gt;HawkOnFire normally is. That having been said, with some analysis and tweaking, I got HawkOnFireOS under 700 bytes with no loss of functionality or performance that I can see.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;seems &lt;/ins&gt;that [[Rozu]] took some time to edit and fix up the code before uploading it here, and for the benefit of clarity, it compiles to be a bit larger than the barely-micro size HawkOnFire normally is. That having been said, with some analysis and tweaking, I got HawkOnFireOS under 700 bytes with no loss of functionality or performance that I can see.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Classes ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Classes ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;HawkOnFire is made up of 2 classes:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;HawkOnFire is made up of 2 classes:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The main robot class.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The main robot class.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* the &amp;lt;tt&amp;gt;microEnemy&amp;lt;/tt&amp;gt; class, which contains the location, energy, and whether or not the enemy is alive. These are stored in a Hashtable in the robot class.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* the &amp;lt;tt&amp;gt;microEnemy&amp;lt;/tt&amp;gt; class, which contains the location, energy, and whether or not the enemy is alive. These are stored in a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;tt&amp;gt;&lt;/ins&gt;Hashtable&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/tt&amp;gt; &lt;/ins&gt;in the robot class.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Functions ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Functions ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l19&quot; &gt;Line 19:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 19:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Globals ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Globals ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Most of these are pretty self-explanatory, but the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Points &lt;/del&gt;declared should be explained:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Most of these are pretty self-explanatory, but the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;tt&amp;gt;Point&amp;lt;/tt&amp;gt;s &lt;/ins&gt;declared should be explained:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;tt&amp;gt;nextDestination&amp;lt;/tt&amp;gt; is the point that HawkOnFire is trying to get to.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;tt&amp;gt;nextDestination&amp;lt;/tt&amp;gt; is the point that HawkOnFire is trying to get to.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;tt&amp;gt;lastPosition&amp;lt;/tt&amp;gt; is the point that HawkOnFire is coming from last.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;tt&amp;gt;lastPosition&amp;lt;/tt&amp;gt; is the point that HawkOnFire is coming from last.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l30&quot; &gt;Line 30:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 30:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Not too exciting. The enemy's position is set in &amp;lt;tt&amp;gt;onScannedRobot()&amp;lt;/tt&amp;gt;, and lines 54-57 turn the gun and fire.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Not too exciting. The enemy's position is set in &amp;lt;tt&amp;gt;onScannedRobot()&amp;lt;/tt&amp;gt;, and lines 54-57 turn the gun and fire.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Contrary to rumors, HawkOnFire does not always fire power-3 bullets ‒ it's a little more aggressive than a lot of small melee bots as far as firepower is concerned, but not as aggressive as bots with a dependable gun. One feature that's worth pointing out is that &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/del&gt;&amp;gt;target.energy / 3&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/del&gt;&amp;gt; is in there, which is more than enough to kill the target at that point. HawkOnFire doesn't want a low-energy target to get lucky after being hit. Also, HawkOnFire always tries to target the closest living enemy, and likes to have its gun turned, and never fires when its energy is under 1.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Contrary to rumors, HawkOnFire does not always fire power-3 bullets ‒ it's a little more aggressive than a lot of small melee bots as far as firepower is concerned, but not as aggressive as bots with a dependable gun. One feature that's worth pointing out is that &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/ins&gt;&amp;gt;target.energy / 3&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/ins&gt;&amp;gt; is in there, which is more than enough to kill the target at that point. HawkOnFire doesn't want a low-energy target to get lucky after being hit. Also, HawkOnFire always tries to target the closest living enemy, and likes to have its gun turned, and never fires when its energy is under 1.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Movement ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Movement ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l36&quot; &gt;Line 36:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 36:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Risk Function ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Risk Function ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;tt&amp;gt;evaluate()&amp;lt;/tt&amp;gt; method is HawkOnFire's risk function, except for one part ‒ the &amp;lt;tt&amp;gt;addLast&amp;lt;/tt&amp;gt; variable that is passed in as a parameter is precomputed for consistency so that the same value is used when comparing for every point. &amp;lt;tt&amp;gt;addLast&amp;lt;/tt&amp;gt; is set to &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/del&gt;&amp;gt;1 - Math.rint(Math.pow(Math.random(), getOthers()))&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/del&gt;&amp;gt;, which makes it 1 most of the time with more bots on the field and 0 about half of the time in 1-on-1. This variable determines whether &amp;lt;tt&amp;gt;lastPosition&amp;lt;/tt&amp;gt; is used in the risk calculation.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;tt&amp;gt;evaluate()&amp;lt;/tt&amp;gt; method is HawkOnFire's risk function, except for one part ‒ the &amp;lt;tt&amp;gt;addLast&amp;lt;/tt&amp;gt; variable that is passed in as a parameter is precomputed for consistency so that the same value is used when comparing for every point. &amp;lt;tt&amp;gt;addLast&amp;lt;/tt&amp;gt; is set to &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/ins&gt;&amp;gt;1 - Math.rint(Math.pow(Math.random(), getOthers()))&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/ins&gt;&amp;gt;, which makes it 1 most of the time with more bots on the field and 0 about half of the time in 1-on-1. This variable determines whether &amp;lt;tt&amp;gt;lastPosition&amp;lt;/tt&amp;gt; is used in the risk calculation.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Which leads us into &amp;lt;tt&amp;gt;evaluate()&amp;lt;/tt&amp;gt; itself. Basically, after starting out the risk as addLast times an &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;antigravity &lt;/del&gt;function on &amp;lt;tt&amp;gt;lastPosition&amp;lt;/tt&amp;gt;, HawkOnFire iterates through the enemies, and for each live one, adds the proposed risk to the total risk (called &amp;lt;tt&amp;gt;eval&amp;lt;/tt&amp;gt;). The formula is very simple and elegant (and I don't think I'm exaggerating to say that it's a breakthrough in and of itself) ‒ simply &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/del&gt;&amp;gt;energyRatio * (1 + perpendicularity) / distanceSq&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/del&gt;&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Which leads us into &amp;lt;tt&amp;gt;evaluate()&amp;lt;/tt&amp;gt; itself. Basically, after starting out the risk as addLast times an &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[Anti-Gravity Movement|anti-gravity]] &lt;/ins&gt;function on &amp;lt;tt&amp;gt;lastPosition&amp;lt;/tt&amp;gt;, HawkOnFire iterates through the enemies, and for each live one, adds the proposed risk to the total risk (called &amp;lt;tt&amp;gt;eval&amp;lt;/tt&amp;gt;). The formula is very simple and elegant (and I don't think I'm exaggerating to say that it's a breakthrough in and of itself) ‒ simply &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/ins&gt;&amp;gt;energyRatio * (1 + perpendicularity) / distanceSq&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/ins&gt;&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;tt&amp;gt;energyRatio&amp;lt;/tt&amp;gt; is the enemy's energy / HawkOnFire's energy (but no more than 2) ‒ this makes enemies with higher energy more &amp;quot;dangerous&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;tt&amp;gt;energyRatio&amp;lt;/tt&amp;gt; is the enemy's energy / HawkOnFire's energy (but no more than 2) ‒ this makes enemies with higher energy more &amp;quot;dangerous&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;tt&amp;gt;perpendicularity&amp;lt;/tt&amp;gt; is the absolute value of the cosine of the difference between the angle from the point to HawkOnFire's current location and the angle from the point to the enemy. This is 0 when the point is at a right angle and 1 if the point is directly toward or away from the enemy.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;tt&amp;gt;perpendicularity&amp;lt;/tt&amp;gt; is the absolute value of the cosine of the difference between the angle from the point to HawkOnFire's current location and the angle from the point to the enemy. This is 0 when the point is at a right angle and 1 if the point is directly toward or away from the enemy.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l46&quot; &gt;Line 46:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 46:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Tutorials]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Tutorials]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Strategy]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff::1.12:old-37394:rev-53422 --&gt;
&lt;/table&gt;</summary>
		<author><name>MultiplyByZer0</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=HawkOnFire/Understanding_HawkOnFire&amp;diff=37394&amp;oldid=prev</id>
		<title>MultiplyByZer0: Editing</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=HawkOnFire/Understanding_HawkOnFire&amp;diff=37394&amp;oldid=prev"/>
		<updated>2017-08-09T19:15:45Z</updated>

		<summary type="html">&lt;p&gt;Editing&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 19:15, 9 August 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Youtube|7e9qyOmo6nc|HawkOnFire}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Youtube|7e9qyOmo6nc|HawkOnFire}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Rozu]] released the source to his breakthrough melee bot, [[HawkOnFire]], when he saw that people were genuinely interested in it some time ago&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, but hasn't packaged it with the bot&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/del&gt;Since then, I think it's been on everyone's todo list to take a look at it. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/del&gt;You can &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;go see by going to http&lt;/del&gt;://&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;www&lt;/del&gt;.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;robocoderepository&lt;/del&gt;.com/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;BotDetail.jsp?id=1575 and clicking on &amp;quot;Download Source&amp;quot;.  If I refer to the source, I'll be referring to that source.  It appears that [[Rozu]] took some time to edit and fix up the code before uploading it &lt;/del&gt;here&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, and for the benefit of clarity, it compiles to be a bit larger than the barely-micro size that HawkOnFire normally is.  That having been said, with some analysis and tweaking, I got HawkOnFireOS under 700 bytes with no loss of functionality or performance that I can tell (so if you have something to use 50 bytes for, [[Rozu&lt;/del&gt;]&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;], let me know)&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Rozu]] released the source to his breakthrough melee bot, [[HawkOnFire]], when he saw that people were genuinely interested in it some time ago. Since then, I think it's been on everyone's todo list to take a look at it. You can &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;view it [https&lt;/ins&gt;://&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;gist&lt;/ins&gt;.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;github&lt;/ins&gt;.com/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;MultiplyByZer01/de3cab614d348ac7cf40127adc97c9ae &lt;/ins&gt;here].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;=== Classes ===&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;It appears that &lt;/ins&gt;[[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Rozu&lt;/ins&gt;]] &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;took some time to edit and fix &lt;/ins&gt;up the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;code before uploading it here&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;and for &lt;/ins&gt;the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;benefit of clarity&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;it compiles to be a bit larger than the barely-micro size that HawkOnFire normally is. That having been said&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;with some analysis &lt;/ins&gt;and &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tweaking, I got HawkOnFireOS under 700 bytes with no loss of functionality &lt;/ins&gt;or &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;performance that I can see&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;HawkOnFire&lt;/del&gt;]] &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is made &lt;/del&gt;up &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;of 2 classes:&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;* The main robot class&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;* &lt;/del&gt;the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;microEnemy class&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;which contains &lt;/del&gt;the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;location&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;energy&lt;/del&gt;, and &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;whether &lt;/del&gt;or &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;not the enemy is alive.  These are stored in a Hashtable in the robot class&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;= Functions =&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Classes &lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;There are a few typical utility functions&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;calcPoint (&lt;/del&gt;which &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;projects a point some distance away from a base &lt;/del&gt;location &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;at some angle) &lt;/del&gt;and &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;calcAngle (which finds &lt;/del&gt;the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;absolute bearing from one point to another)&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;HawkOnFire is made up of 2 classes:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* The main robot class.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* the &amp;lt;tt&amp;gt;microEnemy&amp;lt;/tt&amp;gt; class&lt;/ins&gt;, which &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;contains the &lt;/ins&gt;location&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, energy, &lt;/ins&gt;and &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;whether or not the enemy is alive. These are stored in a Hashtable in &lt;/ins&gt;the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;robot class&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[[&lt;/del&gt;HawkOnFire&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;]] also overrides &lt;/del&gt;the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;onRobotDeath method to mark &lt;/del&gt;enemies &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;as dead&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;== Functions ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;The primary magic in &lt;/ins&gt;HawkOnFire &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;lives in the &amp;lt;tt&amp;gt;evaluate()&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;doMovementAndGun()&amp;lt;/tt&amp;gt; methods. &amp;lt;tt&amp;gt;run()&amp;lt;/tt&amp;gt; doesn't do much besides set up and call these methods, and &amp;lt;tt&amp;gt;onScannedRobot()&amp;lt;/tt&amp;gt; just updates &lt;/ins&gt;the enemies &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;and handles target selection&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The primary magic in [[HawkOnFire]] lives in the &lt;/del&gt;&amp;lt;tt&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;evaluate&lt;/del&gt;&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and &amp;lt;tt&amp;gt;doMovementAndGun&amp;lt;/tt&amp;gt; methods&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/del&gt;&amp;lt;tt&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;run&lt;/del&gt;&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;doesn't do much besides set up and call these methods&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and &amp;lt;tt&amp;gt;onScannedRobot&amp;lt;/tt&amp;gt; just updates &lt;/del&gt;the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;enemies and handles target selection&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;There are a few typical utility functions:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* &lt;/ins&gt;&amp;lt;tt&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;calcPoint()&lt;/ins&gt;&amp;lt;/tt&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, which projects a point some distance away from a base location at some angle&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* &lt;/ins&gt;&amp;lt;tt&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;calcAngle()&lt;/ins&gt;&amp;lt;/tt&amp;gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;which finds &lt;/ins&gt;the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;absolute bearing from one point to another&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;=== Globals ===&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;HawkOnFire also overrides &lt;/ins&gt;the &amp;lt;tt&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;onRobotDeath()&lt;/ins&gt;&amp;lt;/tt&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;method &lt;/ins&gt;to &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;mark enemies as dead&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Most of these are pretty self-explanitory, but &lt;/del&gt;the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Points declared should be explained:&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;* &lt;/del&gt;&amp;lt;tt&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;nextDestination&lt;/del&gt;&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is the point that [[HawkOnFire]] is trying to get &lt;/del&gt;to&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;* &amp;lt;tt&amp;gt;lastPosition&amp;lt;/tt&amp;gt; is the point that [[HawkOnFire]] is coming from last.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;* &amp;lt;tt&amp;gt;myPos&amp;lt;/tt&amp;gt; is where [[HawkOnFire]] is now&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;= Radar =&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Globals &lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Spins &lt;/del&gt;the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;radar in melee, InfiniteRadarLock in 1-on-1&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Most of these are pretty self-explanatory, but the Points declared should be explained:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* &amp;lt;tt&amp;gt;nextDestination&amp;lt;/tt&amp;gt; is the point that HawkOnFire is trying to get to.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* &amp;lt;tt&amp;gt;lastPosition&amp;lt;/tt&amp;gt; is &lt;/ins&gt;the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;point that HawkOnFire is coming from last.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* &amp;lt;tt&amp;gt;myPos&amp;lt;/tt&amp;gt; is where HawkOnFire is now&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;= Gun =&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Radar &lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Not too exciting, &lt;/del&gt;the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;enemy's position is set &lt;/del&gt;in &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;tt&amp;gt;onScannedRobot&amp;lt;/tt&amp;gt;, lines 54-57 turn the gun and fire.  Contrary to rumors&lt;/del&gt;, [[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;HawkOnFire&lt;/del&gt;]] &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;does not always fire power-3 bullets - it's a little more aggressive than alot of small melee bots as far as firepower is concerned, but not as aggressive as bots with a dependable gun.  One feature that's worth pointing out is that target.energy/3 is &lt;/del&gt;in &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;there, which is more than enough to kill the target at that point.  [[HawkOnFire]] doesn't want a low&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;energy target to get lucky after being hit :&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;)  Also, [[HawkOnFire]] always tries to target the closest living enemy, and likes to have its gun turned, and never fires when its energy is under &lt;/del&gt;1.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Spins &lt;/ins&gt;the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;radar &lt;/ins&gt;in &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;melee&lt;/ins&gt;, [[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;One on One Radar#The Infinity Lock|Infinity Lock&lt;/ins&gt;]] in &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;1&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;on&lt;/ins&gt;-1.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;= Movement =&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Gun &lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[[HawkOnFire]] is a textbook example of [[MinimumRiskMovement]]&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/del&gt;The &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;point&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;generating function generates 200 points at random between 100 &lt;/del&gt;and &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;300 pixels away but no more than 80% of the distance to its current target (to avoid hitting other robots as much)&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Not too exciting&lt;/ins&gt;. The &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;enemy's position is set in &amp;lt;tt&amp;gt;onScannedRobot()&amp;lt;/tt&amp;gt;, and lines 54&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;57 turn the gun &lt;/ins&gt;and &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;fire&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;==== Risk Function ====&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Contrary to rumors, &lt;/ins&gt;HawkOnFire &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;does not always fire power-3 bullets ‒ it&lt;/ins&gt;'s &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;a little more aggressive than a lot of small melee bots as far as firepower is concerned&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;but not as aggressive as bots with a dependable gun. One feature that's worth pointing out is that &lt;/ins&gt;&amp;lt;tt&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;target.energy / 3&lt;/ins&gt;&amp;lt;/tt&amp;gt; is in &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;there, which &lt;/ins&gt;is &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;more than enough to kill the target at &lt;/ins&gt;that point. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;HawkOnFire doesn't want a low-energy target &lt;/ins&gt;to &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;get lucky after being hit&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Also, HawkOnFire always tries to target the closest living enemy&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;and likes to have its gun turned&lt;/ins&gt;, and &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;never fires when its energy is under &lt;/ins&gt;1.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The &amp;lt;tt&amp;gt;evaluate&amp;lt;/tt&amp;gt; method is [[&lt;/del&gt;HawkOnFire&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;]]&lt;/del&gt;'s &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;risk function&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;except for one part - the &lt;/del&gt;&amp;lt;tt&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;addLast&lt;/del&gt;&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;variable that &lt;/del&gt;is &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;passed &lt;/del&gt;in &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;as a parameter &lt;/del&gt;is &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;precomputed for consistency so &lt;/del&gt;that &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the same value is used when comparing for every &lt;/del&gt;point. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; &amp;lt;tt&amp;gt;addLast&amp;lt;/tt&amp;gt; is set &lt;/del&gt;to &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;tt&amp;gt;1 - Math&lt;/del&gt;.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;rint(Math.pow(Math.random()&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;getOthers()))&amp;lt;/tt&amp;gt;&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;which makes it 1 most of the time with more bots on the field &lt;/del&gt;and &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;0 about half of the time in &lt;/del&gt;1&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;-on-1.  This variable determines whether &amp;lt;tt&amp;gt;lastPosition&amp;lt;/tt&amp;gt; is used in the risk calculation&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Which leads us into &amp;lt;tt&amp;gt;evaluate&amp;lt;/tt&amp;gt; itself.  Basically, after starting out the risk as addLast times an antigravity function on &amp;lt;tt&amp;gt;lastPosition&amp;lt;/tt&amp;gt;, &lt;/del&gt;[[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Rozu&lt;/del&gt;]] &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;iterates through the enemies, and for each live one, adds the proposed risk to the total risk (called &amp;lt;tt&amp;gt;eval&amp;lt;/tt&amp;gt;)&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/del&gt;The &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;formula is very simple &lt;/del&gt;and &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;elegant (and I don't think I'm exaggerating to say that it's a breakthough in and of itself) - simply &amp;lt;tt&amp;gt;energy ratio * (1 + perpendicularity) / distanceSq&amp;lt;/tt&amp;gt;.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;== Movement ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;* The energy ratio is the enemy's energy / [[HawkOnFire]]'s energy (&lt;/del&gt;but no more than &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;2) - this makes enemies with higher energy more &amp;quot;dangerous&amp;quot;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;HawkOnFire is a textbook example of &lt;/ins&gt;[[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Minimum Risk Movement&lt;/ins&gt;]]. The &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;point-generating function generates 200 points at random between 100 &lt;/ins&gt;and &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;300 pixels away &lt;/ins&gt;but no more than &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;80% &lt;/ins&gt;of the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;distance &lt;/ins&gt;to &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;its &lt;/ins&gt;current &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;target (&lt;/ins&gt;to &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;avoid hitting other robots as much)&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;* perpendicularity is the absolute value &lt;/del&gt;of the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;cosine of the difference between the angle from the point &lt;/del&gt;to &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[[HawkOnFire]]'s &lt;/del&gt;current &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;location and the angle from the point &lt;/del&gt;to &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the enemy.  This is 0 when the point is at a right angle and 1 if the point is directly toward or away from the enemy.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;* distanceSq is the distance from the point to the enemy&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Once you understand this formula, you pretty much understand &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[[&lt;/del&gt;HawkOnFire&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;]]&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;=== Risk Function ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;The &amp;lt;tt&amp;gt;evaluate()&amp;lt;/tt&amp;gt; method is HawkOnFire's risk function, except for one part ‒ the &amp;lt;tt&amp;gt;addLast&amp;lt;/tt&amp;gt; variable that is passed in as a parameter is precomputed for consistency so that the same value is used when comparing for every point. &amp;lt;tt&amp;gt;addLast&amp;lt;/tt&amp;gt; is set to &amp;lt;tt&amp;gt;1 - Math.rint(Math.pow(Math.random(), getOthers()))&amp;lt;/tt&amp;gt;, which makes it 1 most of the time with more bots on the field and 0 about half of the time in 1-on-1. This variable determines whether &amp;lt;tt&amp;gt;lastPosition&amp;lt;/tt&amp;gt; is used in the risk calculation.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Which leads us into &amp;lt;tt&amp;gt;evaluate()&amp;lt;/tt&amp;gt; itself. Basically, after starting out the risk as addLast times an antigravity function on &amp;lt;tt&amp;gt;lastPosition&amp;lt;/tt&amp;gt;, HawkOnFire iterates through the enemies, and for each live one, adds the proposed risk to the total risk (called &amp;lt;tt&amp;gt;eval&amp;lt;/tt&amp;gt;). The formula is very simple and elegant (and I don't think I'm exaggerating to say that it's a breakthrough in and of itself) ‒ simply &amp;lt;tt&amp;gt;energyRatio * (1 + perpendicularity) / distanceSq&amp;lt;/tt&amp;gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* &amp;lt;tt&amp;gt;energyRatio&amp;lt;/tt&amp;gt; is the enemy's energy / HawkOnFire's energy (but no more than 2) ‒ this makes enemies with higher energy more &amp;quot;dangerous&amp;quot;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* &amp;lt;tt&amp;gt;perpendicularity&amp;lt;/tt&amp;gt; is the absolute value of the cosine of the difference between the angle from the point to HawkOnFire's current location and the angle from the point to the enemy. This is 0 when the point is at a right angle and 1 if the point is directly toward or away from the enemy.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* &amp;lt;tt&amp;gt;distanceSq&amp;lt;/tt&amp;gt; is the distance from the point to the enemy.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Once you understand this formula, you pretty much understand HawkOnFire.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Tutorials]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Tutorials]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Strategy]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Strategy]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff::1.12:old-37389:rev-37394 --&gt;
&lt;/table&gt;</summary>
		<author><name>MultiplyByZer0</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=HawkOnFire/Understanding_HawkOnFire&amp;diff=37389&amp;oldid=prev</id>
		<title>MultiplyByZer0: MultiplyByZer0 moved page Melee Strategy/Understanding HawkOnFire to HawkOnFire/Understanding HawkOnFire: Make it a subpage of HawkOnFire</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=HawkOnFire/Understanding_HawkOnFire&amp;diff=37389&amp;oldid=prev"/>
		<updated>2017-08-09T19:01:43Z</updated>

		<summary type="html">&lt;p&gt;MultiplyByZer0 moved page &lt;a href=&quot;/wiki/Melee_Strategy/Understanding_HawkOnFire&quot; class=&quot;mw-redirect&quot; title=&quot;Melee Strategy/Understanding HawkOnFire&quot;&gt;Melee Strategy/Understanding HawkOnFire&lt;/a&gt; to &lt;a href=&quot;/wiki/HawkOnFire/Understanding_HawkOnFire&quot; title=&quot;HawkOnFire/Understanding HawkOnFire&quot;&gt;HawkOnFire/Understanding HawkOnFire&lt;/a&gt;: Make it a subpage of HawkOnFire&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 19:01, 9 August 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>MultiplyByZer0</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=HawkOnFire/Understanding_HawkOnFire&amp;diff=11144&amp;oldid=prev</id>
		<title>Voidious: add categories</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=HawkOnFire/Understanding_HawkOnFire&amp;diff=11144&amp;oldid=prev"/>
		<updated>2009-08-25T19:12:02Z</updated>

		<summary type="html">&lt;p&gt;add categories&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 19:12, 25 August 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l38&quot; &gt;Line 38:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 38:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Once you understand this formula, you pretty much understand [[HawkOnFire]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Once you understand this formula, you pretty much understand [[HawkOnFire]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Tutorials]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Strategy]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Voidious</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=HawkOnFire/Understanding_HawkOnFire&amp;diff=11141&amp;oldid=prev</id>
		<title>Voidious: change YouTube link text</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=HawkOnFire/Understanding_HawkOnFire&amp;diff=11141&amp;oldid=prev"/>
		<updated>2009-08-25T18:44:49Z</updated>

		<summary type="html">&lt;p&gt;change YouTube link text&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 18:44, 25 August 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Youtube|7e9qyOmo6nc}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Youtube|7e9qyOmo6nc&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|HawkOnFire&lt;/ins&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Rozu]] released the source to his breakthrough melee bot, [[HawkOnFire]], when he saw that people were genuinely interested in it some time ago, but hasn't packaged it with the bot.  Since then, I think it's been on everyone's todo list to take a look at it.  You can go see by going to http://www.robocoderepository.com/BotDetail.jsp?id=1575 and clicking on &amp;quot;Download Source&amp;quot;.  If I refer to the source, I'll be referring to that source.  It appears that [[Rozu]] took some time to edit and fix up the code before uploading it here, and for the benefit of clarity, it compiles to be a bit larger than the barely-micro size that HawkOnFire normally is.  That having been said, with some analysis and tweaking, I got HawkOnFireOS under 700 bytes with no loss of functionality or performance that I can tell (so if you have something to use 50 bytes for, [[Rozu]], let me know).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Rozu]] released the source to his breakthrough melee bot, [[HawkOnFire]], when he saw that people were genuinely interested in it some time ago, but hasn't packaged it with the bot.  Since then, I think it's been on everyone's todo list to take a look at it.  You can go see by going to http://www.robocoderepository.com/BotDetail.jsp?id=1575 and clicking on &amp;quot;Download Source&amp;quot;.  If I refer to the source, I'll be referring to that source.  It appears that [[Rozu]] took some time to edit and fix up the code before uploading it here, and for the benefit of clarity, it compiles to be a bit larger than the barely-micro size that HawkOnFire normally is.  That having been said, with some analysis and tweaking, I got HawkOnFireOS under 700 bytes with no loss of functionality or performance that I can tell (so if you have something to use 50 bytes for, [[Rozu]], let me know).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff::1.12:old-10740:rev-11141 --&gt;
&lt;/table&gt;</summary>
		<author><name>Voidious</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=HawkOnFire/Understanding_HawkOnFire&amp;diff=10740&amp;oldid=prev</id>
		<title>Positive: Youtube</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=HawkOnFire/Understanding_HawkOnFire&amp;diff=10740&amp;oldid=prev"/>
		<updated>2009-08-18T01:08:50Z</updated>

		<summary type="html">&lt;p&gt;Youtube&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 01:08, 18 August 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Youtube|7e9qyOmo6nc}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Rozu]] released the source to his breakthrough melee bot, [[HawkOnFire]], when he saw that people were genuinely interested in it some time ago, but hasn't packaged it with the bot.  Since then, I think it's been on everyone's todo list to take a look at it.  You can go see by going to http://www.robocoderepository.com/BotDetail.jsp?id=1575 and clicking on &amp;quot;Download Source&amp;quot;.  If I refer to the source, I'll be referring to that source.  It appears that [[Rozu]] took some time to edit and fix up the code before uploading it here, and for the benefit of clarity, it compiles to be a bit larger than the barely-micro size that HawkOnFire normally is.  That having been said, with some analysis and tweaking, I got HawkOnFireOS under 700 bytes with no loss of functionality or performance that I can tell (so if you have something to use 50 bytes for, [[Rozu]], let me know).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Rozu]] released the source to his breakthrough melee bot, [[HawkOnFire]], when he saw that people were genuinely interested in it some time ago, but hasn't packaged it with the bot.  Since then, I think it's been on everyone's todo list to take a look at it.  You can go see by going to http://www.robocoderepository.com/BotDetail.jsp?id=1575 and clicking on &amp;quot;Download Source&amp;quot;.  If I refer to the source, I'll be referring to that source.  It appears that [[Rozu]] took some time to edit and fix up the code before uploading it here, and for the benefit of clarity, it compiles to be a bit larger than the barely-micro size that HawkOnFire normally is.  That having been said, with some analysis and tweaking, I got HawkOnFireOS under 700 bytes with no loss of functionality or performance that I can tell (so if you have something to use 50 bytes for, [[Rozu]], let me know).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff::1.12:old-833:rev-10740 --&gt;
&lt;/table&gt;</summary>
		<author><name>Positive</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=HawkOnFire/Understanding_HawkOnFire&amp;diff=833&amp;oldid=prev</id>
		<title>AaronR: MeleeStrategy/Understanding HawkOnFire moved to Melee Strategy/Understanding HawkOnFire: Making consistent with the main article.</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=HawkOnFire/Understanding_HawkOnFire&amp;diff=833&amp;oldid=prev"/>
		<updated>2007-11-18T01:40:15Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/wiki/MeleeStrategy/Understanding_HawkOnFire&quot; class=&quot;mw-redirect&quot; title=&quot;MeleeStrategy/Understanding HawkOnFire&quot;&gt;MeleeStrategy/Understanding HawkOnFire&lt;/a&gt; moved to &lt;a href=&quot;/wiki/Melee_Strategy/Understanding_HawkOnFire&quot; class=&quot;mw-redirect&quot; title=&quot;Melee Strategy/Understanding HawkOnFire&quot;&gt;Melee Strategy/Understanding HawkOnFire&lt;/a&gt;: Making consistent with the main article.&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 01:40, 18 November 2007&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key wikidb:diff::1.12:old-827:rev-833 --&gt;
&lt;/table&gt;</summary>
		<author><name>AaronR</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=HawkOnFire/Understanding_HawkOnFire&amp;diff=827&amp;oldid=prev</id>
		<title>Starrynte: New page: Rozu released the source to his breakthrough melee bot, HawkOnFire, when he saw that people were genuinely interested in it some time ago, but hasn't packaged it with the bot.  Sin...</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=HawkOnFire/Understanding_HawkOnFire&amp;diff=827&amp;oldid=prev"/>
		<updated>2007-11-18T01:16:10Z</updated>

		<summary type="html">&lt;p&gt;New page: &lt;a href=&quot;/wiki/Rozu&quot; class=&quot;mw-redirect&quot; title=&quot;Rozu&quot;&gt;Rozu&lt;/a&gt; released the source to his breakthrough melee bot, &lt;a href=&quot;/wiki/HawkOnFire&quot; title=&quot;HawkOnFire&quot;&gt;HawkOnFire&lt;/a&gt;, when he saw that people were genuinely interested in it some time ago, but hasn&amp;#039;t packaged it with the bot.  Sin...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Rozu]] released the source to his breakthrough melee bot, [[HawkOnFire]], when he saw that people were genuinely interested in it some time ago, but hasn't packaged it with the bot.  Since then, I think it's been on everyone's todo list to take a look at it.  You can go see by going to http://www.robocoderepository.com/BotDetail.jsp?id=1575 and clicking on &amp;quot;Download Source&amp;quot;.  If I refer to the source, I'll be referring to that source.  It appears that [[Rozu]] took some time to edit and fix up the code before uploading it here, and for the benefit of clarity, it compiles to be a bit larger than the barely-micro size that HawkOnFire normally is.  That having been said, with some analysis and tweaking, I got HawkOnFireOS under 700 bytes with no loss of functionality or performance that I can tell (so if you have something to use 50 bytes for, [[Rozu]], let me know).&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
[[HawkOnFire]] is made up of 2 classes:&lt;br /&gt;
* The main robot class&lt;br /&gt;
* the microEnemy class, which contains the location, energy, and whether or not the enemy is alive.  These are stored in a Hashtable in the robot class.&lt;br /&gt;
&lt;br /&gt;
=== Functions ===&lt;br /&gt;
There are a few typical utility functions, calcPoint (which projects a point some distance away from a base location at some angle) and calcAngle (which finds the absolute bearing from one point to another).&lt;br /&gt;
&lt;br /&gt;
[[HawkOnFire]] also overrides the onRobotDeath method to mark enemies as dead.&lt;br /&gt;
&lt;br /&gt;
The primary magic in [[HawkOnFire]] lives in the &amp;lt;tt&amp;gt;evaluate&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;doMovementAndGun&amp;lt;/tt&amp;gt; methods.  &amp;lt;tt&amp;gt;run&amp;lt;/tt&amp;gt; doesn't do much besides set up and call these methods, and &amp;lt;tt&amp;gt;onScannedRobot&amp;lt;/tt&amp;gt; just updates the enemies and handles target selection.&lt;br /&gt;
&lt;br /&gt;
=== Globals ===&lt;br /&gt;
Most of these are pretty self-explanitory, but the Points declared should be explained:&lt;br /&gt;
* &amp;lt;tt&amp;gt;nextDestination&amp;lt;/tt&amp;gt; is the point that [[HawkOnFire]] is trying to get to.&lt;br /&gt;
* &amp;lt;tt&amp;gt;lastPosition&amp;lt;/tt&amp;gt; is the point that [[HawkOnFire]] is coming from last.&lt;br /&gt;
* &amp;lt;tt&amp;gt;myPos&amp;lt;/tt&amp;gt; is where [[HawkOnFire]] is now.&lt;br /&gt;
&lt;br /&gt;
=== Radar ===&lt;br /&gt;
Spins the radar in melee, InfiniteRadarLock in 1-on-1.&lt;br /&gt;
&lt;br /&gt;
=== Gun ===&lt;br /&gt;
Not too exciting, the enemy's position is set in &amp;lt;tt&amp;gt;onScannedRobot&amp;lt;/tt&amp;gt;, lines 54-57 turn the gun and fire.  Contrary to rumors, [[HawkOnFire]] does not always fire power-3 bullets - it's a little more aggressive than alot of small melee bots as far as firepower is concerned, but not as aggressive as bots with a dependable gun.  One feature that's worth pointing out is that target.energy/3 is in there, which is more than enough to kill the target at that point.  [[HawkOnFire]] doesn't want a low-energy target to get lucky after being hit :-)  Also, [[HawkOnFire]] always tries to target the closest living enemy, and likes to have its gun turned, and never fires when its energy is under 1.&lt;br /&gt;
&lt;br /&gt;
=== Movement ===&lt;br /&gt;
[[HawkOnFire]] is a textbook example of [[MinimumRiskMovement]].  The point-generating function generates 200 points at random between 100 and 300 pixels away but no more than 80% of the distance to its current target (to avoid hitting other robots as much).&lt;br /&gt;
&lt;br /&gt;
==== Risk Function ====&lt;br /&gt;
The &amp;lt;tt&amp;gt;evaluate&amp;lt;/tt&amp;gt; method is [[HawkOnFire]]'s risk function, except for one part - the &amp;lt;tt&amp;gt;addLast&amp;lt;/tt&amp;gt; variable that is passed in as a parameter is precomputed for consistency so that the same value is used when comparing for every point.  &amp;lt;tt&amp;gt;addLast&amp;lt;/tt&amp;gt; is set to &amp;lt;tt&amp;gt;1 - Math.rint(Math.pow(Math.random(), getOthers()))&amp;lt;/tt&amp;gt;, which makes it 1 most of the time with more bots on the field and 0 about half of the time in 1-on-1.  This variable determines whether &amp;lt;tt&amp;gt;lastPosition&amp;lt;/tt&amp;gt; is used in the risk calculation.&lt;br /&gt;
&lt;br /&gt;
Which leads us into &amp;lt;tt&amp;gt;evaluate&amp;lt;/tt&amp;gt; itself.  Basically, after starting out the risk as addLast times an antigravity function on &amp;lt;tt&amp;gt;lastPosition&amp;lt;/tt&amp;gt;, [[Rozu]] iterates through the enemies, and for each live one, adds the proposed risk to the total risk (called &amp;lt;tt&amp;gt;eval&amp;lt;/tt&amp;gt;).  The formula is very simple and elegant (and I don't think I'm exaggerating to say that it's a breakthough in and of itself) - simply &amp;lt;tt&amp;gt;energy ratio * (1 + perpendicularity) / distanceSq&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* The energy ratio is the enemy's energy / [[HawkOnFire]]'s energy (but no more than 2) - this makes enemies with higher energy more &amp;quot;dangerous&amp;quot;&lt;br /&gt;
* perpendicularity is the absolute value of the cosine of the difference between the angle from the point to [[HawkOnFire]]'s current location and the angle from the point to the enemy.  This is 0 when the point is at a right angle and 1 if the point is directly toward or away from the enemy.&lt;br /&gt;
* distanceSq is the distance from the point to the enemy.&lt;br /&gt;
&lt;br /&gt;
Once you understand this formula, you pretty much understand [[HawkOnFire]].&lt;/div&gt;</summary>
		<author><name>Starrynte</name></author>
		
	</entry>
</feed>