Code center > Darwinbots3

DB3 Leagues

<< < (5/9) > >>

Numsgil:

--- Quote from: Peter on April 11, 2015, 01:36:30 PM ---
--- Quote from: Numsgil on April 10, 2015, 05:49:25 PM ---I'm not sure but I think Elo might handle that case better.  But if it doesn't, it means I might lean towards using the straight win rates because there's no math involved in that.  But I'd have to play with it to know for sure.

--- End quote ---
A big advantage of Elo and alike over win rates is that wins from higher ranked players are valued more. With winrates if you beat the #2 and lost from the #1, you're mediocre. You beat 2 bots that can't even survive, you're amazing!

--- End quote ---

And that's really important if the matches you're given information on aren't a random sample.  But I think if the matches you play are randomly chosen from the space of all possible matches, the win rate you get will be representative of your global win rate, which should correspond to elo, or at least have the same relative ordering, assuming sample sizes are big enough for either.

But I'm of two minds about it w.r.t. rock-paper-scissors situations.


--- Quote ---Edit: the code got a mistake. It's rounding the wins/matches to a int, getting zero.

--- End quote ---

That's odd, it works on my machine.  Which version of Python are you running?  I'm using 3.4 I think.

Peter:
Python2, apparently it's still the default it starts up on my machine. Good to see they covered it in python3.

I don't think it should be randomly chosen from all bots. I like to have the upper bots to be able to fight each other enough to have a good leaguetable. I think fights should be randomly picked between positions, like if a bit is ranked #100, his opponent may be between #50 and #150. Fights are more even and will tell more, pinpointing the strength more clearly.

Assuming you got a large amount of bots that are weak. A decent(but not great) lucky bot can get a high win percentage with some luck. Can be compensated  eventually with more random fights, but Elo like wouldn't give him that advantage in the first place.

Panda:

--- Quote from: Numsgil on April 11, 2015, 01:21:14 PM ---Here's a quick stab at some python to simulate some rock-paper-scissors type matches with asymmetric numbers of players playing each type.  Right now winrates are high for players with strategies that happen to beat the dominant strategy, as you'd expect.  Later I'm going to try and add in elo and see what it would do.  I found some python packages for it, but I'm feeling too lazy right now to figure it out.


--- Code: ---import numpy
import skills
import elo

winrates = { }

wintable = numpy.matrix([
[ 0, 1, -1, ],
[-1, 0, 1, ],
[ 1, -1, 0 ]
])

typenames = [
"rock    ",
"paper   ",
"scissors"
]

print('type, "score", \t \t winrate')
for i in range(0, 10):
type = numpy.random.randint(0, 4)

if type > 2: type = 2

score = 0
matches = 0
wins = 0

for i in range(0, 10000):
opponent_type = numpy.random.randint(0, 4)
if opponent_type > 2: opponent_type = 2

score = score + wintable[type, opponent_type]
matches = matches + 1
wins = wins + (1 if wintable[type, opponent_type] > 0 else 0)

print(typenames[type], (score/matches), "\t", (wins/matches))

--- End code ---

--- End quote ---
Is this 1 player vs 4 players (including the original player) pitted against each other randomly 10000 times, or 1 player pitted against 10000 players? Just trying to work our how you'd do the elo in the second situation.

spike43884:
Just to point out, did anyone actually read my point of only repeating leagues on a certain timescale. We know where most of our users come from by the language they speak, so run the leagues when their offline.

Peter:

--- Quote from: Panda on April 12, 2015, 07:25:41 AM ---Is this 1 player vs 4 players (including the original player) pitted against each other randomly 10000 times, or 1 player pitted against 10000 players? Just trying to work our how you'd do the elo in the second situation.

--- End quote ---
The second, you can nearly throw all of it away if you want to do elo.  :P

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version