You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Simone Tripodi <si...@apache.org> on 2012/03/28 18:57:04 UTC

[graph] first ELO rating system implementtaion

Hi all guys,

we have an ELO implementation now which I would really like some of us
could review and provide feedbacks/contributions/...

The concept is that *directed* Graphs represents tournaments where the
generic players (Vertices) take part, Edges are WIN/DRAW enums,
players are ranked in a users defined functor PlayersRank, then:

    DirectedGraph<String, GameResult> tournament = ....;
    PlayersRank<String> playersRank = ...;
    int customKFactor = ... ;

    eloRate( tournament ).werePlayersArRankedIn( playersRank
).withKFactor( customKFactor );

Players rating will be updated on PlayersRank - that is an interface,
so users can provide their dbms/nosql backend implementation.

There are big limitations ATM, i.e. the algorithm has a complexity of
O(n x n-1), so at least another pair of eyes is needed to improve the
algorithm :)

May thanks in advance, all the best!
-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [graph] first ELO rating system implementtaion

Posted by Emmanuel Bourg <eb...@apache.org>.
I would advise at least placing the domain specific algorithms in a 
separate artifact and keep the base API in a main artifact. Also a 
smaller API will be easier to release quickly.

Emmanuel Bourg


Le 28/03/2012 23:04, Simone Tripodi a écrit :
> Salut Manu,
>
> The ELO ranking algorithm - like all algorithms in [graph] - is
> implemented in a generic way that it can be used to rate chess players
> as well as chicks on facemash, it is not related to any specific
> domain.
> The main purpose is rating generic entities that faced in one or more matches.
>
> It is like the ShortestPath algos used for path finding or Flow algo
> to find max net capability.
>
> best and thanks for participating in the discussion,
> -Simo
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
>
>
> On Wed, Mar 28, 2012 at 10:26 PM, Emmanuel Bourg<eb...@apache.org>  wrote:
>> It's really nice to see that [graph] is mature enough to support the
>> implementation of the ELO system, however I wonder if it should be shipped
>> along with [graph]. IMHO Commons Graph should focus on providing the
>> building blocks for working with graphs instead of implementing domain
>> specific algorithms that happen to use a graph.
>>
>> Emmanuel Bourg
>>
>>
>> Le 28/03/2012 18:57, Simone Tripodi a écrit :
>>>
>>> Hi all guys,
>>>
>>> we have an ELO implementation now which I would really like some of us
>>> could review and provide feedbacks/contributions/...
>>>
>>> The concept is that *directed* Graphs represents tournaments where the
>>> generic players (Vertices) take part, Edges are WIN/DRAW enums,
>>> players are ranked in a users defined functor PlayersRank, then:
>>>
>>>      DirectedGraph<String, GameResult>    tournament = ....;
>>>      PlayersRank<String>    playersRank = ...;
>>>      int customKFactor = ... ;
>>>
>>>      eloRate( tournament ).werePlayersArRankedIn( playersRank
>>> ).withKFactor( customKFactor );
>>>
>>> Players rating will be updated on PlayersRank - that is an interface,
>>> so users can provide their dbms/nosql backend implementation.
>>>
>>> There are big limitations ATM, i.e. the algorithm has a complexity of
>>> O(n x n-1), so at least another pair of eyes is needed to improve the
>>> algorithm :)
>>>
>>> May thanks in advance, all the best!
>>> -Simo
>>>
>>> http://people.apache.org/~simonetripodi/
>>> http://simonetripodi.livejournal.com/
>>> http://twitter.com/simonetripodi
>>> http://www.99soft.org/
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>



Re: [graph] first ELO rating system implementtaion

Posted by Simone Tripodi <si...@apache.org>.
Salut Manu,

The ELO ranking algorithm - like all algorithms in [graph] - is
implemented in a generic way that it can be used to rate chess players
as well as chicks on facemash, it is not related to any specific
domain.
The main purpose is rating generic entities that faced in one or more matches.

It is like the ShortestPath algos used for path finding or Flow algo
to find max net capability.

best and thanks for participating in the discussion,
-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/



On Wed, Mar 28, 2012 at 10:26 PM, Emmanuel Bourg <eb...@apache.org> wrote:
> It's really nice to see that [graph] is mature enough to support the
> implementation of the ELO system, however I wonder if it should be shipped
> along with [graph]. IMHO Commons Graph should focus on providing the
> building blocks for working with graphs instead of implementing domain
> specific algorithms that happen to use a graph.
>
> Emmanuel Bourg
>
>
> Le 28/03/2012 18:57, Simone Tripodi a écrit :
>>
>> Hi all guys,
>>
>> we have an ELO implementation now which I would really like some of us
>> could review and provide feedbacks/contributions/...
>>
>> The concept is that *directed* Graphs represents tournaments where the
>> generic players (Vertices) take part, Edges are WIN/DRAW enums,
>> players are ranked in a users defined functor PlayersRank, then:
>>
>>     DirectedGraph<String, GameResult>  tournament = ....;
>>     PlayersRank<String>  playersRank = ...;
>>     int customKFactor = ... ;
>>
>>     eloRate( tournament ).werePlayersArRankedIn( playersRank
>> ).withKFactor( customKFactor );
>>
>> Players rating will be updated on PlayersRank - that is an interface,
>> so users can provide their dbms/nosql backend implementation.
>>
>> There are big limitations ATM, i.e. the algorithm has a complexity of
>> O(n x n-1), so at least another pair of eyes is needed to improve the
>> algorithm :)
>>
>> May thanks in advance, all the best!
>> -Simo
>>
>> http://people.apache.org/~simonetripodi/
>> http://simonetripodi.livejournal.com/
>> http://twitter.com/simonetripodi
>> http://www.99soft.org/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [graph] first ELO rating system implementtaion

Posted by Emmanuel Bourg <eb...@apache.org>.
It's really nice to see that [graph] is mature enough to support the 
implementation of the ELO system, however I wonder if it should be 
shipped along with [graph]. IMHO Commons Graph should focus on providing 
the building blocks for working with graphs instead of implementing 
domain specific algorithms that happen to use a graph.

Emmanuel Bourg


Le 28/03/2012 18:57, Simone Tripodi a écrit :
> Hi all guys,
>
> we have an ELO implementation now which I would really like some of us
> could review and provide feedbacks/contributions/...
>
> The concept is that *directed* Graphs represents tournaments where the
> generic players (Vertices) take part, Edges are WIN/DRAW enums,
> players are ranked in a users defined functor PlayersRank, then:
>
>      DirectedGraph<String, GameResult>  tournament = ....;
>      PlayersRank<String>  playersRank = ...;
>      int customKFactor = ... ;
>
>      eloRate( tournament ).werePlayersArRankedIn( playersRank
> ).withKFactor( customKFactor );
>
> Players rating will be updated on PlayersRank - that is an interface,
> so users can provide their dbms/nosql backend implementation.
>
> There are big limitations ATM, i.e. the algorithm has a complexity of
> O(n x n-1), so at least another pair of eyes is needed to improve the
> algorithm :)
>
> May thanks in advance, all the best!
> -Simo
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>