Assymetric pairings

Jump to navigation Jump to search

Assymetric pairings

I noticed pairings between 2 competitors are being scored differently. A vs B score is different than B vs A score.

LiteRumble could stabilize twice as fast if a given battle upload is updated for both competitors involved.

MN22:05, 22 March 2013

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Users.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page.

Return to Thread:Talk:LiteRumble/Assymetric pairings/reply.

 

Also, a number of values are coming up 0. Will those eventually update when pairings complete, or are not all scores currently tallied (either intentionally or due to a bug)? I know there was talk of dropping ANPP, so maybe that is 0 on purpose, but Vote for XanderCat 12.6 also comes up 0, even though XanderCat 12.6 shows up against PolishedRuby, who XanderCat gets top score against.

Skotty23:01, 22 March 2013

Those complex rankings are coming up 0 because they didn't have some battles run against them after the batch rankings was run, and got evicted from cache before their new data was written to disk. I think I'll do a disk dump at the end of each batch processing job, see if that sorts this out.

A lot of these problems are showing up because I put a bit too much 'eventually' into the 'eventually consistent' model.

Skilgannon08:01, 23 March 2013
 

Some of the complex rankings are updated in batch at intervals.

Voidious23:07, 22 March 2013
 

They are both updated at the same time, but for a long time I had very aggressive caching on to keep within the free tier. Because App Engine Memcache can be cleared without warning, this meant that often one bot would lose a battle before it could be written to disk, but not the other. Ironically, this is one of those situations where a higher client load on the server means that less data gets lost, since the bot was more likely to hit the 'write threshold' before being evicted from the cache. Now that I have more writes to play with, I've lowered the write caching thresholds a lot, and we should eventually see everything settling down.

Skilgannon07:05, 23 March 2013
 

Is the cache independent for each rumble? Or one big cache for everything?

MN14:07, 23 March 2013
 

One big cache for everything. I used to have a queue for each rumble that would fill up, and each time a bot had over X battles it would be written to the database. Of course, when the nanorumble only gets 1/10th or less the battles of the main rumble, the bots in it are more likely to be evicted, resulting in incomplete and asymmetric pairings. So I've just rewritten that section to keep just two queues (only split between 1v1 and melee), and bots are written as a batch as soon as the queue is a certain size. That way, even bots getting less battles will still be written because they are all pushing each other through, so it should stabilize better. Unfortunately I couldn't do this before because I was too limited with writes.

Skilgannon14:16, 23 March 2013
 

What is the queue size?

MN21:51, 29 March 2013
 

30. Bots with more than 1 unsaved pairing only count once, though.

Skilgannon08:20, 30 March 2013
 

Is the queue size per competitor instead of per pairing then?

MN14:48, 30 March 2013
 

I keep a dictionary of {bot.Name:unsavedBattles} and once there are more than 30 entries it gets written.

Skilgannon14:51, 30 March 2013
 

Let me explain that better: Each time a pairing is uploaded, the two bots are added to the dictionary with unsavedBattles of 1. If they already existed in the dictionary, their unsavedBattles count is incremented. Once the dictionary size is bigger than 30 (size = number of entries, not sum of unsavedBattles), all bots listed in the dictionary are written to database.

Skilgannon14:56, 30 March 2013
 

Dictionary size reaches 30 when at least 30 different bots had pairings uploaded.

I configured my clients to run/upload 30 battles per iteration. With meleerumble still having 3 battles per iteration. If all battles have at least one different participant, the server flushes the queue at least once per iteration, with higher chance of it happening exactly after the last upload leaving an empty queue.

It is an attempt to minimize the amount of evicted battles.

MN17:42, 30 March 2013