User talk:Zyx

From Robowiki
Revision as of 08:13, 18 March 2009 by Zyx (talk | contribs) (Undetectable bullets)
Jump to navigation Jump to search

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

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)