Thread history
From Talk:IWillFireNoBullet
Viewing a history listing
Jump to navigation
Jump to search
Viewing a history listing
Time | User | Activity | Comment |
---|---|---|---|
05:00, 20 August 2015 | Beaming (talk | contribs) | New thread created | |
13:55, 20 August 2015 | Voidious (talk | contribs) | New reply created | (Reply to Exact path prediction) |
15:48, 20 August 2015 | Voidious (talk | contribs) | New reply created | (Reply to Exact path prediction) |
22:54, 20 August 2015 | Beaming (talk | contribs) | New reply created | (Reply to Exact path prediction) |
Hi,
Does anyone knows if it possible to get direct access to robocode code in charge of moving ahead. I.e. the one which implement setAhead(dist). It is sort of unproductive to re-implement it or copy (which would force certain licenses) it from robocode sources.
I did my one version, but it seems to be incorrect around velocity direction flips.
What do you mean by "direct access"? Like to use Robocode's engine during the match instead of writing the prediction?
If you want, the MovementPredictor in Diamond is exactly correct and you're free to use it.
- Predictor: https://github.com/Voidious/Diamond/blob/master/voidious/utils/MovementPredictor.java
- Unit tests: https://github.com/Voidious/Diamond/blob/master/voidious/utils/MovementPredictorTest.java
- LocationBot is how I generated the unit tests.
Sounds like you might just need to look at getNewVelocity: https://github.com/Voidious/Diamond/blob/master/voidious/utils/MovementPredictor.java#L125