Print Page | Close Window

Alliance Overall Scores

Printed From: Illyriad
Category: Miscellaneous
Forum Name: Technology & data
Forum Description: Discussions on data dumps, downloads, and third party applications.
URL: http://forum.illyriad.co.uk/forum_posts.asp?TID=6772
Printed Date: 27 Jun 2019 at 14:00
Software Version: Web Wiz Forums 11.10 - http://www.webwizforums.com


Topic: Alliance Overall Scores
Posted By: eowan the short
Subject: Alliance Overall Scores
Date Posted: 20 Jan 2016 at 21:49
One of the problems with comparing alliances is that there is no overall score for alliances, like there is for players. Generally, the amount of land an alliance has seems to be most commonly used but this doesn't take into account the different levels specialization an alliance can have towards trade, military, questing etc. To help with comparisons I have started to make a code which would create an overall score for all active alliances. 
However, I am not sure how people would prefer the overall score to be calculated. It could be calculated in the same way on which player overall scores are calculated, using magic, trade, tech, attack, def, diplo, pop and build scores. Or ,it could also include membership, land owned and/or number of cities. Which would you prefer?

I was also thinking that I could make specific scores such as a military score composed of attack and defense.



Replies:
Posted By: Tensmoor
Date Posted: 20 Jan 2016 at 22:22
For me an alliance is about the people in it. How those individuals interact (or don't) with others, how they contribute to the game etc. Not something that can be calculated by any formula only by observing/talking with them.


Posted By: abstractdream
Date Posted: 21 Jan 2016 at 03:17
...on the other hand, whatever you use for scoring, it should be specific to alliances (in other words, something individual players don't have) or at least have that as a major component.

-------------
Bonfyr Verboo


Posted By: Rill
Date Posted: 21 Jan 2016 at 07:38
Very few people pay much attention to scores for individual players.  Creating an alliance score would simply pool the irrelevance.


Posted By: Hyrdmoth
Date Posted: 21 Jan 2016 at 10:31
I would calculate a score for Alliances using just land, towns and population.

You can apply the same algorithm as used for the overall player score (ie scaling by the highest in each category).

EDIT: Oh, and I'm looking forward to seeing what you come up with. Thanks!


Posted By: eowan the short
Date Posted: 28 Jan 2016 at 23:59
I agree that scores do not play a large part in Illyriad, however, they are a useful measure of experience and strength. For example, the Illyriad Times commented about when SHARK dropped to 2nd in land ranking. I have also seen comments about how SIN are relatively small compared to SHARK but this only takes the amount of land into account, not their military strength and experience.


Posted By: Angrim
Date Posted: 29 Jan 2016 at 00:15
Originally posted by eowan the short eowan the short wrote:

I have also seen comments about how SIN are relatively small compared to SHARK but this only takes the amount of land into account, not their military strength and experience.
because advanced military strategy involves the appropriate use of sovereignty, land is the best proxy we have for potential military strength. (it says nothing very helpful about how appropriately the sovereignty is used, but unused sovereignty can be turned to military use much more quickly than new sovereignty can be established, etc.)


Posted By: eowan the short
Date Posted: 29 Jan 2016 at 00:26
I have created the code which does the calculations. However, it does not gather the data it need automatically, I will work on this. It also only runs on IDLE for some reason which I will fix ASAP.

I included all scores on the alliance leader-board.

Done in Python 3.5. You need to copy and paste the alliance leader-board into a text document called data.txt which is in the same folder as the code. Then run the code through IDLE. Don't include the
header of the alliance leader-board.



#Code to determine the ranking of alliances through an overall score
#Overall score based upon the formula for player overall scores provided by GM Stormcrow
#Adds in members, cities and land claimed
import string
def linecount(fname):
    with open(fname) as f:
        for i, l in enumerate(f):
            pass
    return i + 1
class Del:
  def __init__(self, keep=string.digits):
    self.comp = dict((ord(c),c) for c in keep)
  def __getitem__(self, k):
    return self.comp.get(k)
DD=Del()
no_alliances = linecount("data.txt")
alliance_scores=[[0 for x in range(15)]for x in range (no_alliances)]
text_alliance_data=open("data.txt", "r")
all_alliance_data =text_alliance_data.readlines()
total_score=0
alliance_names=[0 for x in range (no_alliances)]
trade_scores=[0 for x in range (no_alliances)]
tech_scores=[0 for x in range (no_alliances)]
quest_scores=[0 for x in range (no_alliances)]
magic_scores=[0 for x in range (no_alliances)]
def_scores=[0 for x in range (no_alliances)]
diplo_scores=[0 for x in range (no_alliances)]
build_scores=[0 for x in range (no_alliances)]
attack_scores=[0 for x in range (no_alliances)]
pop_scores=[0 for x in range (no_alliances)]
mem_scores=[0 for x in range (no_alliances)]
land_scores=[0 for x in range (no_alliances)]
city_scores=[0 for x in range (no_alliances)]
overall_scores=[[0 for x in range(3)] for x in range (no_alliances)]
for i in range (0,no_alliances):
    for x in range (0,14):
        alliance_scores[x]=(all_alliance_data.split("\t")[x])
    for x in range (2,14):
        alliance_scores[x]=int(alliance_scores[x].translate(DD))
for i in range (0,no_alliances):
    for x in range (2,14):
        total_score+=alliance_scores[x]
    trade_scores=alliance_scores[13]
    tech_scores=alliance_scores[12]
    quest_scores=alliance_scores[11]
    magic_scores=alliance_scores[10]
    def_scores=alliance_scores[9]
    diplo_scores=alliance_scores[8]
    build_scores=alliance_scores[7]
    attack_scores=alliance_scores[6]
    pop_scores=alliance_scores[5]
    city_scores=alliance_scores[4]
    mem_scores=alliance_scores[3]
    land_scores=alliance_scores[2]
    
max_pop_score=max(pop_scores)
max_attack_score=max(attack_scores)
max_build_score=max(build_scores)
max_diplo_score=max(diplo_scores)
max_def_score=max(def_scores)
max_magic_score=max(magic_scores)
max_quest_score=max(quest_scores)
max_tech_score=max(tech_scores)
max_trade_score=max(trade_scores)
max_mem_score=max(mem_scores)
max_city_score=max(city_scores)
max_land_score=max(land_scores)
for i in range(0,no_alliances):
    trade_effect=(alliance_scores[13])/(max_trade_score)
    tech_effect=(alliance_scores[12])/(max_tech_score)
    quest_effect=(alliance_scores[11])/(max_quest_score)
    magic_effect=(alliance_scores[10])/(max_magic_score)
    def_effect=(alliance_scores[9])/(max_def_score)
    diplo_effect=(alliance_scores[8])/(max_diplo_score)
    build_effect=(alliance_scores[7])/(max_build_score)
    attack_effect=(alliance_scores[6])/(max_attack_score)
    pop_effect=(alliance_scores[5])/(max_pop_score)
    mem_effect=(alliance_scores[3])/(max_mem_score)
    land_effect=(alliance_scores[2])/(max_land_score)
    city_effect=(alliance_scores[4])/(max_city_score)
    topfrac=total_score*(pop_effect+attack_effect+build_effect+diplo_effect+def_effect+magic_effect+quest_effect+tech_effect+trade_effect+mem_effect+land_effect+city_effect)
    overall=topfrac/11000
    alliance_scores[14]=(int(round(overall, 0)))
    overall_scores[2]=(int(round(overall,0)))
    overall_scores[1]=alliance_scores[1]
    overall_scores= sorted(overall_scores, key=lambda x: x[2], reverse=True)
for i in range (0, no_alliances):
    overall_scores[0]=i+1  
print("Alliance Leaderboard ")
for i in range (0,no_alliances):
    if((len(overall_scores[1])>13)):
        if(len(overall_scores[1])>21):
            print(overall_scores[0],("\t"),overall_scores[1],("\t"),overall_scores[2])
        else:
           print(overall_scores[0],("\t"),overall_scores[1],("\t\t"),overall_scores[2])
    else:
       print(overall_scores[0],("\t"),overall_scores[1],("\t\t\t"),overall_scores[2])
input("")




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.10 - http://www.webwizforums.com
Copyright ©2001-2017 Web Wiz Ltd. - https://www.webwiz.net