Talk:Precise Prediction

From Robowiki
Revision as of 15:03, 31 October 2008 by Nfwu (talk | contribs) (Transfer)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Credits - Precise Prediction
Old wiki page: WaveSurfing/PrecisePrediction
Original author(s): PEZ

Old Wiki

A technique used by I think all expert wave surfers. Using Robocode physics to precisely predict your bots position when the surfed wave hits gives you the richest information possible. Then it's up to the descision mechanism to move accordingly. Look at the pages FuturePosition and Apollon for ways to implement this. Also try PPP and check its source code for an implementation of the Apollon published code. PPP also has RobocodeGLV014 debug output code which might make it easier to experiment with this. -- PEZ

Bots using:


Comments anyone?

You are right about Shadow, PEZ. In it's first WaveSurfing versions (2.31) it didn't acount for wallSmoothing, though. -- ABC

Added a few bots, but I'm sure plenty are still missing. I'm just guessing about Ascendant... hehe. =) -- Voidious

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.

Contents

Thread titleRepliesLast modified
NanoSim017:16, 15 September 2012

Hi. Not sure if this is still in progress, but i touched it a little and came up with this (128 byte and max user velocity) :

class NanoSim {
    public static double	x, y, h, v;
    
    public static double simulate(double att, double d, double maxv) {
      if (d == 0) d = Math.signum(v);
      if (v * d < 0) d *= 2;
      if (((d = v + d) * v) < 0) d /= 2.0;
      double r = limit(Rules.getTurnRateRadians(v), att);
      x += Math.sin(h = Utils.normalNearAbsoluteAngle(h + r)) * (v = limit(maxv, d));
      y += Math.cos(h) * v;
      return att - r;
    }

    private static double limit(double minmax, double value) {
      return Math.max(-minmax, Math.min(value, minmax));
    }
}

At least it makes the same as the old NanoSim. Not sure if it is sound i have to check it later a little more seriously. But eventually it helps a little and shows the direction.

EDIT: Well after playing with the LocationBot it turned out i had to change it. Simulate now gives the rest att back and can be used for the next step. If the direction (d) is correct it works quite nice (there is a little glitch if the bot begins to get straight but most of the time he is right and ends up at the the predicted coordinates). One issue is still to find the right direction. Has anyone an idea how to get the right direction?

Wompi23:38, 14 September 2012