http://robowiki.net/w/api.php?action=feedcontributions&user=Mageek&feedformat=atomRobowiki - User contributions [en]2024-03-29T02:12:54ZUser contributionsMediaWiki 1.34.1http://robowiki.net/w/index.php?title=User:Mageek&diff=7962User:Mageek2009-06-03T19:03:30Z<p>Mageek: </p>
<hr />
<div>A new robocoder, just started last year (2008).<br />
I got my first glimpse of robocode when some of my friends decided to have a robocode competition.<br />
<br />
'''Bots:'''<br />
<br />
StateChanger - my first bot. Changes behavior according to battlefield state. Unfortunately is a megabot.<br />
<br />
GFSurfer - uses things learned on this wiki to build a decent bot. GF targeting, Wave Surfing, segmentations, saving.<br />
<br />
--[[User:Mageek|Mageek]] 03:46, 2 June 2009 (UTC)</div>Mageekhttp://robowiki.net/w/index.php?title=User:Mageek&diff=7928User:Mageek2009-06-02T03:46:25Z<p>Mageek: updated user page as I have a new robot</p>
<hr />
<div>A new robocoder, just started last year (2008).<br />
I got my first glimpse of robocode when some of my friends decided to have a robocode competition.<br />
<br />
'''Bots:'''<br />
<br />
StateChanger - my first bot. Changes behavior according to battlefield state. Unfortunately is a megabot.<br />
<br />
GFBot - uses things learned on this wiki to build a decent bot. GF targeting, Wave Surfing, segmentations, saving.<br />
<br />
--[[User:Mageek|Mageek]] 03:46, 2 June 2009 (UTC)</div>Mageekhttp://robowiki.net/w/index.php?title=Talk:Robocode/Game_Physics&diff=7745Talk:Robocode/Game Physics2009-05-28T03:39:15Z<p>Mageek: thanking Voidious</p>
<hr />
<div>I need to know percisely, which might involve rotating a rectangle, I don't know, if a point intersects my bot, given its X and Y location. Remeber that in Robocode, Y is reversed. While I'm at it, I might just ask: What your opinion is on whether I should do surfing or anti-gravity movement to dodge predicted bullets my robot simulates?<br />
--[[User:Awesomeness|Awesomeness]] 21:52, 3 May 2009 (UTC)<br />
<br />
The 'hitbox' of a robot is always a non-rotated square at the bot's location, so the former check is very very simple. As for your second question: It depends. Surfing is going to be stronger almost surely, however anti-gravity movement is considerably simpler. My suggestion would be to do anti-gravity for now, and at a later date try surfing once you feel comfortable with exactly how it works. --[[User:Rednaxela|Rednaxela]] 22:01, 3 May 2009 (UTC)<br />
<br />
Oh, is it a 40 pixel long sqare? that's what it looks like. --[[User:Awesomeness|Awesomeness]] 22:43, 3 May 2009 (UTC)<br />
<br />
No, it is 36px non-rotating square. &raquo; <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> &raquo; 23:42, 3 May 2009 (UTC)<br />
<br />
When, in the execution order, are bullets fired, and when is the gun turned? Thanks! --[[User:Mageek|Mageek]] 02:44, 28 May 2009 (UTC)<br />
<br />
I believe that's part of #2 in the "Robocode Processing Loop" section. I can tell you for sure, though, that if you do setFire and setTurnGunRight in the same turn, the bullet will fire at the bearing of your gun ''before'' that gun turn happens. Both of them happen on the next tick, but the bullet is fired as if it were fired on the same tick as setFire (the location is from that tick, and it has advanced by its velocity once). Does that answer your question? --[[User:Voidious|Voidious]] 02:53, 28 May 2009 (UTC)<br />
<br />
Thank-you, that is exactly what I was trying to figure out. --[[User:Mageek|Mageek]] 03:39, 28 May 2009 (UTC)</div>Mageekhttp://robowiki.net/w/index.php?title=Talk:Robocode/Game_Physics&diff=7739Talk:Robocode/Game Physics2009-05-28T02:44:34Z<p>Mageek: </p>
<hr />
<div>I need to know percisely, which might involve rotating a rectangle, I don't know, if a point intersects my bot, given its X and Y location. Remeber that in Robocode, Y is reversed. While I'm at it, I might just ask: What your opinion is on whether I should do surfing or anti-gravity movement to dodge predicted bullets my robot simulates?<br />
--[[User:Awesomeness|Awesomeness]] 21:52, 3 May 2009 (UTC)<br />
<br />
The 'hitbox' of a robot is always a non-rotated square at the bot's location, so the former check is very very simple. As for your second question: It depends. Surfing is going to be stronger almost surely, however anti-gravity movement is considerably simpler. My suggestion would be to do anti-gravity for now, and at a later date try surfing once you feel comfortable with exactly how it works. --[[User:Rednaxela|Rednaxela]] 22:01, 3 May 2009 (UTC)<br />
<br />
Oh, is it a 40 pixel long sqare? that's what it looks like. --[[User:Awesomeness|Awesomeness]] 22:43, 3 May 2009 (UTC)<br />
<br />
No, it is 36px non-rotating square. &raquo; <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> &raquo; 23:42, 3 May 2009 (UTC)<br />
<br />
When, in the execution order, are bullets fired, and when is the gun turned? Thanks! --[[User:Mageek|Mageek]] 02:44, 28 May 2009 (UTC)</div>Mageekhttp://robowiki.net/w/index.php?title=User:Mageek&diff=7542User:Mageek2009-05-25T16:58:42Z<p>Mageek: update user page due to release of new bot</p>
<hr />
<div>A new robocoder, just started last year (2008).<br />
I got my first glimpse of robocode when some of my friends decided to have a robocode competition.<br />
<br />
Bots:<br />
StateChanger - my first bot. Changes behavior according to battlefield state. Unfortunately is a megabot.<br />
<br />
Working on understanding all the techniques employed.<br />
--[[User:Mageek|Mageek]] 16:58, 25 May 2009 (UTC)</div>Mageekhttp://robowiki.net/w/index.php?title=User_talk:Mageek&diff=7503User talk:Mageek2009-05-24T21:25:30Z<p>Mageek: Reply to previous comment</p>
<hr />
<div>{| width="100%" style="background: white; " <br />
| valign="top" width="60%" style="border: 2px solid #000; padding: .5em 1em; -moz-border-radius: 1em; -webkit-border-radius: 1em" |<br />
'''Welcome!'''<br />
<br />
Hello, Mageek, and welcome to RoboWiki! This place contain a wealth information about [[Robocode]], from [[Head-On Targeting|basic]] to more [[Wave Surfing|advanced]]. I hope you enjoy creating a robot and being a robocoder!<br />
<br />
If you are posting a comment on this wiki, please [[wikipedia:Wikipedia:Signatures|sign]] your messages using four tildes (<nowiki>--~~~~</nowiki>); this will automatically insert your username and the date. If you are not familiar with MediaWiki, these links might help you out:<br />
* [[wikipedia:How to edit|How to edit]] on [[wikipedia:|Wikipedia]], [[metawikipedia:Cheatsheet|Cheatsheet]] and [[metawikipedia:File:MediaWikiRefCard.pdf|Reference Card]] of MediaWiki on the [[metawikipedia:|Meta Wiki]].<br />
* [[RoboWiki:ReadMe|Readme]] page.<br />
If you need [[Help:Help|help]], check out the [[Robocode/FAQ|frequently asked questions]] or ask it on this page. Again, welcome!<br />
<br />
—— [[User:Nat|Nat]] 08:23, 23 May 2009 (UTC) <br />
|}<br />
<br />
Please mark an edit as minor edit when you just fixing grammar or typo. Please use edit summary field briefly describe what you have done. More information is available on Wikipedia. Thank you. &raquo; <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> &raquo; 02:25, 24 May 2009 (UTC)<br />
<br />
Thanks! I will read through the editing how to before doing any more. Never done this before. --[[User:Mageek|Mageek]] 21:25, 24 May 2009 (UTC)</div>Mageekhttp://robowiki.net/w/index.php?title=Minimum_Risk_Movement&diff=7436Minimum Risk Movement2009-05-23T22:15:20Z<p>Mageek: </p>
<hr />
<div>{{cleanup}}<br />
A very effective type of [[Melee]] movement that is not completely unlike [[Anti-Gravity Movement]] in implementation. The idea is to pick a series of points that you could go to next, and rate each one with a 'risk factor', then move to the lowest-risk location.<br />
<br />
==== Bots that use it ====<br />
Some of the robots that use this basic system in [[melee]], whether or not the authors call it that:<br />
* [[FloodHT]]<br />
* [[HawkOnFire]]<br />
* [[GlowBlowMelee]]<br />
* [[Tron]]<br />
* [[Shadow]]<br />
* DuelistMiniMelee<br />
* [[Troodon]]<br />
* [[Vapour]]<br />
* [[Griezel]]<br />
<br />
==== Calculating the Risk Factor for a point/movement ====<br />
<br />
For [[FloodHT]], the system for this is somewhat like finding the magnitude of a force in an [[Anti-Gravity Movement]] system. For each enemy, it use a base risk of a certain point is energy/distance<sup>2</sup>. Other things it take into account for each enemy:<br />
* would I be the closest enemy to them at that point?<br />
* have they shot me recently?<br />
* would the path from my current location to the proposed point intersect them?<br />
Other things it could have in the future:<br />
* what is my lateral angle to them? (higher risk to go toward/away than to move perpendicular to them, the dev version of [[FloodHT]] already does this at least some of the time)<br />
Other things it take into account aside from its enemies:<br />
* repel my current location (don't want to stay in the same place for too long)<br />
* The center<br />
* The distance I would have to travel (going a long way in a large battle can be perilous!)<br />
<br />
==== Picking points to try ====<br />
<br />
It's important to pick a good range of practical places to go to for this to work well. Applying a force to the walls is unnecessary if you always just pick points within the battlefield. I believe that [[HawkOnFire]] picks several points around him in regular angular offsets at random distances. The next version of [[FloodHT]] will do this at least some of the time. [[Tron]] obviously picks 4 points, at pretty much uniform distance, up, down, left and right. He also avoids [[Head-On Targeting|head-on]] aim like the plague. [[FloodHT]] 0.8 uses a divide-and-conquer sort of system. He divides the battlefield up into 16 rectangles, and rates each one based on the risk of its center point. If he's far away from that point, he goes to it, otherwise he splits that rectangle up into 16 more rectanges and rates them and goes to that point (or continues to subdivide until it just doesn't make a difference anymore). The dev version does this at the beginning of the battle to get situated and then starts picking points around him at a distance.<br />
<br />
[[Category:Melee]]<br />
[[Category:Movement]]</div>Mageekhttp://robowiki.net/w/index.php?title=User:Mageek&diff=7435User:Mageek2009-05-23T21:40:28Z<p>Mageek: Created page with 'A new robocoder, just started last year (2008). I got my first glimpse of robocode when some of my friends decided to have a robocode competition. No released bots, but hopefull...'</p>
<hr />
<div>A new robocoder, just started last year (2008).<br />
I got my first glimpse of robocode when some of my friends decided to have a robocode competition.<br />
<br />
No released bots, but hopefully that will change.<br />
<br />
Working on understanding all the techniques employed.</div>Mageekhttp://robowiki.net/w/index.php?title=User_talk:Voidious&diff=7358User talk:Voidious2009-05-23T00:18:27Z<p>Mageek: /* public class EnemyWave */ new section</p>
<hr />
<div>==Point2D Help==<br />
Hey. I'm trying to debug my Anti-Gravity Movement I'm working on implementing into [[GITS]]. I'm trying to draw a circle with Point2D, but I can't get it to compile. The code I'm using is <code>drawCircle(java.awt.Point2D.Double, int, java.awt.Color);</code>. I just want to know if I'm doing it right. Thank you --[[User:J Litewski|HACKhalo2]] 19:47, 21 May 2009 (UTC)<br />
<br />
Hey dude - I'm guessing you saw that method in Dooki's DookiCape.java? I derived my drawing code from [[User:David Alves]]' DrawingBot (not migrated yet, see {{OldWiki|David_Alves/DrawingBot}}), which is similar to [[User:Nat/DrawingBot]]. Basically, you would need something like this to support that call:<br />
<br />
<pre><br />
private static Vector _renderables = new Vector();<br />
<br />
public void onPaint(Graphics2D g) {<br />
Iterator i = _renderables.iterator();<br />
while(i.hasNext()){<br />
Renderable r = (Renderable) i.next();<br />
r.render(g);<br />
}<br />
_renderables.clear();<br />
}<br />
<br />
public static void drawCircle(Point2D.Double center, double radius, Color color){<br />
_renderables.add(new Renderable.Circle(center, radius, color));<br />
}<br />
</pre><br />
...plus the Renderables class from DrawingBot (linked above). Does that help / make sense? --[[User:Voidious|Voidious]] 20:08, 21 May 2009 (UTC)<br />
<br />
== Redirects ==<br />
Hey, thanks for fixing all those redirects. I never knew that you had to do that to remove them from the category listings. --[[User:AaronR|AaronR]] 03:17, 12 November 2007 (UTC)<br />
<br />
== Misc Chatter ==<br />
<br />
Why not you run more TwinDuel now? I'd like to participated it. --[[User:Nat|Nat]] 07:50, 4 January 2009 (UTC)<br />
<br />
Hey, have you read my message? Look [[User_talk:Nat#New_Thai_RoboWiki|here]] &raquo; <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> &raquo; 09:24, 25 March 2009 (UTC)<br />
<br />
So I see Nat said he'd be interested in the TwinDuel - is anyone else still interested? If I recall correctly, I needed to update my automation for newer versions of Robocode, but that shouldn't be a problem when I get some time. I've definitely been getting the itch recently to do some real Robocoding again, but I'm afraid that if I start, none of the rest of the wiki migration stuff will ever get done. =) <br />
<br />
And whether just for TwinDuel or for some active Robocoding, I really need to either explore this "Soy Latte" version of Java 6, or find another machine to work on, as I've come to accept that I will never see Java 6 on my Mac. =(<br />
<br />
--[[User:Voidious|Voidious]] 14:58, 23 April 2009 (UTC)<br />
<br />
Thanks for reply. I think I add that comment very first day on this wiki ;D I don't really think the migration stuff will never finish even you start robocoding again. I'm currently take a pause from developing robot for migration work (and few other reasons) But, do you think I should finished Challenge 2K9 before start my own migration work? Does robocode require Java 6? &raquo; <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> &raquo; 15:23, 23 April 2009 (UTC)<br />
<br />
: I don't know, I think that's up to you about Challenge 2K9. I haven't really read all the Challenge 2K9 info yet, but I'll try to soon. No, Robocode doesn't require Java 6, but some people use Java 6 in their TwinDuel bots, and it feels silly at this point to require people not to use Java 6 just because I don't have it on my Mac! --[[User:Voidious|Voidious]] 15:54, 23 April 2009 (UTC)<br />
<br />
:: If you have time, please help me doing the thing on Komarious. I want it to controlled distance at 450 (using Dookious AgressiveDistanceController), surf non-firing wave (rolled at 1, weight 1/6), surf hit (rolled at 0.8, weight 2), surf visit (rolled 1, weight 1) from Komarious 1.78 please? Thanks. &raquo; <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> &raquo; 16:08, 23 April 2009 (UTC)<br />
<br />
I used SoyLatte successfully until I upgraded to Leopard (which has an optional 1.6 install). Let me know if you ever want to integrate TwinDuel into the rumble. --[[User:Darkcanuck|Darkcanuck]] 15:35, 23 April 2009 (UTC) <br />
<br />
: Wow, cool, thanks for the info! I definitely heard of a developer beta at some point, but I think it was only for 64-bit processors, and I'm still on a 1st gen MacBook. Looking to upgrade soon, though, so maybe Java 6 is one more thing I can look forward to there. =) --[[User:Voidious|Voidious]] 15:54, 23 April 2009 (UTC)<br />
:: You're probably right about 64-bits -- mine's one of the first 64bit models. Buy SoyLatte worked great under X11 last time I tried. --[[User:Darkcanuck|Darkcanuck]] 16:41, 23 April 2009 (UTC)<br />
<br />
: And a TwinDuel rumble sounds very appetizing! The scoring is the only kind of weird thing, since it's survivalist, ignores total score, and is 75 rounds. If we could make the ELO + Glicko + PL stuff look at % rounds won instead of % total score, that would seem more "right" to me. But even just a 2v2 team battle on an 800x800 battlefield with all the normal scoring could be cool, too, if all of the "weird scoring" is a problem. --[[User:Voidious|Voidious]] 15:54, 23 April 2009 (UTC)<br />
<br />
: (Edit conflict) I'm curious, can roborumble client handler the 2000-bytes thing? And will 75 rounds take too long on the client? I don't know really that will anyone run battle for it. MeleeRumble and TeamRumble get only little battles before Deewiant come along with melee rumble, then GrubbmGait start to run team rumble. &raquo; <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> &raquo; 16:01, 23 April 2009 (UTC)<br />
<br />
:: We would have to modify the client to add the new game type and maybe work out a modified version of scoring. The new server does have a % survival scoring option though. With a low number of participants, it wouldn't require much client processing time (less than melee rumble for sure). --[[User:Darkcanuck|Darkcanuck]] 16:41, 23 April 2009 (UTC)<br />
<br />
----<br />
<br />
Do you have any planned with any of your robots now? [[Dookious]] hasn't been updated for an ages. &raquo; <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> &raquo; 14:08, 12 May 2009 (UTC)<br />
<br />
: Well, rest assured that I'm working on something. =) I'm not sure when it will be released, maybe a couple more weeks? As for my existing bots, I don't have specific plans, but they have all been on my mind. I will definitely get back to Dookious sometime -- I can't let Skilgannon have all that fun all by himself. --[[User:Voidious|Voidious]] 14:20, 12 May 2009 (UTC)<br />
<br />
== Segmenting Help ==<br />
<br />
I WILL NOT GIVE UP! I'm going to keep trying! I need a bit of help. I understand wave surfing much better now because of the tutorial you made. Thanks! In the [[GuessFactor Targeting Tutorial]], it teaches you what to change to segment it. Very useful. I've segmented my GF gun with distance, velocity, etc. already. However, I only see part of what I have to change in the wave surfing code. Could you give a simple example in the tutorial to help me? Thanks. -- [[User:Awesomeness]]<br />
<br />
Sure, here's a real simple example. Let's say you want to segment your surf stats on distance. Let's go real simple and just segment into "distance < 300" and "distance >= 300". <br />
<br />
* In your instance variable declarations:<br />
** <code>public static double _surfStats[] = new double[BINS];</code><br />
** becomes <code>public static double _surfStats[][] = new double[2][BINS];</code><br />
* You need to track distance at fire time in your EnemyWave class now.<br />
** In the EnemyWave class definition, add <code>double distance;</code><br />
** In <code>onScannedRobot</code>, where you detect the bullet and initialize the EnemyWave class, add <code>ew.distance = e.getDistance();</code><br />
* In <code>logHit</code>:<br />
** <code>_surfStats[x] += 1.0 / (Math.pow(index - x, 2) + 1);</code><br />
** becomes <code>_surfStats[ew.distance < 300 ? 0 : 1][x] += 1.0 / (Math.pow(index - x, 2) + 1);</code>. (That's an inline if/else statement, you don't have to do it like that if you don't want. Just need to use 0 or 1 for the first array index, depending on the distance.)<br />
* Similarly, in <code>checkDanger</code>:<br />
** <code>return _surfStats[index];</code><br />
** becomes <code>return _surfStats[surfWave.distance < 300 ? 0 : 1][index];</code><br />
<br />
Basically, any information you want to segment on, you would store that information in your wave class. Then whenever you access your _surfStats, you use that data to come up with the array indexes. Effectively, you end up with a bunch of surfStats[] arrays, one for each situation (segment). Make sense?<br />
<br />
--[[User:Voidious|Voidious]] 01:05, 7 May 2009 (UTC)<br />
<br />
There is another way doing this. I'm not using that way because it more complex. I use the magic of reference to do the thing similar to the one in [[GuessFactor Targeting Tutorial]]:<br />
<br />
* In your instance variable declarations:<br />
** <code>public static double _surfStats[] = new double[BINS];</code><br />
** becomes <code>public static double _surfStats[][] = new double[2][BINS];</code><br />
* You need to reference the new segment in your enemy wave now.<br />
** In the EnemyWave class definition, add <code>double[] stats;</code><br />
** In <code>onScannedRobot</code>, where you detect the bullet and initialize the EnemyWave class, add <code>ew.stats = _surfStats[e.getDistance() < 300 ? 0 : 1];</code> (That's an inline if/else statement, you don't have to do it like that if you don't want. Just need to use 0 or 1 for the first array index, depending on the distance.)<br />
* In <code>logHit</code>:<br />
** <code>_surfStats[x] += 1.0 / (Math.pow(index - x, 2) + 1);</code><br />
** becomes <code>ew.stats[x] += 1.0 / (Math.pow(index - x, 2) + 1);</code>. <br />
* Similarly, in <code>checkDanger</code>:<br />
** <code>return _surfStats[index];</code><br />
** becomes <code>return surfWave.stats[index];</code><br />
<br />
(copy from yours, [[User:Voidious|Voidious]]) This way if you are adding more segment, you just need to change only one place (vs. 2 places). Actually I done the <code>ew.stats = _surfStats[ew.distance < 300 ? 0 : 1];</code> thing in constructor of EnemyWave class (by assigning the data to the global variable first of corse). &raquo; <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> &raquo; 15:13, 7 May 2009 (UTC)<br />
<br />
== Time to upgrade ==<br />
<br />
Hi Voidious. I think the upgrade time has come. Please upgrade soon. Thanks. I know you are backing the database up, but first you need is "Wiki Lockdown" <!-- like:<br />
<pre><br />
$wgGroupPermissions['*' ]['edit'] = false;<br />
$wgGroupPermissions['*' ]['createpage'] = false;<br />
$wgGroupPermissions['*' ]['createtalk'] = false;<br />
$wgGroupPermissions['user' ]['move'] = false;<br />
$wgGroupPermissions['user' ]['edit'] = false;<br />
$wgGroupPermissions['user' ]['createpage'] = false;<br />
$wgGroupPermissions['user' ]['createtalk'] = false;<br />
$wgGroupPermissions['user' ]['upload'] = false;<br />
$wgGroupPermissions['user' ]['reupload'] = false;<br />
</pre><br />
... will totally lockdown for anonymous and registered user. (LocalSettings.php) --> or your backup will never present. &raquo; <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> &raquo; 15:21, 7 May 2009 (UTC)<br />
<br />
Soon. =) Probably tomorrow, as I'll be on the away from the computer this evening. --[[User:Voidious|Voidious]] 15:50, 7 May 2009 (UTC)<br />
<br />
== public class EnemyWave ==<br />
<br />
Awesome basicsurfer tutoral.<br />
<br />
Could you edit class EnemyWave to be public class EnemyWave? APIs freak out otherwise.<br />
<br />
Thanks!</div>Mageek