Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Tue Dec 28, 2010 12:49 am   

Empirical Rankings
 
In the game I play you occasionally get messages such as:

CrimsonKnight has bested Lancelot in the jousting tournament!

I want to collect all of these messages over a period of time, say a month or so, and then rank the individuals afterward.
I am just struggling to get my mind around how to build the comparison table to determine the results, any ideas?

P.S. There is no limit to how many tournaments a single entrant may participate in, so long as they have another player to compete against.
_________________
Discord: Shalimarwildcat

Last edited by shalimar on Thu Oct 27, 2011 7:59 pm; edited 1 time in total
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Fri Dec 31, 2010 5:10 am   
 
I would use a point system. The reason for this is it makes calculations easier (I'll explain) and it prevents folks from trying to game the system.

Cosider

Lancelot who was entered 1 tournament against a Lvl 2 player and won it. Win ratio 100%.
Fred who has won entered 5 tournaments against and won against a Lvl 3, 5, and 1 player. Lost to a Lvl 5 and 7. Win ration 60%
John who has won entered 50 tournaments against all Lvl 1 players and won 40. Win ration 40%
John who has won entered 5 tournaments and won against two Lvl 5s and Lvl 4. Lost against all Lvl 10 and a Lvl 20 players and won 40. Win ration 40%.


Note that I assumed that there a Lvls in Joust and that they affect the outcome. The approach should work even they don't.

I would say that going by win ratio alone, won't cut it. But a win against a level 5 should count more that a win against a level 2. If you simply want to calculate base on wins, I would assign a point value to each level. To prevent say a Lvl 50 win from counting too much I would use a sum of (N * L ln L) when N is the number of victories against a given level L. I chose natural log, but you could use some other slow growing function.

If you want losses to count you can use LD the difference in levels between jousters to drive your formula. When LD is positive subtract (1 / LD) and when LD is negative subtract ( LD ln LD ).


In rereading I realize my math choices were perhaps a little complex. The key is then coming up with a weighting scheme that your comfortable. You can play with the numbers but those were my initial thoughts.

If there are no levels you can use win ratio times the number of matches to determine your first months ranking, then assign 'levels' based on prior months rankings.
_________________
Asati di tempari!
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Sat Jan 01, 2011 12:29 am   
 
There is no way for me to determine the skill of the player just by the outcome of the match.
I could likely find out by OOC means, but I have no intention of doing so.
I was thinking of relative values:
@x beat @y 3/4 times so x>y
But unless there is a large enough sample that there are a lot of crossovers, it wont make for a very plottable table
_________________
Discord: Shalimarwildcat
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Thu Oct 27, 2011 7:39 pm   
 
Revisiting this in another vein

Code:
#TR {({@weapons}) is better than ({@weapons})} {
$better=%1
$worse=%2
#ADDITEM weaponChart.$better.betterThan $worse
#ADDITEM weaponChart.$worse.worseThan $better
}


Given a large enough sample, how would i use the above database to construct a list from worst to best?

I was thinking of something like...

Code:
#ALIAS weaponSort {
#local $sorting $weapons $lastSort $this $that
#WAIT 0
$weapons=%dbkeys( @weaponChart)
#FORALL $weapons {#ADDKEY $sorting {%i=5000}}
#UNTIL ($lastSort=$sorting) {
  $lastSort=$sorting
  #FORALL $weapons {
    $this=%i
    #FORALL @weaponChart.$this.betterThan {
      $that=%j
      #IF ($sorting.$this!>$sorthing.$that) {$sorting.$that=($sorting.$this-1)}
      }
    #FORALL @weaponChart.$this.worseThan {
      $that=%j
      #IF ($sorting.$this!<$sorthing.$that) {$sorting.$that=($sorting.$this+1)}
      }
    }
  }
#SAY the list from wrost to best
}


Not sure if that is the most effiecient method though.
_________________
Discord: Shalimarwildcat
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Oct 27, 2011 8:25 pm   
 
You don't need both the betterThan and the worseThan tables. Just one of those will be sufficient. I believe that the algorithm will have to be rather more complex than what you have, though it is a start. Let me think about it a bit...
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Fri Oct 28, 2011 8:02 pm   
 
Code:
$sorting.$this!>$sorthing.$that

and

$sorting.$this!>$sorthing.$that


This is not valid syntax. You also spelled sorting as sorthing.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Sun Nov 27, 2011 1:47 am   
 
It was a contrived bit of code off the top of my head to show what i am trying to accomplish.
_________________
Discord: Shalimarwildcat
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net