DCBot

Jump to navigation Jump to search

Just found this page. I think your algorithm is basically the same as DCBot algorithm, which is first generation of PIF algorithm used in Robocode. In case you didn't know, most PIF robot right now use algorithm described in PIF page, which is faster than this algorithm.

Nat Pavasant13:08, 17 November 2011

Maybe i do not understand translating algorithm. How many iterations do translating algorithm for bullet, which will hit after 30 turns (according to my tests it's avarage bullet flight time for Tomcat)?
I do not remeber exactly, but interpolating algorithm do about 4-7 iterations. And if translating algorithm does 30 iterations, i'm sure, that interpolating is faster:)

And indeed, both of algorithm needs for more clear description:)

Jdev13:23, 17 November 2011
 

Also, which open source bot is implement translating PIF? May be code will be more clear for me

Jdev13:27, 17 November 2011
 

My Samekh definitely did, though my code is messy. Shadow's translating PIF version is available at oldwiki:DrussGT/HelpRequests. Glacier probably using this too.

The reason translating version is faster because in each iteration it doesn't have to do any trig, just simple addition. Trig only involve in battlefield rotation (at the beginning and at the end). This is the reason this version is faster.

Nat Pavasant13:48, 17 November 2011

Glacier does the interpolation while recording scans, instead of during PIF, but same effect really.

Edit: Err... I got mixed up by the page title being "interpolating PIF" which I'd strongly expect to refer to interpolating missed scans. But yes, Glacier does use translating PIF.

Rednaxela14:59, 17 November 2011
 

Hmm, it looks like both methods can be used together to implement hyper fast PIF:)
But i'm pretty sure, that methods have comparable performance, because count of iterations and possibility to quick discard paths, which going out of battle field

Jdev15:32, 17 November 2011
 

And any way, PIF is not that thing, which eats significant part of CPU time:) In my case, at least:)

Jdev15:35, 17 November 2011

Actually, the combination of both methods has already been done. In Glacier I did combine "interpolating PIF" and "translating PIF" once upon a time. The result was, it was seeming to be a little faster (barely faster really, because translating PIF is fast because each iteration takes so little computation, and the extra computation of interpolating really hurts that). I discarded the combination in the end though, because the code complexity was not worth the slight performance difference.

Just to note, I think "interpolating PIF" is a terribly confusing name, since "interpolation" and "PIF" in the same conversation has normally referred to missed scan handling.

Rednaxela15:48, 17 November 2011
 

How you measure a performance?

You're welcome to rename this page, i can not find out better name:)

Jdev15:51, 17 November 2011

I had both methods running at the same time in the same bot, and put "System.nanoTime()" calls around each method. I then summed up the time taken in each and found the average time used by each method during a battle.

Rednaxela15:53, 17 November 2011
 

Maybe i will try same approach later and look self, which is faster:)

Jdev16:01, 17 November 2011