Open thl19git opened 1 year ago
Initial manifesto: {fightDecisionPower: false, lootDecisionPower: false, termLength: 3, overthrowThreshold: 51}.
Two variables should be maintained which store our sentiment towards fightDecisionPower and lootDecisionPower. As per Social Capital Values, these could be in the range [0,100]. They would be initialised to 25. Values >=50 indicate we think the leader should have the power, and values <50 indicate that we think the leader shouldn't have the power.
Two further variables should store term length and overthrow threshold. These should be floating point numbers to allow more precise beliefs (particularly in the case of term length)
At the end of a leader's term (excluding when the leader dies), our manifesto should be updated (note that this should be AFTER the leadership value has been updated for the outgoing leader). This is based on the manifesto the leader was elected with. Each value should be updated as per the following formula:
VU += (L-50)*(VL - VU)/100
where VU is our value (for each of the 4 parts of the manifesto), L is the outgoing leader's leadership value, and VL is the value the leader was elected with.
E.g. A leader was elected to stay for 5 rounds. We believe a leader should be in power for 3 rounds. At the end of the leader's term, their leadership value is 75. Plugging the numbers into the formula above
VU = 3, VL = 5, L = 75 -> new VU is 3.5
The same leader was elected with the fight imposition. If our value beforehand was 25, it would be updated to 44 (43.75). Loot and fight imposition values for manifestos are interpreted such that they have values 0 or 100.
Some care will be needed to clamp values within an appropriate range (e.g. [1,10] for term length etc.)
All candidates should be fairly evaluated. The broad idea is to use a combination of manifesto and social capital values to rank the candidates.
When considering social capital values, in an ideal world weights mentioned below would be dynamic. However, for simplicity and time, we should initially make them static.
For each candidate generate a manifesto score:
For each candidate generate an overall social capital score:
Then, to generate a total score for the candidate, multiply the manifesto score and the social capital score. This gives a final score in the range [0,100]. Rank candidates according to this score. If voting for a single candidate, just put the candidate with the highest score on the ballot. Else if voting using borda count, put all candidates with score > 50 down.
Generate the overall social capital score for the leader (same formula as in the above comment). Modify the score based on the outcome of the previous level:
score *= 1/(1 + 0.25*numAgentsDied)
If no agents died, the score is unchanged. Else, the score decreases with increasing agent deaths.
If score < 45, vote NEGATIVE If score > 55, vote POSITIVE Else, ABSTAIN (don't have strong opinion either way)
For elections, it seems to be somewhat common that agents will end up not voting for any candidates - I think the conditions might be a bit too strict with a.leader < 40.
Just as a failsafe I have added that if no suitable candidates are found, the agent will just vote for itself.
For elections, it seems to be somewhat common that agents will end up not voting for any candidates - I think the conditions might be a bit too strict with a.leader < 40.
Just as a failsafe I have added that if no suitable candidates are found, the agent will just vote for itself.
I like the failsafe. We can tweak the thresholds wherever necessary. They were just initial guesses with no mathematical backing.
Implement the following functions:
Refer to the presentation for some incomplete logic for these functions. Remaining logic is left to whoever works on this. Any deviations from the presentation should be logged in this issue.