From: SourceForge.net <no...@so...> - 2011-01-28 11:45:44
|
Feature Requests item #3156591, was opened at 2011-01-12 21:34 Message generated for change (Comment added) made by kymara You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=351111&aid=3156591&group_id=1111 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Martin Fuchs (martinfuchs) Assigned to: Nobody/Anonymous (nobody) Summary: Calculation of an achievement score Initial Comment: In order to create a hall of fame for achievements we should try to calculate a single number representing all of the achievements of an player. The final number for a player should be the average of all types of achievements for this player. An achievement reached by e.g. only 2 players should be more valuable while calculating this number than an achievement reached by 1000. A simple example makes it clear: If an i am one of the players, that got an achievement, only two got at all, I get 50% as result for this type of achievement. If i am one of 100 for another type, I get 1%. Looking at all of the achievements, we can build the average of this percent numbers. This average number in the range 0..100% is called "overall achievement score". For this example with only 2 different achievement categories i get 25.5 % For most players it will be quite low however. Putting the list of all players into a ranking list for their overall achievement score, we get a hall of fame for achievements. May be we don't have to show the score at all in this list. The rank order may be enough. The score of a player might fall with time however, if he gets inactive. But that's OK. It's sort of fame rating. players who does not do anything noteworthy for a while, should not be surprised when his fame fades. Thats how the best and strongest etc is too. That can change if you don't play. Sum(1/n) style rank has the advantage that we do not need so much effor for trying to judge the worth of various achievements. Yes its a bit more dynamic. ---------------------------------------------------------------------- >Comment By: Katie Russell (kymara) Date: 2011-01-28 11:45 Message: and a new best player calculation? select name, xp, xp/(age+1), score, xp*score/(age+1) from character_stats join (select charname, sum(1/cnt) score from reached_achievement r join (select achievement_id, (select title from achievement where achievement.id = achievement_id) title, count(*) as cnt from reached_achievement join character_stats on name = charname where admin<600 group by achievement_id) t on r.achievement_id = t.achievement_id join character_stats on name = charname where admin<600 group by charname ) temp on temp.charname = name order by xp*score/(age+1) desc limit 20; sorry for the ugly sql, sf didn't really let me code in the spaces and stuff ---------------------------------------------------------------------- Comment By: Katie Russell (kymara) Date: 2011-01-28 11:37 Message: select charname, sum(1/cnt) as score from reached_achievement r join (select achievement_id, count(*) as cnt from reached_achievement join character_stats on name = charname where admin<600 group by achievement_id) t on r.achievement_id = t.achievement_id join character_stats on name = charname where admin<600 group by charname order by score desc limit 20; yay! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=351111&aid=3156591&group_id=1111 |