A computer model for a theory of evolution.
Cristiano Bocci, Paolo Freguglia, Enrico Rogora
Contents
1
2
2.1
2.2
2.3
3
4
5
1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . .
The model . . . . . . . . . . . . . . . . . . . . . . . . . .
The function random.individual . . . . . . . . . . . .
The function mate . . . . . . . . . . . . . . . . . . . . .
The function fit . . . . . . . . . . . . . . . . . . . . . .
The extent to which the model satisfies the fundamental
Some simulations . . . . . . . . . . . . . . . . . . . . . .
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . .
. . .
. . .
. . .
. . .
. . .
laws
. . .
. . .
1
3
3
5
6
7
9
12
Introduction
In this paper we discuss a computer model for a theory of evolution proposed
by Freguglia and Bazzani in [3].
Their phenotypical theory of evolution is a first level theory, since it does
not consider any specific mechanism of reproduction, nor any environmental
influence, but only the synthetic concept of perturbing action. In our model
we also implement a mechanism of reproduction and environmental selection, compatible with the 5 axioms of [3], in a way which will be discussed
in detail in section 3.
Bocci and Freguglia introduced a geometric model for Freguglia - Bazzani’s theory in [1]. In their geometric model they considered the notion of
fertility factor, as the main instrument for studying speciation. The model
presented in this paper implements their idea of fertility factor and many
features of their geometric model.
The paper contains a discussion of the possible use of our computer
model for a qualitative and quantitative understanding of the dependence
of speciation on internal factors and on external influences on the reproductive mechanism, which belong to the higher level evolution theories and are
simulated in a way compatible with respect to the first level fundamental
laws.
We use our computer model to investigate if our implementation of the
mechanism of transmission of the fertility factor is sufficient to explain speciation. This seems to depend non trivially on the values of the parameters
1
1 Introduction
2
on which the model depend and, in many situations, one needs to choose a
suitable mechanism of mate selection in order to catalyze speciation.
Our computer program, available at [2], uses the public domain statistical software R, freely available at [5]. We descripe the basic features
of our computer program by commenting the most important functions in
R-help format. We find this format both simple and useful, even if one does
not know anything about R itself. For convenience, we have added a short
appendix on R in order to make the paper self contained.
We consider individuals of some given species and assume that some
relevant phenotypical characters are measured on them. For simplicity, we
shall consider only continuous scalar characters, i.e. characters measured by
numbers, which may, in principle, assume all values in a given interval. For
example, weight, blood pressure, maximum speed and so on.
In Bocci - Freguglia model, each individual is identified with a suitable
set of characters, evolving with time. At each instant of time, an individual,
living at that time, is represented by a point in some Rn (n equals the
number of characters). By adding the time axis, each individual gives rise
to a curve of evolution. They assume that the time axis is discrete.
In this paper we assume that the evolution of a character with time
can be summarized by a set of phenotypical parameters. The evolution
of each character will have a deterministic component and a stochastic
component. The deterministic component is described by a parametric
law f (t; p1 , . . . , pk ) with parameters p1 , . . . , pk , (for example a logistic law
eb(t−a)
f (t; a, b, c) = 1+e
b(t−a) + c, with parameters a, b and c) while the stochastic
component is described by a parametric stochastic process X(t; q1 , . . . , qh )
with parameters q1 , . . . , qh . This character, on each individual, ach individual is identified by a specific choice of the parameters p = (p1 , . . . , pk ) and
q = (q1 , . . . , qh ).
This approach is in the same spirit as that proposed by [1] but it allows
us to reduce the complexity of the fenotypical description of an individual
in our examples. For example, each character considered in our simulations
is of the form f (t, p) + X(t), hence it is characterized by a single number p.
We assume that our biological universe consists of n species s1 , . . . , sn ,
the i-th of which has ki subspecies or types (i = 1, . . . , n). Note that ki may
be 1. Each subspecies has both male and female individuals, and reproduction is by mating individuals of different sex.
We assume that the total number of parameters of phenotypical characters which can be measured is constant across species and types. We allow,
however, the special value“NA” (Not Available) either for parameters of
characters which are not observable on some types, or for parameters which
have not been measured correctly on some individuals.
In principle, every sort of probability distribution for phenotypical potentials is allowed over individuals of a given type, as far as a satisfactory
2 The model
3
implementation in R can be defined. However only normal distributions are
considered in this implementation. Moreover, we assume to normalize the
measurement of each parameter so that the corresponding gaussian distribution is the standard one, with mean equal to zero and standard deviation
equal to one. This implies that the same values for the same parameters of
a given character may correspond to different phenotypical curves for males
and females of the same species and type.
Correlations between characters usually exist and should be considered
by providing suitable joint probability distributions. This is not yet implemented in our model.
2
The model
In our model, individuals are the basic objects. An individual is described
by a set of attributes:
• phenotypical parameters;
• sex;
• birth date and the (potential) duration of its life;
• fertility obstruction;
• type.
An individual may be added to our model in two ways1 :
1. by populating the model with a certain number of initial individuals;
2. by mating already existing individuals.
Correspondingly there are two functions, random.individual and mate.
A third function fit has been introduced in order to enhance the repruductive potential of an individual which is suitably close to a given phenotypical
fitting profile.
2.1
The function random.individual
Description
random.individual creates an individual in our simulated world. It sets
its attributes by choosing at random from the standard normal distribution.
Usage
random.individual(n.param=1,sex=NA,birth=0,type=1)
Arguments
1
An utility function set.attributes exists, that allows to change the attributes of an
already existing individuals or to set these attributes directly
2 The model
4
n.param is an integer and represents the number of phenotypical parameters under consideration in the description of an individual.
sex is an integer. Its default is NA. If sex is 1, the individual is a male.
If sex is 2, the individual is a female. If sex is NA, the program sets it
randomly.
birth is an integer. Its default is 0. It represents the (discrete) time
when the individual was born.
type is an integer. The default type is 1. It is used for modeling the
mating of individuals of different subspecies.
Value
The function random.individual returns a list of components: $sex for
sex, $birth for date of birth, $life for life span, $type for type, $fertobs
for fertility obstruction, $potentials for the vector of phenotypical parameters.
Life span, fertobs and potentials are expressed in standard units from
the mean. For example, a value 1.23 for the lifespan of a female individual
means that its life span is 1.23 standard deviation for the mean of the life
span of all females of that type. If one is willing to convert it in other units
(like seconds, days or years) one must provide the value of the mean and
standard deviation for the distribution of life span for females of that type.
However this is never necessary for our goals. Note that the same value
for a male individual may very well correspond to a different value when
expressed in a common unit for both genders, like years.
Note Our notion of fertility.obstruction is connected with the notion
of fertility factor, considered in [1]. Their fertility factor is the number of individuals in the offspring of a given individual; our fertility.obstruction
is the parameter on which the probability of a fertile mating depends on, according to equation 1. The expected number of individuals in the offspring of
a given individual can therefore be computed by knowing his fertile obstruction, that of its partners, and the number of matings in its life. Note that
the fertility factor of an individual increases when its fertility obstruction
decreses.
Examples
• A male, described by two phenotypical potentials:
LL=random.individual(n.param=2,sex=1)
• 50 individuals of type 2, described by a single phenotypical potential
n=50
individuals=list()
for(i in 1:n){
individuals[[i]]=random.individual(type=2)
}
2 The model
2.2
5
The function mate
Description
The function mate, when applied to two individuals of our simulated
world, either returns NA, when the two individuals cannot or do not generate
offspring, or returns a new individual, generated by the two mating partners.
Usage
√
mate(ind1,ind2,type.offspring=NA,fertility.translation=3 2,
a=1/2(1/3
√
2)
,fertility.penalty.offspring=0,
√
t=0,birth.delay=0,rand.factor=1/ 2)
Arguments
ind1,ind2 are two individuals. Each individual is a list, like the one
produced by the function random.individual or by the function mate itself.
type.offspring is a number which specifies the type of the offspring.
If both parents belong to the same type, also the offspring belongs to the
same type, unless another value is set for type.offspring.
fertility.translation is a number. It is used to compute the probability p that the mating of two individuals is fertile, i.e., it produces an
offspring. This probability is
p = a((ind1$fertobs+ind2$fertobs+fertility.translation))
(1)
if the exponent is non negative and p = 1 if the
√ esponent is negative. The
default value of fertility.translation is 3 2 is explained below.
a is a number. Its default value is
√
1/2(1/3
2)
.
The reason behind the default values for a and fertility.factor is the
following. The fertility obstruction of both male and female individuals
is assumed to be distributed as a standard gaussian distribution. Hence
the distribution of the values√of its sum is a gaussian with zero mean, and
standard deviation equal to 2. The probability (1) of a fertile mating of
two “average individuals”, i.e. individuals whose ferrtility.obstruction
is zero is equal to 0.5 when a and fertility.factor have the default vales.
fertility.penalty.offspring is a positive number which penalizes
inter-types mating.
t is an integer. It is the instant of time (over the discrete time axis),
when mating occurs. The default value is 0.
birth.delay is an integer. It is the delay between the act of mating and
the instant of birth of the offspring, which is therefore t + birth.delay.
The default value is zero.
2 The model
6
rand.factor is a number. It is used to introduce an element of stocasticity in the mechanism for computing the phenotypical parameters of the
offspring, which is computed as the mean of the phenotipical parameters of
the parents plus a normally distributed random number with
√ mean zero and
standard deviation rand.factor. The default value is 1/ 2. This choice
guarantees that the distribution of each potential in the offspring remains
distributed according to the standard normal distribution. In fact, if X is
the the standard normally distributed random variable which describes the
distribution of a given potential on both males and females, the random variable which describes the distribution on the offspring is Z = 12 (X + X) + Y ,
where Y is a normally distributed random variable with mean zero and standard deviation rand.factor. p
Z is therefore normally distributed with mean
zero and standard deviation 1/2 + rand.factor2 which is equal to 1 for
the default value of rand.factor.
Details
The mechanisms for computing the attributes of the offspring is the
following. Sex is determined randomly. Life span and every phenotypical
parameter is the average of the corresponding parameter of the parents, plus
a random number. Fertobs is a standard normally distributed number.
Note
Other possible choices for the mechanism of transmission of potentials
and fertobs will be consiered in future releases. These choices may have a
drastic impact on the speciation mechanism. In particular, we have observed
that if one compute fertobs of the offspring as the mean of the parents
fertobs and not as a standard normally distributed number, the antagonist
force towards speciation is larger.
Value
Same as random.individual
Examples
ind1=random.individual(n.param=4,sex=1,type=1)
ind2=random.individual(n.param=4,sex=2,type=1)
mate(ind1,ind2)
2.3
The function fit
Description
The function fit enhances the repruductive potential of an individual
which is suitably close to a given phenotypical fitting profile.
Usage
fit(ind,fitting.profile,method="fertility")
Arguments
ind is an individual, as produced by the function random.individual.
fitting.profile Is a set of phenotypical parameters. If the parameters
of an individual are closer to those of the fitting profile than to the average
3 The extent to which the model satisfies the fundamental laws
7
parameters of its type (which are all zeros), then the function fit modifies the attributes of ind in order to enhance its reproductivity potential,
according to one of the following methods.
method Is the method which is used by the function fit to enhance the
reproductivity potential of an individual.
If method="fertility" (the default) the enhancement is obtained by
aplying the function fertility.fit which lowers the fertobs of ind.
Other possible methods, not yet implemented, are viability, which
enlarges the life span and offspring which enlarges the number of children
in each fertile mating.
Value An individual like ind, whose attributes are modified according to
method.
Examples
Note how the fertility obstruction of an individual whose potentials are
close to a fitting profile is decreased by the function fit.
ind=random.individual(n.param=4,sex=1,type=1)
ind$fertobs
new.potentials=ind$potentials
new.potentials[1]=1.5
ind=set.attributes(ind,potentials=new.potentials)
ind=fit(ind,c(1.5,0,0,0))
ind$fertobs
3
The extent to which the model satisfies the fundamental laws
In this section, we recall the fundamental laws of the evolution theory introduced in [3] and discuss in which sense our model satisfies them.
Our model gives an interpretation of the theory of evolution [3] independent on the geometric model [1], but greatly inspired by it. Our computer
model is obviously more geared towards simulations.
Law of quantitative phenotypical characters. Let x be a biological individual. x can verify or not the phenotypical parameters a in a certain set
C ⊂ Rn .
The meaning of this law is that an individual is completely described by a
fixed set of measurable phenotypical characters. In our model an individual
is a set of potentials for phenotypical characters. Individuals are created by
selecting the parameters at random from some given distributions. At the
moment the distributions are all normal and no correlation is implemented.
The probability that two individuals get the same potential is in principle
zero (continuous distributions) and practically very low and computable.
Note that the phenotypical parameters does not describe completely the
evolution of the phenotypical character during the life span of the individual,
3 The extent to which the model satisfies the fundamental laws
8
but only its deterministic component.
Law of existence of species. At a fixed time we can always establish
whether an individual x belongs to a certain species Sβ or not, in relation
to the values of its parameters cx (t).
In our model a species is described by assigning for each character a
standard normal distribution of its phenotypical parameters. Therefore the
phenotypical parameters of two species cannot be seprated. However, in
order to get the phenotypical curves of individuals of different species, we
apply different parametric functions. We can always define a phenotypical
box for each species in such a way that each phenotypical curve of an individual of a given species is contained in its box with a fixed probability, sy
99.9%, and the boxes of two different species do not intersect.
Law of generation and interfecundity. At a certain time of its life an
individual x, which belongs to a particular species Sβ , may breed another
individual x0 . Hence, if x and y belong to the same type then x and y can
breed.
This law is implemented by the function mate.
Law of biological success. The generational distance between two individuals x and x0 is inversely proportional to the biological success of x.
The meaning of this axiom is that there is a regression mechanism toward
the average profile, i.e. an antogonist force towards speciation. This is
implemented in the function mate. Infact, as explained in subsection 2.2,
phenotypical parameters of the offspring of two individuals are the average
of the parents parameters, plus a slight random perturbation.
Fundamental Law. Let x1 be very similar to the average individual x∗ belonging to type Vj of the species Si . If from x1 through a persistent perturbing action, a sequence of individuals can be bred, then at a moment of this
real sequence of generation an individual y 0 is bred and it does not belong,
according to its features, to type Vj of the species Si .
The meaning of this axiom is that a persitent perturbing action contrasts
the regression mechanism and leads to individuals for which at least one
phenotypical parameter stabilizes around an attractive value, different fron
the mean (which is always zero in our implementation). This is realized by
combining the function fit with a mate selection mechanism, as we shall
discuss in section 4.
4 Some simulations
4
9
Some simulations
In this section we shall present some simulations based on our computer
model. The goal of these simulations is to illustrate how antagonist and
agonist forces toward speciation act in our model. From a phenotypical
perspective, speciation is just a sensible change in the value of some phenotypical characters, or, in our model, of some phenotypical parameters. An
agonist force is assumed to act on the fertility factor of individuals. It acts
by decreasing the fertility obstruction, or by increasing the lifespan, or by
increasing the number of matings (in case of a male), or by producing more
offspring from a single succesful mating (in case of females), or by a combination of these factors. Moreover, the mechanism which is responsable of
the modification of the fertility factor, may also be amplifyed by a suitable
mate selection mechanism. Which misture of fertility factor modification
and mate selection mechanism is effective in producing a phenotypical speciation depends non trivially on many parameters, like the number of possible matings during the lifespan, the average number of children in a fertile
mating, the decrement percentage in fertility obstruction and so on. One of
the reason for our computer program is to investigate this dependence. In
this section we show just a couple of examples and leave an extensive analysis to a future paper. In these examples we implement a simple random
mechanism of mate selection. To each sexually mature female is randomly
assigned a sexually male at each iteration. Moreover, before each iteration
dies males and females are eliminated from the population.
Simulation of 2 gaussian distributed potentials over a population of 100
males These potentials may correspond, for example, to height and weight.
4 Some simulations
10
0
-2
-1
Second potential
1
2
Distribution of 2 gaussian potentials over 100 males
-1
0
1
2
First potential
Simulation of the evolution of a population in absence of a fitting profile
(11 iterations) After 11 iterations, some individuals die while the random
mating produces newborn individuals. The distribution of each phenotypical
parameter remains standard normally distributed.
0
-2
-1
Second potential
1
2
Potentials over the males after 11 iterations
-1
0
1
2
First potential
Also the distribution of the fertility obstruction remain standard normal
4 Some simulations
11
40
0
20
Frequency
60
80
Distribution of fertility obstruction
-2
-1
0
1
2
3
Fertility obstruction
Further eleven iteration with a fitting profile We now introduce a fitting
profile, which is (1.5,0). This means that newborn individuals whose phenotypical potentials are closer to (1.5,0) than to the average population profile
(0,0), gets an improvement in their fertility factor in the form of a reduction
of fertility.obstruction. Therefore, a group of individual which are
closer to the fitting profile becomes more fertile. The histogram of fertility
obstruction begins to show a secondary peak around −4.
400
200
0
Frequency
600
800
Distribution of fertility obstruction
-8
-6
-4
-2
Fertility obstruction
0
2
4
5 Conclusions
12
With the presence of a fitting profile, the higher fertility of individuals
closer to that profile tends to begin a process of phenotypical speciation.
This is shown by the mean of the potentials. The mean of the first potential
becomes 0.08 while that of the second potential remains 0.01.
After other 11 iterations in presence of the same fitting profile, the population increases to around 70.000 individuals. The mean of the first potential
becomes 0.16 while that of the second potential remains 0.00 and the phenomenon of phenotypical speciation becomes more evident.
This phenomenon can be dramatically catalyzed by introducing a different mechanism of mate selection. The investigation of these mechanisme is
left to a future work.
5
Conclusions
We belive that our computer simulations may give a useful basis for discussions between biologists and mathematicians, since it illustrates a phenotypical evolutionary theory in a concrete way. Moreover, on the basis of
the results of simulations, one can compare the expectations of the biologist with the mental images of the mathematician with reciprocal benefit.
This simulated model also provides a good level of interaction, allowing easy
modification of the parameters of the functions used in the simulation and
easy implementation of new functions. These interactions promotes a better
understanding of the phenomena and a shift from a qualitative to a quantitative perspective. Finally, simulated models like this may produce useful
simulated data to test differentiable models and link differential parameters
to microscopical variables in a field where real data are very difficult to
obtain.
Appendix on R
R is a functional language for doing statistical computations. Several functions are provided which can be used as black boxes, of which needs only
to know which kind of inputs must be provided and what kind of output
each function returns. A program is obtained by nesting several functions.
User defined functions are easly defined and can be used in the same way
as internal functions, allowing for easy extension of the program.
We recall in this appendix what is needed to know about R in order
to follow our paper and understand the examples. We shall give a very
simplified description of the functions we have used, according with R help
format, i.e. by specifying the syntax of the funtion, describe the format of
the input, the output obtained and showing some examples.
R can deal with many type of objects, for example scalars, vectors, matrices, booleans. A list is a particular kind of R object. It consists of a bunch
of values (scalars, vectors, matrices, etc.), called attributes. If the variable
5 Conclusions
13
L refers to a list with two attributes, say weight and height, R acesses the
value of each attribute by using the $ syntax, hence L$weight refers to the
value of the attribute weight of L, and L$height the same for the attribute
height.
The function c
Description
Combines its argument into a vector structure.
Usage
c(...)
Arguments
... are numbers to be concatenated
Value
A vector
Note
The implementation is more general and allows combinations of objects
more complexed than numbers, but we shall only make use of this simple
form.
Examples
v=c(1,4,2,3) Combines the integers 1,4,2,3 into a vector and saves it
in the variable v. To get the i-th value of the vector v, just use v[j].
The functions cbind and rbind
Description
Take a sequence of vectors an combine by columns or rows respectively.
Usage
cbind(...)
rbind(...)
Arguments
... are vectors to be combined in a matrix structure
Value
A matrix
Examples
v1=c(1,4,2,3)
v2=c(2,4,1,3)
V=cbind(v1,v2)
W=rbind(v1,v2)
V and W are transposed matrices. To get the (i, j)-th value of the matrix
V, just use V[i,j].
5 Conclusions
14
The function runif
Description
Generates random deviates from the uniform distribution.
Usage
runif(n,min=0,max=1)
Arguments
n
number of observations in the sample.
min, max
are the lower and upper limit for the distribution. They both have a
default value which is 0 and 1 respectively. If a default value is good for us,
we do not need to specify it. (See example)
Value
A vector of n numbers between min and max. If the sample is large or
if we repeat sampling many times, the distribution of the values obtained is
approximately uniform on the interval [min,max].
Examples
v=runif(1000,max=2)
returns 1000 numbers between 0 and 2. We will get approximatly the
same number of elements of v on each subinterval of the same length.
The function rnorm
Description
Generates random deviates from the normal distribution.
Usage
runif(n,mean=0,sd=1
Arguments
n
number of observations in the sample.
mean, sd
are the mean and standard deviation of the distribution. They both have
a default value which is 0 and 1 respectively. If a default value is good for
us, we do not need to specify it. (See example)
Value
A vector of n numbers. If the sample is large or if we repeat sampling
many times, the distribution of the values obtained is approximately normal,
centered at mean and with standard deviation sd.
Examples
v=runif(1000,mean=2)
returns 1000. An histogram of v will be approximatly normal, centered
at 2 and with standard deviation 1.
5 Conclusions
15
References
[1] Bocci, C., Freguglia, P., The Geometric Side for an Axiomatic Theory
of Evolution, Rivista di Biologia/Biology Forum 99 (2006), pp. 307-326.
[2] Bocci, C., Freguglia, P., Rogora, E.
http://www.mat.uniroma1.it/people/rogora/ComputerModel/Program.R
[3] Freguglia, P., Bazzani A., Axiomatic Theory of Evolution and Proposal
of a Dynamical Model. Mathematical Modelling and Computing in Biology and Medicine, 5th ESMTB Conference 2002, MIRIAM, Esculapio,
Bologna (2003), pp. 339-348.
[4] Freguglia, P., Bazzani A., An Evolution Model of Phenotypic Characters. WSEAS Transactions on Biology and Biomedicine 1 (2004), 4, pp.
369-372.
[5] http:\\www.R-project.org
© Copyright 2026 Paperzz