Details and Options
The Persian Immortals were an elite army described by the Greek historian and geographer Herodotus while attacking Greece in 480-479 BCE under Xerxes's command. Their name refers to the fact that the size of the army was always kept constant at 10000 by immediately replacing every fallen warrior with a warrior from reserve troops. Because of this tactic, morale was kept high, and the army was actually getting stronger over time.
n determines how many of the weakest agents are removed:
n | Integer, remove the n weakest agents. |
dist | Use the distribution dist to determine how many of the weakest agents are removed. |
m determines how random agents are removed:
m | Integer, remove m agents randomly |
dist | Use the distribution dist to determine how many random agents are removed |
{dist} | Each agent gets a random threshold between 0 and its fitness.
This threshold is then compared to a random attack given by dist.
Fitter agents have a higher chance of survival. |
pop describes the initial population:
n | Integer, n agents of fitnesses linearly chosen between 0 and 1. |
Automatic | Use 104 agents of fitnesses linearly chosen between 0 and 1. |
{f1, f2,…} | Use agents with fitness fi (should be between 0 and 1). |
tspec describes the time for storing the output:
n | Integer, simulate n steps and save data from all timesteps. |
{tmin,tmax,Δt} | Simulates for tmax steps but saves every Δt steps, starting from tmin. |
{{t1, t2,…}} | Simulates until Max[ti] and saves each ti. |
bins should be an integer that describes in how much bins the data should be binned. Fitnesses are assumed to be between 0 and 1.
PersianImmortals takes the following options:
"Repetitions" | Automatic | number of times to simulate |
"NewFitness" | Automatic | fitness for new agents |
"Strengthening" | Automatic | specifies how the surviving agents strengthen over time |
Possible settings for the option "Repetitions" include:
Automatic | perform a single simulation |
n | perform n simulations and average the results |
Possible settings for the option "NewFitness" include:
Automatic | generate agents with random fitnesses uniformly taken between 0 and 1 (UniformDistribution[0,1]) |
dist | generate agents with random fitnesses taken from the distribution dist |
Possible settings for the option "Strengthening" include:
Automatic | agents do not become stronger (equivalent to 0) |
val≤1 | after each time step val is added to the fitness and clipped to[0,1] |
val>1 | after each time step the fitness is multiplied by val and clipped to[0,1] |
Scaled[val] | after each time step the fitness gets a fraction val closer to 1 |
ResourceFunction["PersianImmortals"] returns an
Association with the following keys: "Population", "Repetitions", "BinDelimiters", "BinCenters", "BinCounts", "PDFs" and "CDFs".