Difference between revisions of "User talk:Nat/SDSResearch"

From Robowiki
Jump to navigation Jump to search
(circular array)
(List performance)
Line 34: Line 34:
  
 
Yes, I use .get(). Just foroget it was LinkedList! Now, I use ArrayList with initial capacity over than maximum element. (say, 0002 max is 10000, initial ArrayList to 11000) But, as of ABCLinkedList challenge, someone test that ArrayList is faster than a custom linkedlist anyway, and custom linkedlist is faster by 10x to java linkedlist. &raquo; <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> &raquo; 00:32, 13 March 2009 (UTC)
 
Yes, I use .get(). Just foroget it was LinkedList! Now, I use ArrayList with initial capacity over than maximum element. (say, 0002 max is 10000, initial ArrayList to 11000) But, as of ABCLinkedList challenge, someone test that ArrayList is faster than a custom linkedlist anyway, and custom linkedlist is faster by 10x to java linkedlist. &raquo; <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> &raquo; 00:32, 13 March 2009 (UTC)
 +
 +
* Well, ArrayList would be faster if what you look at is ''average'' speed of insertion/read, but ArrayList would have FAR higher PEAK time for a single .add() due to on ocassion having to totally re-copy the array. I consider peak time per operation more important than average when in the context of robocode because spikes can lead to skipped turns. Personally I plan to some time make a custom list class that's somewhat of a hybrid. It will store in a list of arrays, it first has one array and when that fills it adds a second array, etc, which will give average performance similar to ArrayList with far smaller spikes in insertion time. --[[User:Rednaxela|Rednaxela]] 03:01, 13 March 2009 (UTC)
  
 
Let see if I use circular-array will faster? Use the same implementation as circluar-queue :) &raquo; <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> &raquo; 01:19, 13 March 2009 (UTC)
 
Let see if I use circular-array will faster? Use the same implementation as circluar-queue :) &raquo; <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> &raquo; 01:19, 13 March 2009 (UTC)

Revision as of 05:01, 13 March 2009

Help, does anyone have a TC calculator? The score above is just a roughly averaged by eyes score. I think the actual is much lower except the Total score, that was calculated with ScoreAveragedAddOns / 350. I know that the surf score is invalid. » Nat | Talk » 14:37, 11 March 2009 (UTC)

Try RoboResearch - look on the old wiki for info. --Skilgannon 15:28, 11 March 2009 (UTC)

Actually, don't look on the old wiki for RoboResearch, the new wiki page is more recently updated I believe. But yes, RoboResearch is very nice, it automates running all the battles, calculating the scores, and even generating the table row in mediawiki syntax :D (actually, challenges pages really should state to use RoboResearch). With the GUI version you can queue up multiple versions to test one after the other as you sleep too. --Rednaxela 15:36, 11 March 2009 (UTC)

I usually don't download everything that I need to check out from SVN repository by my self :) I took an hour to find download link for RoboResearch and at last admit that I must checkout them from SVN. Question: Can I pause the challenge and resume it next time I turn on my computer? I am not allow to turn on computer while I'm sleeping. » Nat | Talk » 00:53, 12 March 2009 (UTC)

RoboResearch saves battle results in a database as it goes and doesn't re-run unnecessary battles. In fact, if two different challenges have an exactly overlapping pairing it won't repeat the battles unnecessarially. Also, the GUI version (which I highly recommend) stores currently running challenges in a config file so it's super-easy to close at any time and continue running later. In summary that answer to your question is: Yes :-) --Rednaxela 01:10, 12 March 2009 (UTC)


If I do bit shifting to fit the data into 8-bits link this:

0 0 0 0 0 0 0 0
  L     D   a W 
  e     i   c a
  t     s   c l
  e     t   l l
  r     a
  a     n
  l     c
        e

With this I can have up to 7 velocity segment, 7 distance segment, 2 acceleration segment and 2 wall segment. It can fit every segment into one character. Do anyone have idea how to cut the string as per SDS? Or just char & 0xFE or 0xE0? One more, what is faster, doing kernel density or log it to an array and find max? » Nat | Talk » 01:36, 12 March 2009 (UTC)

LinkedList is super slow. I change my code to use ArrayList(10100) and I can increase the segment and log size a LOT (see above). Let see 0002 with larger log size. And 0003 with non-firing waves with larger log size. Anyway 0003 is faster than 0001 » Nat | Talk » 14:41, 12 March 2009 (UTC)

Do I need to publish code for each research bot? I can have them on my page in a minute, but not sure if I need, or anyone want. Note that this research have codename Astraea. All the bot is Astraea with SDSxxxx version number. (OK, at first it is a competition robot, but I can't find better, but not the best, wave surfing to plug in + it really slow so it is now a research. In fact, a entry Astraea DEV in TC2K7 fastlearning result is really a SDS0001) » Nat | Talk » 14:41, 12 March 2009 (UTC)

I'm wonder, with these incomplete result show that non-firing is better against surfer but worse against RM? But let see a complete score before. » Nat | Talk » 14:41, 12 March 2009 (UTC)

List speed

By the way, keep in mind that LinkedList is VERY slow if you use list.get(number), but if avoid accessing by index it's fast. Just the general rule, if it was very slow you were probably accessing with .get(number) --Rednaxela 14:59, 12 March 2009 (UTC)

Yes, I use .get(). Just foroget it was LinkedList! Now, I use ArrayList with initial capacity over than maximum element. (say, 0002 max is 10000, initial ArrayList to 11000) But, as of ABCLinkedList challenge, someone test that ArrayList is faster than a custom linkedlist anyway, and custom linkedlist is faster by 10x to java linkedlist. » Nat | Talk » 00:32, 13 March 2009 (UTC)

  • Well, ArrayList would be faster if what you look at is average speed of insertion/read, but ArrayList would have FAR higher PEAK time for a single .add() due to on ocassion having to totally re-copy the array. I consider peak time per operation more important than average when in the context of robocode because spikes can lead to skipped turns. Personally I plan to some time make a custom list class that's somewhat of a hybrid. It will store in a list of arrays, it first has one array and when that fills it adds a second array, etc, which will give average performance similar to ArrayList with far smaller spikes in insertion time. --Rednaxela 03:01, 13 March 2009 (UTC)

Let see if I use circular-array will faster? Use the same implementation as circluar-queue :) » Nat | Talk » 01:19, 13 March 2009 (UTC)