lggwg scoring

0 views
Skip to first unread message

Alex Reutter

unread,
Apr 17, 2007, 1:21:02 PM4/17/07
to LGGWG Executives
I'm having a complete brainfart on lggwg scoring. Wolff, can you
reveal the formula you're using, including the scaling for beating
higher-ranked opponents, losing at lower ranks, and winning at higher
ranks? I could parse a code snippet if it's not seekrit.

Wolff Dobson

unread,
Apr 17, 2007, 2:00:06 PM4/17/07
to lg...@googlegroups.com
The actual python is like this:

def getXPForWin( levelDiff ):

if ( levelDiff == 0 ):
return 100

diff = abs( levelDiff )

sign = abs( levelDiff )/levelDiff

if ( diff >= 20 ):
# No bonus for punching around n00bs
return 0
val = 0.152 * diff * diff - 8.152 * diff + 100

if ( sign == -1 ):
val = 200 - val

return int( val )

Alex Reutter

unread,
Apr 17, 2007, 2:08:49 PM4/17/07
to LGGWG Executives
Okay, that makes sense. I got confused reading the explanation on the
website. That paragraph starting "Finally, losing when you are ranked
low..." doesn't sound like it really applies.


On Apr 17, 2:00 pm, "Wolff Dobson" <w...@zebra.net> wrote:
> The actual python is like this:
>
> def getXPForWin( levelDiff ):
>
> if ( levelDiff == 0 ):
> return 100
>
> diff = abs( levelDiff )
>
> sign = abs( levelDiff )/levelDiff
>
> if ( diff >= 20 ):
> # No bonus for punching around n00bs
> return 0
> val = 0.152 * diff * diff - 8.152 * diff + 100
>
> if ( sign == -1 ):
> val = 200 - val
>
> return int( val )
>

Magnus Kristiansen

unread,
Apr 17, 2007, 2:22:01 PM4/17/07
to lg...@googlegroups.com
On Tue, 17 Apr 2007 20:00:06 +0200, Wolff Dobson <wo...@zebra.net> wrote:

>
> The actual python is like this:
>
> def getXPForWin( levelDiff ):
>
> if ( levelDiff == 0 ):
> return 100
>
> diff = abs( levelDiff )
>
> sign = abs( levelDiff )/levelDiff
>
> if ( diff >= 20 ):
> # No bonus for punching around n00bs
> return 0
> val = 0.152 * diff * diff - 8.152 * diff + 100
>
> if ( sign == -1 ):
> val = 200 - val
>
> return int( val )

Bruteforce'd

-30 : 0 -10 : 166 10 : 33
-29 : 0 -9 : 161 11 : 28
-28 : 0 -8 : 155 12 : 24
-27 : 0 -7 : 149 13 : 19
-26 : 0 -6 : 143 14 : 15
-25 : 0 -5 : 136 15 : 11
-24 : 0 -4 : 130 16 : 8
-23 : 0 -3 : 123 17 : 5
-22 : 0 -2 : 115 18 : 2
-21 : 0 -1 : 108 19 : 0
-20 : 0 0 : 100 20 : 0
-19 : 200 1 : 92 21 : 0
-18 : 197 2 : 84 22 : 0
-17 : 194 3 : 76 23 : 0
-16 : 191 4 : 69 24 : 0
-15 : 188 5 : 63 25 : 0
-14 : 184 6 : 56 26 : 0
-13 : 180 7 : 50 27 : 0
-12 : 175 8 : 44 28 : 0
-11 : 171 9 : 38 29 : 0

Is anyone else a bit worried about that big row of zeroes in the upper
left? The formula as quoted means anyone who beats someone 20+ ranks above
them gets exactly 0 points. Guessing that one's a bug. :)

I expect some of the other effects (scaling down wins above rank 20, etc)
happen outside this formula, so the mystery remains!

--
Magnus Kristiansen
"Don't worry; the Universe IS out to get you."

Magnus Kristiansen

unread,
Apr 18, 2007, 1:39:22 PM4/18/07
to lg...@googlegroups.com
Another question on scoring. What happens when two people get the same
score? As far as achievement goes, drawing someone above you in rank is
still a minor victory, while it's shameful to tie with someone below you.

I would expect an average of win and loss against that player, but I
suspect it might actually be 0.

Wolff Dobson

unread,
Apr 18, 2007, 1:54:22 PM4/18/07
to lg...@googlegroups.com
That would be 0, as you suspect.

I find the use of the word "shame" here very amusing. I don't
associate LGGWG with shame, as such, except when I am shamed by my
monotonically increasing todo list.

Siddhi .

unread,
Apr 18, 2007, 11:54:42 PM4/18/07
to LGGWG Executives
On Apr 17, 11:00 pm, "Wolff Dobson" <w...@zebra.net> wrote:
> The actual python is like this:

OT: yay for python.

--
Siddharta Govindaraj
http://siddhi.blogspot.com

Wolff Dobson

unread,
Apr 19, 2007, 12:54:20 PM4/19/07
to lg...@googlegroups.com
Python is the glue that holds my shakey system together. Python,
web.py, cheetah, flup, and lots of love.
Reply all
Reply to author
Forward
0 new messages