**Figure 1.** (**A**) Phases of the *genetic algorithm*: 1) an *initial population* of FIs is created; 2) the *fitness* (AUC) of each FI is tested; 3) the fittest FIs have higher chances to be selected for *recombination*; 4) two *crossing-over points* are randomly found for each *parent* FI: *children* FIs are created by combining different parts of *parents* FI; 5) a low probability of random *mutations* of a deficit is introduced; 6) *children* FIs replace the least fit FI; (**B**) Output of the *genetic algorithm*: iteration by iteration, the AUC of the best FI and average AUC of the population of FIs increases until convergence. The number of deficits included can vary iteration by iteration; (**C**) Distribution of the ga-FI in the whole population (histogram) and density functions in different subsamples. Abbreviations: FI = Frailty Index, AUC = Area under the Curve, CO = Crossing Over point; ga-FI = best *genetic algorithm*-derived FI.