new ranking calculation
Horn Gábor <Horn.Gabor-/[email protected]>
| Newsgroups | gmane.games.freeciv.general |
|---|---|
| Message-ID | <[email protected]> |
Hi! i made some modifications to the script that generates the ranking due to the discussed things. Here is a short summary: 1, It examines if there were allies. If two player exchanged techs, they're counted as allies. 2, when calculates the new ranking, it doesn't use the (current ranking) point of the player, but adds all of his ally's point to it's as Pille suggested, and makes a virtual point for the game for every player. Let's see an example, we have 4 players, A(1200), B(1250), C(1000), D(1350), E(1400). They do the following alliances: A allies B. A allies C. A allies D. B allies C. With the current script all they are counted w/ their original points regardless of allies. W/ the new script every player gets a virtual score for the current game, and get measured w/ that: A: 1200+1250+1000+1350=4800 B: 1250+1200+1000=3450 C: 1000+1200+1250=3450 D: 1350+1200=2550 E: 1400 >From the alliances it can be see it became a gangbang on E. He'll surely lose, but w/ the second method much less point, as the 'winner' didin't kill him alone w/ a low ranking point, but as a part of an alliance. Let's see a concrete example, so u can see the effect of new method in a real environment. I'll use a game in which i played a few days ago, because i remember it, and this was a help during making the new script. (Well it was more the modifying of the current than making a new :) Of course we can test any other gamelog w/ it too. It was game #232329. So let's see the players' ranking points before the game : Zed: 1416 Mindaugas: 1000 Red Cloud: 1370 Brons: 960 Pango: 856 Ozzy: 966 David: 915 Hirisov: 1658 During the game the following alliances happened (quote from the new script's dorankig.log): Mindaugas and Zed formed an alliance. Ozzy and Mindaugas formed an alliance. Pango and Mindaugas formed an alliance. (Note: my script doesn't recognize city giving yet, that's hard to get from the current gamelog. In this game there was that too, Mindaguas got all David's city...so that was his 4th ally...). This ended in a gang upon me, and i left the game so they endied and Zed won. The final result were: Zed,316 Hirisov,275 Mindaugas,235 Red Cloud,145 Brons,125 M3ss14H,122 (he was ai from 4000bc, doesn't count in the ranking) Pango,121 Ozzy,106 David,34 With the current method the points got modified this way (i rounded the numbers): Zed: 1466 (+50) Hirisov: 1633 (-25) Mindaugas: 997 (-3) Red Cloud: 1356 (-14) Brons: 957 (-3) Pango: 855 (-1) Ozzy: 963 (-3) David: 914 (-1) So Zed got 50 points because he win in a 4v1. To understand how much 50 pts are, in duels (which only differs from normal game that he can no do gangbang) to get this amount of points he would have to kill Pille or Iuz twice, which is a 'bit' harder i think for him than this. So it's definitelly an easier way now to get the points in a gang! Now let's see if we use the formula which reflects the alliances in the way described above. W/ that the final ranking scores would be the following: Zed: 1452 (+36) Hirisov: 1658 (-1) Mindaugas: 968 (-32) Red Cloud: 1369 (-1) Brons: 960 (0) Pango: 854 (-2) Ozzy: 963 (0) David: 915 (0) What's the change? The winner got 26 percent less points than in the prev game. But the more important thing he got them not from the two high ranked players as in the previous game (as they had no ally and fought againts 4 alone), but from Mindaguas, who allied everybody and still couldn't win. It seems a bit more resonable i think. Well this generates some new questions: a, what to do in cases if A allies B and C and D, and all techs exchange goes through A, and althought B and C and D gets all the techs via A, they don' exchange, so now doesn't counted as allies. Well as the above example shows if after this A doesn't win he loose many points, and if he does others won't loose much points as A will have a super high virtual point in the current game. Either we can leve it this way, or recognize these ally chains too and count if all they would ally. In that case the allied people will have the same virtual point, and if they don't fight againts a similar strength ally, they almost doesn't get point. (So it renders mindless gangbang an useless way, which is good imho). b, how to handle city givings? To properly recognize them the gamelog format should be modified to reflect diplomatic pacts w/ more detail. c, same goes for shared vision, give shared can be judged as an alliance i think, but currently there's no way to get this info from the gamelog. I attach the two dologin outputs in case u r interested in the count method. I dont' attach yet the script itself, as i dunno if nojua and paulz would agree to share it. (It contains the password for the civserver's database, of course i can delete that before posting but i dont wanna send the it to public without their permission, and i cannot reach them atm). So what u think about it guys? Of course it's a first attempt and there are some open questions, but i'm glad to test any savegame which u are interested in w/ the new method to get and understand the difference what the new ally counting means. I'm also open for any suggest on measuring the power of alliances. thx, hirisov -- Attached file included as plaintext by Ecartis -- -- File: doranking.log.allycheck run 1065659635 /home/freeciv/.freeciv/games/232329/gamelog got 95.000000 turns Found status information in gamelog. Nation-Player relations calculated: Pango plays as Germans Ozzy plays as Indians Zed plays as Czechs Hirisov plays as Hungarians David plays as Israelis Red Cloud plays as Sioux M3ss14H plays as Kenyans Brons plays as Dutch Mindaugas plays as Lithuanians Zed: human: 95 ai: 0 winning player = Zed,316 Hirisov: human: 91 ai: 4 losing player = Hirisov,275 Mindaugas: human: 95 ai: 0 losing player = Mindaugas,235 Red Cloud: human: 56 ai: 39 losing player = Red Cloud,145 Brons: human: 57 ai: 38 losing player = Brons,125 M3ss14H: human: 0 ai: 95 losing player = _AI_,122 Pango: human: 73 ai: 22 losing player = Pango,121 Ozzy: human: 79 ai: 16 losing player = Ozzy,106 David: human: 67 ai: 28 losing player = David,34 tv: human: 89 ai: 3 losing player = tv,0 tv1: human: 24 ai: 7 losing player = tv1,0 Alliances (those who did tech exchange) are calculated: Mindaugas and Zed formed an alliance. Ozzy and Mindaugas formed an alliance. Pango and Mindaugas formed an alliance. Calculating 'virtual' ranking points used in the current game. Format: player name, current ranking points, calculated ranking points of his alliance Pango: 855.842791190707 , 1855.71270767209 Ozzy: 965.703454174496 , 1965.57337065588 Zed: 1416.39031602122 , 2416.2602325026 Hirisov: 1658.13506008711 , 1658.13506008711 David: 915.369339074197 , 915.369339074197 Red Cloud: 1369.56996849169 , 1369.56996849169 Brons: 959.781639680099 , 959.781639680099 Mindaugas: 999.869916481381 , 4237.8064778678 Finally here comes the modifications for the current rankings: Zed 1416.39031602122 + 2.91406343545349e-05 tv1 610.461379573265 - 2.91406343545349e-05 Zed 1416.39034516185 + 2.91406343545349e-05 tv 431.581637782297 - 2.91406343545349e-05 Zed 1416.39037430249 + 0.00566038428948815 David 915.369339074197 - 0.00566038428948815 Zed 1416.39603468678 + 2.22406870461412 Ozzy 965.703454174496 - 2.22406870461412 Zed 1418.62010339139 + 1.22145987412493 Pango 855.842791190707 - 1.22145987412493 Zed 1419.84156326552 + 2.91406343545349e-05 _AI_ 900.876385216614 - 2.91406343545349e-05 Zed 1419.84159240615 + 0.00730893820728037 Brons 959.781639680099 - 0.00730893820728037 Zed 1419.84890134436 + 0.0771571008125494 Red Cloud 1369.56996849169 - 0.0771571008125494 Zed 1419.92605844517 + 31.9991061343805 Mindaugas 999.869916481381 - 31.9991061343805 Zed 1451.92516457955 + 0.402110254353145 Hirisov 1658.13506008711 - 0.402110254353145 tv1 610.461350432631 tv 431.581608641663 David 915.363678689907 Ozzy 963.479385469882 Pango 854.621331316582 _AI_ 900.87635607598 Brons 959.774330741892 Red Cloud 1369.49281139088 Mindaugas 967.870810347001 Hirisov 1657.73294983276 Zed 1452.32727483391 -- Attached file included as plaintext by Ecartis -- -- File: doranking.log.default run 1065659779 /home/freeciv/.freeciv/games/232329/gamelog got 95.000000 turns Found status information in gamelog. Zed: human: 95 ai: 0 winning player = Zed,316 Hirisov: human: 91 ai: 4 losing player = Hirisov,275 Mindaugas: human: 95 ai: 0 losing player = Mindaugas,235 Red Cloud: human: 56 ai: 39 losing player = Red Cloud,145 Brons: human: 57 ai: 38 losing player = Brons,125 M3ss14H: human: 0 ai: 95 losing player = _AI_,122 Pango: human: 73 ai: 22 losing player = Pango,121 Ozzy: human: 79 ai: 16 losing player = Ozzy,106 David: human: 67 ai: 28 losing player = David,34 tv: human: 89 ai: 3 losing player = tv,0 tv1: human: 24 ai: 7 losing player = tv1,0 update games set winners="", losers="" where id=232329 Zed 1416.39031602122 + 0.306302518090523 tv1 610.461379573265 - 0.306302518090523 Zed 1416.69661853931 + 0.109867406568971 tv 431.581637782297 - 0.109867406568971 Zed 1416.80648594588 + 1.69039208743486 David 915.369339074197 - 1.69039208743486 Zed 1418.49687803331 + 2.19910397037987 Ozzy 965.703454174496 - 2.19910397037987 Zed 1420.69598200369 + 1.19267208420799 Pango 855.842791190707 - 1.19267208420799 Zed 1421.8886540879 + 1.51880266459125 _AI_ 900.876385216614 - 1.51880266459125 Zed 1423.40745675249 + 2.07478337870746 Brons 959.781639680099 - 2.07478337870746 Zed 1425.4822401312 + 13.4471447016125 Red Cloud 1369.56996849169 - 13.4471447016125 Zed 1438.92938483281 + 2.36664012956589 Mindaugas 999.869916481381 - 2.36664012956589 Zed 1441.29602496238 + 24.8637629388221 Hirisov 1658.13506008711 - 24.8637629388221 tv1 610.155077055175 update players set games='236', points='610.155077055175', pct='0' where name='tv1' tv 431.471770375728 update players set games='1009', points='431.471770375728', pct='0.00297324083250743' where name='tv' David 913.678946986762 update players set games='135', points='913.678946986762', pct='0.125925925925926' where name='David' Ozzy 963.504350204116 update players set games='30', points='963.504350204116', pct='0.1' where name='Ozzy' Pango 854.650119106499 update players set games='17', points='854.650119106499', pct='0' where name='Pango' _AI_ 899.357582552023 update players set games='16620', points='899.357582552023', pct='0.351985559566787' where name='_AI_' Brons 957.706856301392 update players set games='7', points='957.706856301392', pct='0' where name='Brons' Red Cloud 1356.12282379008 update players set games='584', points='1356.12282379008', pct='0.208904109589041' where name='Red Cloud' Mindaugas 997.503276351815 update players set games='42', points='997.503276351815', pct='0.19047619047619' where name='Mindaugas' Hirisov 1633.27129714829 update players set games='206', points='1633.27129714829', pct='0.388349514563107' where name='Hirisov' Zed 1466.1597879012 update players set games='127', points='1466.1597879012', pct='0.401574803149606' where name='Zed' update players set wins=wins+1, gameid=232329 where name="Zed" update players set losses=losses+1, gameid=232329 where name="tv1" update players set losses=losses+1, gameid=232329 where name="tv" update players set losses=losses+1, gameid=232329 where name="David" update players set losses=losses+1, gameid=232329 where name="Ozzy" update players set losses=losses+1, gameid=232329 where name="Pango" update players set losses=losses+1, gameid=232329 where name="_AI_" update players set losses=losses+1, gameid=232329 where name="Brons" update players set losses=losses+1, gameid=232329 where name="Red Cloud" update players set losses=losses+1, gameid=232329 where name="Mindaugas" update players set losses=losses+1, gameid=232329 where name="Hirisov"