Difference between revisions of "User talk:Nat/Free code"

From Robowiki
Jump to navigation Jump to search
(Movement Predictor)
 
(→‎Movement Predictor: not as complicate as DrussGT's)
Line 2: Line 2:
  
 
Ugh... all that distanceRemaining and so on stuff seems so overcomplicated an unnecessary. I'm guilty of doing overcomplicated movement predictors myself before, but I've found that really, what you REALLY want in a movement predictor can be experessed in 10 lines of code, because in reality you never really feed a movement predictor data which would exceed what's possible in robocode physics anyway... --[[User:Rednaxela|Rednaxela]] 15:16, 6 June 2009 (UTC)
 
Ugh... all that distanceRemaining and so on stuff seems so overcomplicated an unnecessary. I'm guilty of doing overcomplicated movement predictors myself before, but I've found that really, what you REALLY want in a movement predictor can be experessed in 10 lines of code, because in reality you never really feed a movement predictor data which would exceed what's possible in robocode physics anyway... --[[User:Rednaxela|Rednaxela]] 15:16, 6 June 2009 (UTC)
 +
 +
Well, not if you are creating a Go-To surfer. You will need to know exactly time that you will be arrived at your destination. DrussGT's one is by far more complicate (it has the BasicSurfer one running first, then using it own far more complicated one).
 +
 +
Actually, it is suppose to have one more method, the <code>predict(PredictionStatus start, Point2D destination, double maxVelocity)</code> method is the most useful for GT Surfer, but I'm having my head messing in the <code>DrussGT.futureStatus(...)</code> function which have the precise way to calculate travelling distance when you are turning. &raquo; <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> &raquo; 15:33, 6 June 2009 (UTC)

Revision as of 16:33, 6 June 2009

Movement Predictor

Ugh... all that distanceRemaining and so on stuff seems so overcomplicated an unnecessary. I'm guilty of doing overcomplicated movement predictors myself before, but I've found that really, what you REALLY want in a movement predictor can be experessed in 10 lines of code, because in reality you never really feed a movement predictor data which would exceed what's possible in robocode physics anyway... --Rednaxela 15:16, 6 June 2009 (UTC)

Well, not if you are creating a Go-To surfer. You will need to know exactly time that you will be arrived at your destination. DrussGT's one is by far more complicate (it has the BasicSurfer one running first, then using it own far more complicated one).

Actually, it is suppose to have one more method, the predict(PredictionStatus start, Point2D destination, double maxVelocity) method is the most useful for GT Surfer, but I'm having my head messing in the DrussGT.futureStatus(...) function which have the precise way to calculate travelling distance when you are turning. » Nat | Talk » 15:33, 6 June 2009 (UTC)