Archived talk:User:Nat 20090406

From Robowiki
Revision as of 06:07, 26 March 2009 by Zyx (talk | contribs) (fixed grammar)
Jump to navigation Jump to search

Just wanted to say welcome, and glad you're already making yourself at home. :-) Best of luck with your bots! --Voidious 21:59, 3 January 2009 (UTC)

Thanks, Voidious for your warm welcome! Therefore, I think my robots have the best luck already :) (How many time you see 3-months-experienced robocode programmer has his robot in top 10?) --Nat 07:51, 4 January 2009 (UTC)

Hey, I have problem with the old wiki! I can't update participant list! Does anyone know what happen? --Nat

Maybe you're running into the protection the old wiki had against edits which modify too many external urls at once? It did have an anti-spam measure where edits that added/changed too many urls would silently be dropped. If this is it could can just spread your editing of the list over multiple edits to make it work --Rednaxela 17:41, 17 February 2009 (UTC)

  • Thanks, I will move all my bot to my new download page (http://nat.robothai.net/robots/) I'm changing 6 urls on Participants page and 3 urls on MeleeParticepants page. I soon found out that the limit is 2 urls. I have one question to ask, is it your code? If it is, could you increase that? I must scroll to bottom of the page to edit it again. » Nat | Talk » 13:52, 18 February 2009 (UTC)

Hi, I've read about your competitions. You are very lucky to have such contests in you country. And the prizes are nice, too. ;) --HUNRobar 17:45, 17 February 2009 (UTC)

Thanks, Robar!

Hi, which bot did you participated in the one-on-one competition, where you got 2nd? I'm curious. ;) --HUNRobar 19:12, 4 March 2009 (UTC)

Do you mean the my country competitions? OK, not a bot on the wiki, and I'll not released that bot =) » Nat | Talk » 23:54, 4 March 2009 (UTC)

If you really want to know, it's pre-BlackHole version. Use modified version of DCBot gun and very buggy wave surfing movement that act like flattener is always enabled. Now, it is BlackHole, really. » Nat | Talk » 07:50, 5 March 2009 (UTC)


Will my robot run in time if I

  • Execute 3 Waylander Pattern Matching Guns
  • Perform a gaussian bin smoothing over 240 float VCS buffers
  • Build over 240 K-d Tree cluster.

in each ticks? I won't tell you what do I do with the result data until I finish one of my bot. Just want to know. If it can't run in time, will it if only 240 VCS + 120 DC or or 180 VCS + 90 DC or 120 VCS + 60 DC? 10:35, 23 March 2009 (UTC)

Heh, probably not for any of the numbers you suggest, that's WAY too out there I think. Of course, feel free to test the limits :) --Rednaxela 14:06, 23 March 2009 (UTC)

That was I feared. Actually, there are 1600 Float VCS buffers. Just forget, I do not have to build cluster and execute PM every turn or update all VCS buffer, just an enemy fire turn (yes, that for movement!!!) Only 400 VCS buffers need to update every turn. I'm sure VCS can, but the DC can't... New plan have 1600 VCS and 20 DC and 3 PM. Averaged Memory Usage: 200MB. Will this version run? » Nat | Talk » 00:45, 24 March 2009 (UTC)

In my experience is hard to know without testing, I had a code with 0 skip turns normally, added a very small code(very deep inside some nested loops), but like 3 comparisons and 2 additions, and it started skipping like crazy. So I strongly suggest testing the limits and and maybe using some profiler to analyze the bottle necks. --zyx 01:16, 24 March 2009 (UTC)

Anyone have super computer? I need a Super Computer with at least 600GB of ram right now because I just rewrite BlackHole buffer system. That result to my question above.

The finest, highest segment contains 2,829,103,200 bins. It is double so it consumes ~170GB. With all buffers, it requires ~600GB (or 599.78GB, really) of RAM. You need -Xmx614400MB (or -Xmx600GB if JVM accept) to run it. The 200MB I calculated above is certainly wrong. I always get ....... is not start in 32768ms... giving up. from current BlackHole.

So answer is: Yes it will run in robocode-specific time, but it doesn't have enough startup time to allocate all those gigabytes. Don't even try, if it successfully initialize, both your hard disk and RAM will throw java.lang.StackOverflowError!

» Nat | Talk » 13:08, 24 March 2009 (UTC)

I think, more correctly, it *might* run in robocode specific time. I doubt it. But yeah. Now you know why DrussGT only has 100 regular surfing buffers, each with a maximum of 5 different dimensions. Be aware that DrussGT skips the occasional turn just with 100 buffers, 1x DC, 1x PM, and 1x a *very* simple VCS buffer. --Skilgannon 14:01, 24 March 2009 (UTC)

Oh, I doesn't know that DrussGT have maximum of 5 dimensions! Actually, I found that DrussGT have 105 regular surfing buffers and 53 flattener buffers. » Nat | Talk » 00:13, 25 March 2009 (UTC)

Yes but the first 5 regular buffers are almost very lightly segmented, as are the first 3 flattener buffers. --Skilgannon 12:03, 25 March 2009 (UTC)


Just wonder about BasicSurfer, is it getVelocity() * Math.sin(getBearingRadians()); to calculate myself lateral velocity? After I do some math and realize that it should be getVelocity() * Math.sin(-Math.PI - getBearingRadians()); instead. Am I wrong? » Nat | Talk » 11:51, 25 March 2009 (UTC)

They are the same thing. sin(-x) = -sin(x) and sin(PI + x) = -sin(x). So sin(x) = -sin(PI + x) = sin(-PI - x) --Skilgannon 12:03, 25 March 2009 (UTC)

It seem that I need to concrete more in my math class! Anyway, I found the mistake in Chase-san RobotState class that I start using. One more, does cos(-PI - x) same as cos(x)? » Nat | Talk » 12:15, 25 March 2009 (UTC)

No, cos(-PI - x) = -cos(x). --zyx 14:13, 25 March 2009 (UTC)

Thanks! Anyway, I'm getting confused about the Lateral Velocity and Advancing Velocity, is it calculate by:

// Enemy
double enemyLatVel = e.getVelocity() * Math.sin(e.getHeadingRadians() - getHeadingRadians() - e.getBearingRadians());
double enemyAdvVel = e.getVelocity() * -Math.cos(e.getHeadingRadians() - getHeadingRadians() - e.getBearingRadians());
// Me
double myLatVel = getVelocity() * Math.sin(e.getBearingRadians());
double myAdvVel = getVelocity() * Math.cos(e.getBearingRadians());

? Actually, I haven't learn trig in my school yet. » Nat | Talk » 02:43, 26 March 2009 (UTC)

I think it may be correct, but because there are many ways to calculate them, from the periodic and symmetric properties of sin and cos, let me try and explain how I calculate them and why, hopefully it will help design your own way(or be certain is already correct):
double bearing = getHeadingRadians() + e.getBearingRadians();
// Enemy
double enemyLatVel = e.getVelocity() * Math.sin(e.getHeadingRadians() - bearing);
double enemyAdvVel = e.getVelocity() * Math.cos(e.getHeadingRadians() - bearing);
// Me
double myLatVel = getVelocity() * Math.sin(e.getHeadingRadians() - (bearing + Math.PI));
double myAdvVel = getVelocity() * Math.cos(e.getHeadingRadians() - (bearing + Math.PI));

My code will at least give enemyAdvVel with opposite sign as yours, but for me a negative AdvVel means getting closer, and I think in yours means getting further away. Either way the important thing to know is the meaning of it's sign, the magnitude is the same. After having the enemy velocities formulas, is easy to change it to yours, as you can see all I do is change his velocity and heading for mine, and instead of bearing I use (bearing + Math.PI), which would be a vector pointing in the opposite direction. But if you print to console the values you get, worry about the sign, if it gives the correct sign always is most likely correct, the magnitude is usually correct. For me LatVel is <0 counter-clock wise and >0 clock wise. And AdvVel is <0 approaching and >0 retreating. Hope it helps. --zyx 05:06, 26 March 2009 (UTC)

Robocode Question

To all robocoders, I've some question:

  1. How many of you still active? I have some list that I post to Robar, but I really know how many are they?
  2. David Alves start developing roborumble.org since 2007, 2 years passed, nothing happen! Where is him
  3. Are still Paul, Kawigi, David Alves and many more remember robocode?
  4. Is ABC take a break from robocode?
  5. Are Voidious and other robocoder still active or semi-active?
  6. Are there anyone except me, Robar and CrazyBassoonist‎ still developing their robot? Almost every bot is the same as last six months.

These are stupid questions, but feel lonely in this robocode world now. I'm almost last user entered robocode community. (Not sure on which me or CrazyBassoonist is last.) I've read on (mostly) quality articles by Paul, Kawigi, David Alves, ABC and many others. (these 4 people is one who I want to talk to) Thanks. » Nat | Talk » 13:52, 18 February 2009 (UTC)

I'm active, as is Rednaxela. I haven't been doing much with my bots mostly due to lack of time. In the limited time for testing that I have had, the changes that I tried didn't help, so I haven't released a new DrussGT. My melee wavesurfing algorithm is about half completed. So far I can keep track of all the waves that get (or may have been) fired. I still have to add some logic for deciding which wave hit a bot based on which firing bot gets an energy bonus. But it's already a monster... --Skilgannon 14:58, 18 February 2009 (UTC)

Like Skilgannon noted, I'm active. Well, as far as David Alvis and roborumble.org, it's a matter of life being busy and getting in the way. See this post for more information. Paul/Kawigi/David I don't know details of indeed haven't been active. ABC did make some tweaks to Shadow a few months ago I believe so not entirely inactive, not to mention he put significant effort into hosting a temporary RR server during the transition between the old one and DarkCanuck's one, and also is to credit for nice things like the shiney LRP graph on DarkCanuck's server. Some like Kev have been mostly sleeping, though Kev was briefly awoken by LunarTwins taking the crown he held in TwinDuel, and also to make a multiple choice pattern matcher in attempt to take the micro crown. GrubbmGait while inactive in 2008, has here expressed intent to be more active in 2009. As far as "still developing their robot", I believe a number of people, such as myself are not actively working on any robot we already have released much, but instead are slowing working on new robots/ideas. Personally class is keeping me rather busy, but I am squeezing in some Robocoding time, which I was earlier spending on SaphireEdge and more recently on the SaphireSlippers (speaking of which I just had some promising results for yesterday). --Rednaxela 15:30, 18 February 2009 (UTC)

Hi! I saw you uploaded nano.AW at almost the same time I did with nano.Prestige. :) Great one, but not better than Prestige. :P Take a look at fighting each other, both in rankings and battles. ;) --HUNRobar 20:43, 18 February 2009 (UTC)

Like almost all my nano bots, it fully fooled PM! Like almost my nano bots again, it use WeekendObsession's gun. It my test bot to your AOM idea. I not expect much, it stuck at wall often. » Nat | Talk » 09:51, 19 February 2009 (UTC)

Melee wavesurfing

In reply to your question:

I think I must keep track of enemy gunheat instead of energy drop.
I also think that TrueSurf is impossible for extend-robot so I
''must'' use goto-style surfing. Anyone have idea?

Here are my thoughts:

In some ways, I would say the challenge is similar to that of melee wavesurfing which I've been thinking about, because in both you cannot keep a constant radar lock. I'd agree that you need be tracking gunheat in order to get reasonable precision with it. Here's the way I'd do it:

  • Every time you see the enemy, do energy based calculations to see if they've fired since you last saw them, and if so, how powerfully they fired.
  • Use gunheat tracking which presumes they always fire as soon as possible, in order to estimate WHICH tick tick they fired on and place the wave accordingly.
  • In the event that they don't fire between times that you've seen them and their gunheat is 0, then your gunheat tracking data for the next time they fire is invalid for sure, and you'd either have to presume they fired in the middle of the time you didn't see them OR start making waves for every tick they could have fired during. Generally, this would not be an issue because this would only happen if they stopped firing.
  • To know where they fired from you need to use interpolation of their location of course

That's the approach I'd take to melee/extend-robot wavesurfing anyways. Really, I'd say the only difference between melee goto wavesurfing, and extend-robot wavesurfing, would be that the extend-robot also wouldn't be able to turn while moving forward or scan while moving. The basic challenges in the algorithm seem the same to me.

--Rednaxela 21:14, 4 February 2009 (UTC)

Well, I think melee wavesurfing is too hard ;) I had seen melee wavesurfing challenge, and I saw that almost index is under 1! Turning doesn't take too long if velocity is zero but I must have a very unique precise predictor. In order to get enemy fire time if his/her gunheat is still zero, I think I'll use statistic-base algorithm. I also think that some bot doesn't fire until its gun correctly aligned. I think I must use the onHitByBullet plus some enemy gun projection in order to place wave correctly. Here are some more of my ideas for it (which can add to your above):

  • Don't remove waves until it fully out of battlefield.
  • If you get hit by bullet, calculate how many tick it flight and set new gunheat.
  • In a rare case of 2 bullets were flight during missing scans, I don't know how to do!

» Nat | Talk » 12:26, 5 February 2009 (UTC)

The2XXXClub

Just asking, I think now, all those The2XXXClub are harder to entered since now, we can create a strong robot with copy and past from this wiki! Ot, maybe some problem on Darkcanuck's ELO calculation. Should we change from ELO rating to Glicko-2 system there? I know that it MUCH over than the ELO rating. Or we need The8500Club (note the APS score!) :) » Nat | Talk » 19:38, 22 February 2009 (UTC)

When the set of pairings is incomplete, Glicko-2 is the most accurate, and when the set of pairings is complete, it gives the same ranking as APS so far as I can see. Therefore I do think that Glicko-2 is the best system. As far as changing club names, I don't think we need to: What I think needs to happen, is Darkcanuck adjust the parameters of the Glicko-2 so that values match the existing clubs and such, after all the Glicko-2 algorithm itself doesn't specify the scaling ;) --Rednaxela 19:54, 22 February 2009 (UTC)

So I can enter The2000Club if my Glicko-2 reating reach 2000 even the ELO does not? If that so, the club will be a LOT larger :) (top 42 bots are in there with Glocko-2) » Nat | Talk » 13:05, 23 February 2009 (UTC)

No no, that's not what I mean, I mean that Darkcanuck shoud tweak the scaling of the Glicko-2 scores so they mroe closely match the most stable ELO ones in general. --Rednaxela 14:31, 23 February 2009 (UTC)

The exactly question I'm asking is, the ELO rating are LOT harder, still we will use that ELO for the club? » Nat | Talk » 15:17, 24 February 2009 (UTC)

I think the Glicko-2 should be scaled so that DrussGT is ~2150 and RaikoMX ~2030. It seems that with the ELO as more battles are run it tends to compress the ratings. --Skilgannon 19:10, 24 February 2009 (UTC)

Multiply the Glicko-2 by 0.98 is good. DurssGT at 2141 and RaikoMX at 2021 or multiply the ELO there by 1.02 should be fine for now, shall it? » Nat | Talk » 19:29, 24 February 2009 (UTC)

No, the ratings 'center' at 1600. So multiplying the Glicko-2 'spread' by ~0.939 would be correct. --Skilgannon 19:57, 24 February 2009 (UTC)

So if I get 2026 Glicko-2, can I assume that I've a ticket for The2000Club? » Nat | Talk » 20:14, 24 February 2009 (UTC)

New Thai RoboWiki

Hi, I'm now getting the new thai robowiki (http://wiki.robothai.net/) running. I'd want to know who is this wiki administrator? I'd like him/her to just process one database query for me (I talk to you, Voidious) :)

INSERT INTO `(whatever prefix or not)interwiki` VALUES('th','http://wiki.robothai.net/wiki/$1',0,0);

That's all, I just want the interlanguage link between two wikis. I've finish set up on my wiki. You'll see that English link at the language box in the left :) » Nat | Talk » 17:39, 1 March 2009 (UTC)

About compiling robots

Hi! I took a look at OcnirpSNG and WeekendObsession in NetBeans and I was totally surprised! My codesize calculated Ocnirp 250 bytes and WeekendObsession 253 bytes. But both of them are under-250 byte nanos! I'm really wonder what you compile your robots with. I have my new nano with 250 bytes, so it's very crucial for me. --HUNRobar 21:01, 1 March 2009 (UTC)

Apparently compiling with Jikes shaves a few bytes off sometimes. I never bother though because it's only a small number --Rednaxela 21:39, 1 March 2009 (UTC)

Note, I use eclipse to compile my robot. Don't know what compiler it use, but it seem that it can reduce more codesize =D » Nat | Talk » 12:11, 2 March 2009 (UTC)

Hurray! I made an Eclipse project for my bots and almost all of them gained 2-4 bytes! I think I must figure out something to develop on them. For instance, my new nano is 247 bytes now. --HUNRobar 19:14, 2 March 2009 (UTC)

Symbolic Dynamic Segmentation

Have anyone work with Symbolic Dynamic Segmentation? I just finish 3 hours writing/debugging my Symbolic Dynamic Segmentation gun and it's extreme slowly. At first, I use a log of 10,000 firing waves over 17 segments. It skip every turn since round 16. Now, I use log of 1,000 firing waves over 7 segments, skip a couple of turns for every 10 rounds. Do anyone have any ideas on improved the performance? I'll post the source after I finished running my TC2K7. » Nat | Talk » 13:46, 10 March 2009 (UTC)

  • I haven't tried Symbolic Dynamic Segmentation, but maybe this algorithms can help you String Search Tutorial. --zyx 16:17, 10 March 2009 (UTC)
  • Note: SDS doesn't search within a long string, but search within a list of strings. I'll try to reimplements it as one large string, but I must figure out how first... » Nat | Talk » 13:47, 11 March 2009 (UTC)
    • To implement it as one large string you'd need to either 1) compress each data point to fit within 16 bits, 2) make certain characters of the string use characters never used in other parts, or 3) you'd need add a "marker" character to either the start or end of each data point. Note, this might possibly be lower performance, if you use builtin string searching with option #2 or #3. This is because the string functions would compare unaligned spots too. Note, I say "might", because it could still be faster if the optimization of the builtin string functions is good enough. --Rednaxela 15:24, 11 March 2009 (UTC)
      • That is what I think, prefix a segment with special character (say (char)255), then perform a String.indexOf(). In order to find the GF, record hit bin before that special character. After reading, I think it is now PM-GF, not SDS. One thing I know, Virus have 10,000 log recorded. It use ordinary array where I use LinkedList :( I'll try ArrayList and if see can increase the log size... » Nat | Talk » 01:36, 12 March 2009 (UTC)
  • I think that instead of make it one large string, you can tweak the algorithm to work. Let's say you have M strings, and N[i] is the size of string i, you can do something like:
function Knuth_Morris_Pratt(text[][], pattern[])
{
  build_failure_function(pattern[]); 
  i = 0;
  j = 0;
  k = 0;
  for( ; ; ) {
    if(j == N[k]) {
      if ( ++k >= M ) break; // we reached the end of the last string
      else i = j = 0; // Reset state to empty string, and point to the start of the string
    }
    if(text[k][j] == pattern[i])
    ...
  }
}
  • If modified to use multiple string, I think the String.equals() is faster anyway. I currently use equalsIgnoreCase(), but with same segment generate function, using equals() does same math but faster? I think I'll move this discussion to my research page. » Nat | Talk » 01:36, 12 March 2009 (UTC)

You cannot post new threads to this discussion page because it has been protected from new threads, or you do not currently have permission to edit.

There are no threads on this page yet.