Difference between revisions of "User talk:Positive/Optimal Velocity"

From Robowiki
Jump to navigation Jump to search
(free acceleration?)
(Small issue to work out)
Line 6: Line 6:
  
 
I just noticed that this does allow some free acceleration, although it's capped at 1.  Replacing this with the time-based calc in Voidious' second version should work.  --[[User:Darkcanuck|Darkcanuck]] 20:41, 15 July 2009 (UTC)
 
I just noticed that this does allow some free acceleration, although it's capped at 1.  Replacing this with the time-based calc in Voidious' second version should work.  --[[User:Darkcanuck|Darkcanuck]] 20:41, 15 July 2009 (UTC)
 +
 +
: I did, unfortunately, find one small problem with the code: decelTime(Double.POSITIVE_INFINITY). It takes a lot of time to process. So i guess at arguments around > 1000 it could simply return Rules.MAXVELOCITY (or a more elegant solution). Personally, I think the free acceleration provides no ''problem'', and people not liking that particular change was the start of the discussion. --[[User:Positive|Positive]] 20:52, 15 July 2009 (UTC)

Revision as of 22:52, 15 July 2009

Your version passes all of my tests (so far) except that it doesn't take into account the maximum velocity set by the bot. Nice catch on the updateMovement() routine, that should get fixed too (my tests assume that behaviour already). --Darkcanuck 20:21, 15 July 2009 (UTC)

Great! Please replace 8.0 in the getNewVelocity function with currentCommands.getMaxVelocity(), and it should work I believe (I temporarily set it to 8.0, because I am not using the currentCommands class). :) --Positive 20:26, 15 July 2009 (UTC)
ok, that fixed it. Nice work! --Darkcanuck 20:33, 15 July 2009 (UTC)

I just noticed that this does allow some free acceleration, although it's capped at 1. Replacing this with the time-based calc in Voidious' second version should work. --Darkcanuck 20:41, 15 July 2009 (UTC)

I did, unfortunately, find one small problem with the code: decelTime(Double.POSITIVE_INFINITY). It takes a lot of time to process. So i guess at arguments around > 1000 it could simply return Rules.MAXVELOCITY (or a more elegant solution). Personally, I think the free acceleration provides no problem, and people not liking that particular change was the start of the discussion. --Positive 20:52, 15 July 2009 (UTC)