Difference between revisions of "User talk:Zyx"

From Robowiki
Jump to navigation Jump to search
(→‎Dynamic Weighting: no luck so far, a question about movement weightings)
(→‎Sneak Attack: DrussGT's reaction)
Line 82: Line 82:
 
* There are nearly no surfer detecting it, also many surfer do not even detecting wall hit since the bots that hit wall usually a simple robot that can take out easily, and I think it have only little advantage. Say, if you hit, you will get back 3 LP, meaning no change to your LP (firing and hitting cost 3) but if you miss, you will lost 2 energy without doing anything! At distance 300, you have ~12% chance, at distance 400 only ~9% chance! You may said that you have brilliant gun, but ot hit surfer it need more than that! &raquo; <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> &raquo; 13:49, 18 March 2009 (UTC)
 
* There are nearly no surfer detecting it, also many surfer do not even detecting wall hit since the bots that hit wall usually a simple robot that can take out easily, and I think it have only little advantage. Say, if you hit, you will get back 3 LP, meaning no change to your LP (firing and hitting cost 3) but if you miss, you will lost 2 energy without doing anything! At distance 300, you have ~12% chance, at distance 400 only ~9% chance! You may said that you have brilliant gun, but ot hit surfer it need more than that! &raquo; <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> &raquo; 13:49, 18 March 2009 (UTC)
 
* Actually, a fair number of surfers will behave VERY simplistically when they don't know of any waves. I know of one that will just sit still maintaining a certain distance. I know of others that will just orbit in one direction. Given how many surfers do that, I bet you could beat a fair number of them with hidden bullets IF you had a strong gun AND were able to make youre movement unpredictable while still only firing when it can be hidden. --[[User:Rednaxela|Rednaxela]] 14:42, 18 March 2009 (UTC)
 
* Actually, a fair number of surfers will behave VERY simplistically when they don't know of any waves. I know of one that will just sit still maintaining a certain distance. I know of others that will just orbit in one direction. Given how many surfers do that, I bet you could beat a fair number of them with hidden bullets IF you had a strong gun AND were able to make youre movement unpredictable while still only firing when it can be hidden. --[[User:Rednaxela|Rednaxela]] 14:42, 18 March 2009 (UTC)
* Oh! I forgot about that! Anyway, try hitting DurssGT with hidden bullet :) &raquo; <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> &raquo; 15:16, 18 March 2009 (UTC)
+
* Oh! I forgot about that! Anyway, try hitting DrussGT with hidden bullet :) &raquo; <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> &raquo; 15:16, 18 March 2009 (UTC)
 
* Yes I'm sure there are bots that can be affected by them, but I don't believe it can be used to make a bot perform better than having a good surfing with nearly zero wall hits. About hitting DrussGT, I don't think top bots can be harmed much by this, so I will not try to hit him :) --[[User:Zyx|zyx]] 15:21, 18 March 2009 (UTC)
 
* Yes I'm sure there are bots that can be affected by them, but I don't believe it can be used to make a bot perform better than having a good surfing with nearly zero wall hits. About hitting DrussGT, I don't think top bots can be harmed much by this, so I will not try to hit him :) --[[User:Zyx|zyx]] 15:21, 18 March 2009 (UTC)
 +
* From what I remember, DrussGT doesn't have any wallhit detection. I might have added it in once, but I'm not sure if I kept it or if it was too buggy. Anyways, it just fires a wave if your gunheat is at an allowable level, so would get the bullet power wrong but would still surf a wave. --[[User:Skilgannon|Skilgannon]] 21:48, 12 April 2009 (UTC)

Revision as of 22:48, 12 April 2009

Greetings! Welcome to the Robowiki Zyx! Feel free to ask any question you might have! Btw, Newton seems pretty strong, care to tell us about it or Ant. Best wishes in your robocoding adventures! --Rednaxela

Thanks Rednaxela, I was just writing my "story" when you posted, I will expand Newton and Ant in a couple of minutes. -- Zyx

Wow, how did you find Stormrider? It's been out of action for ages.... If you want a version that is slightly newer, and much stronger, take a look at DrussGT, it's download link is on the RoboRumble/Participants page. Anyways, welcome to the wiki, and good luck with your coding =) If you have any questions feel free to ask. -- Skilgannon

Hehehe Stormrider was on the new wiki in the Bots section, and it said it was very competitive so I downloaded it. I was really new to everything at the moment, now I'm more settled, I'm running RoboRumble so I have DrussGT, BTW congrats man, it seems to be very comfortable at the top place :). Thanks for the help and for killing my bot so I'd be interested in learning more. -- zyx

(Oh he may be comfortable at the top for now, but I'm determined to topple DrussGT eventually... Can't have it's reign last as long as Dookious's did... :) --Rednaxela)
Sounds like a neat goal, good luck at it :-). -- zyx
I've still got a few tricks up my sleeve, I just haven't had time to implement them. Involving both guns and movement. And new types of stats. But come on, I'm studying Mechanical Engineering and you're doing Computer Engineering, surely you should have passed me ages ago? ;-) And I've been hearing that you were working on RougeDC's replacement in little snippets here and there, are you ever going to release that to the rumble? -- Skilgannon
Haha, RougeDC's younger and stronger brother doesn't have much done yet... but I'll probably make a hard drive to get at least the gun working in winter break... and my hope is that current generation surfers will be in for some hurt... ;) -- Rednaxela

Oh, and sorry for cluttering your talk page with rivalry Zyx :) --Rednaxela 21:39, 26 November 2008 (UTC)

That's what talk pages are for ;) -- zyx

Dynamic Weighting

Do you know of any bot that calculates the weights for Dynamic Clustering during a battle? Actually if it calculates it's segmentation, or something like that on real time is enough for me. I want a bot that learns how the enemy is learning. I'm currently working on a DC based bot that uses VCS to adjusts the weights for the distancer with very promising results. I know many people have used offline methods to do this, I want to know if there is a bot that actually does it during the battle. --zyx 21:06, 12 April 2009 (UTC)

Me, Voidious, Simonton, ABC and I'm sure others have tried, all without any real success. My methods have included: 1) finding entropy between profile-peak height and any of the attributes (running during non-firing ticks), 2) pulling clusters with each weight modified both directions and seeing which clusters are most accurate with the VG, 3) checking which attribute has the least variation in the last X GFs which were within a certain window and increasing that attribute's weight. So far what we've all found is that a hand-tuned set of weights performs just as well and runs many times quicker. I'm actually dealing with a similar issue in Wintermute, except in the movement, where I'm reluctant to use anything except BulletHitBullet events for changing the weightings because the HitByBullet is affected by what your weights already are. In fact, because the bot probably moved to a safe place for the highly weighted system, it will decrease the weighting for that system (because it got a hit in an area where there shouldn't be any danger), making it cycle between systems that might not be optimal. I know you use something similar in YersiniaPestis, did you take this into account? Did you manage to find a way around it? --Skilgannon 21:38, 12 April 2009 (UTC)

Sneak Attack

I just realized there are ways to shoot completely undetected bullets, I tried to make a bot based on that but I can't find an easy way to use the exploit and be competitive at the same time. So I decided to just post how to fire undetectable bullets, I haven't really searched, so maybe this has been said elsewhere.

I think most surfers have some way to detect (as good as they can) when their enemy hits a wall so they are not confused by that energy drop. So if you run towards a wall at some speed, let's say full speed (8), and when you are just about to hit the wall you decelerate and a fire a 1 power bullet. Your enemy will calculate your damage as 8 / 2 - 1 = 3, but you were actually going at 6 at the hit time, so you got 6 / 2 - 1 = 2 wall hit damage, but since you shot a 1 powered bullet they won't see anything strange as your energy dropped 3. And even if someone has thought of that, and took the guess that maybe the bot decelerated you can shoot only sometimes, and make him surf bogus waves.

This bot shows how to shoot the invisible bullets, it bounces on and off from the top wall (sometimes the bottom) and shoots head on, so it will lose to almost every(if not all) bots. But I challenge anyone to try and detect accurately when he fires. My bots detect some of them, but is not even close to accurate.

package zyx.nano;

import robocode.AdvancedRobot;
import robocode.HitWallEvent;
import robocode.ScannedRobotEvent;
import robocode.util.Utils;

public class SneackAttack extends AdvancedRobot {
  static int direction = 1;
  private boolean nh;
  private int t;
  public void run() {
    while ( true ) {
      if ( getRadarTurnRemainingRadians() == 0 ) setTurnRadarRightRadians(Double.POSITIVE_INFINITY);
      execute();
    }
  }
  public void onScannedRobot(ScannedRobotEvent event) {
    double bearing = getHeadingRadians() + event.getBearingRadians();
    setTurnGunRightRadians(Utils.normalRelativeAngle(bearing - getGunHeadingRadians()));
    setTurnRightRadians(Utils.normalRelativeAngle(-getHeadingRadians()));
    setTurnRadarRightRadians(Utils.normalRelativeAngle(bearing - getRadarHeadingRadians()) * 1.99);
    double v = getVelocity();
    if ( v < 0 ) v += 2; else if ( v > 0 ) v -= 2;
    double nx = getX() + Math.sin(getHeadingRadians()) * getVelocity() + Math.sin(getHeadingRadians()) * v;
    double ny = getY() + Math.cos(getHeadingRadians()) * getVelocity() + Math.cos(getHeadingRadians()) * v;
    if ( nh ) {
      if ( Math.random() < 0.8 ) setFire(1);
      setAhead(0);
    } else {
      setAhead(100 * direction);
    }
    nh = false;
    if ( t == 5 ) direction = -direction;
    if ( --t <= 0 && (nx < 19 || ny < 19 || nx > 781 || ny > 581) ) {
      nh = true;
    }
  }
  public void onHitWall(HitWallEvent arg0) {
    direction = -direction;
    t = 20;
  }
}

Have fun. --zyx 07:13, 18 March 2009 (UTC)

Haha, perfectly accurate detection is impossible. It has been discussed here (see some of ABCs notes) why one can at best guess the wall damage with an error between +0.5 and -1.0. The only possible real countermeasures I believe are: 1) Fire low-weight waves whenever the enemy hits the wall or 2) Detect if you got hit by a wallhit-concealed bullet, and if so presume they always make wallhit-concealed hits so long as gunheat indicates that they could have. A truely accurate countermeasure? That's impossible. --Rednaxela 07:25, 18 March 2009 (UTC)

  • Heheh, I assumed someone realized this, that's why I said I didn't search for it (it is 3:30 am here). I thought about you 1st counter option, but I guessed it was not worth the trouble(at least not yet) since I don't see how a bot can use this and actually become strong against a top bot. My current surfing algorithm surfs fake waves when he doesn't have at least 2 real waves, I did that mostly to avoid getting in dangerous spots for a bullet that hasn't been fired yet, but I think it will dodge some of those invisible bullets. And there many more important things that can be improved still. --zyx 07:41, 18 March 2009 (UTC)
  • There are nearly no surfer detecting it, also many surfer do not even detecting wall hit since the bots that hit wall usually a simple robot that can take out easily, and I think it have only little advantage. Say, if you hit, you will get back 3 LP, meaning no change to your LP (firing and hitting cost 3) but if you miss, you will lost 2 energy without doing anything! At distance 300, you have ~12% chance, at distance 400 only ~9% chance! You may said that you have brilliant gun, but ot hit surfer it need more than that! » Nat | Talk » 13:49, 18 March 2009 (UTC)
  • Actually, a fair number of surfers will behave VERY simplistically when they don't know of any waves. I know of one that will just sit still maintaining a certain distance. I know of others that will just orbit in one direction. Given how many surfers do that, I bet you could beat a fair number of them with hidden bullets IF you had a strong gun AND were able to make youre movement unpredictable while still only firing when it can be hidden. --Rednaxela 14:42, 18 March 2009 (UTC)
  • Oh! I forgot about that! Anyway, try hitting DrussGT with hidden bullet :) » Nat | Talk » 15:16, 18 March 2009 (UTC)
  • Yes I'm sure there are bots that can be affected by them, but I don't believe it can be used to make a bot perform better than having a good surfing with nearly zero wall hits. About hitting DrussGT, I don't think top bots can be harmed much by this, so I will not try to hit him :) --zyx 15:21, 18 March 2009 (UTC)
  • From what I remember, DrussGT doesn't have any wallhit detection. I might have added it in once, but I'm not sure if I kept it or if it was too buggy. Anyways, it just fires a wave if your gunheat is at an allowable level, so would get the bullet power wrong but would still surf a wave. --Skilgannon 21:48, 12 April 2009 (UTC)