Friendship Dynamics : Modelling Social Relationships through a Fuzzy Agent-Based Simulation

Social relationships such as friendship and partner choice are ruled by the proximity principle, which states that themore similar two individuals are, themore likely theywill become friends. However, proximity, similarity, and friendship are concepts with blurred edges and imprecise grades of membership. This study shows how to simulate these friendship dynamics in an agent-based model that applies fuzzy sets theory to implement agent attributes, rules, and social relationships, explaining the process in detail. Although in principle it may be thought that the use of fuzzy sets theorymakes agent-basedmodellingmore elaborated, in practice it saves themodeller from taking some arbitrary decisions on how to use crisp values for representing properties that are inherently fuzzy. The consequences of applying fuzzy sets and operations to define a fuzzy friendship relationship are compared with a simpler implementation, with crisp values. By integrating agent computational models and fuzzy set theory, this paper provides useful insights into scholars and practitioners to tackle the uncertainty inherent to social relationships in a systematic way.


Introduction
The dynamics of social relationships, such as friendship or partnership patterns, is a complex field of study.In this context, social dynamics refers to the collection of agent interactions, their conditions, and associated mechanisms, together with the emergent behaviour that they bring about.The field has attracted a great deal of interest over the past decades, mostly due to a very rapid increase in data availability and better modelling techniques.A large body of sociological and psychological research has shown that individuals' actions, even those the way agents establish social relationships among them by taking into account their degree of similarity.The whole friendship dynamics is described in-depth in Section 5.Then, four versions of Mentat with different degrees of fuzzification are presented in Section 6 and a comparison of their performances is also provided, in order to evaluate the benefits of using fuzzy agents.Finally, Section 7 provides some concluding remarks derived from this analysis.

Overview of Mentat Social Dynamics
Mentat is an agent-based model that analyses the impact of demographics in the evolution of values in a society.Specifically, it has been applied to simulate the Spanish society from the period of 1980 to 2000, taking as a base data the European Values Study EVS 23 .In the Mentat model, social dynamics, in particular how friendship relationships and couples are formed, has an impact in the evolution of the demography and the transmission of values from one generation to another.
The Mentat model was programmed in Java using the Repast 3 framework 21 .It simulates 3019 agents along 1000 steps 20 years X steps of warmingup, with an X {100 → 1000}.It uses a torus-grid of 98 × 98 cells, with a fixed density of 3.2 cells/agent.Additional details concerning its theoretical foundations or technical details can be found in 20, 22 .Mentat considers agents that are situated in a two-dimensions square grid world, and where agents can communicate with others in their neighbourhood, as explained in Section 4.1.A similarity function, which is described in Section 4.2, determines with which agents in the neighbourhood one can establish a friendship relationship.This idea is based on the the "proximity principle," which states that the more similar two individuals are, the stronger their chances of becoming friends are for a throughout sociological analysis, see Section 5.1 .Thus, the chances of two neighbours of becoming friends are directly proportional to their similarity.Moreover, if friendship is considered a gradual relationship, the more similar two agents are, the better friends they will become over time.This friendship process is summarised in Figure 1.There are several methods for quantifying this emergence and evolution of friendship, and the one selected for Mentat is described in Section 5.2.
The same as neighbours, friends can be also rated and ordered in terms of similarity, which is useful for the matchmaking process.First, friends are filtered taking into account Boolean questions such as "is this agent single?", "is it an adult?", "does it have opposite gender?".Afterwards, the selected subset are the "candidates" for becoming a spouse.The selection among the candidates is followed in the order defined by similarity: the first one of the queue who passes the filter will be chosen see Section 5.3 .This matchmaking process is summarised in Figure 2. As far as couples appear, so do families.Each couple will have chances of having some children following the demographic model criteria, which are specified by a set of probabilistic equations.For an insight into those decisions, outside of the scope of this paper, check 24 .

Introducing Fuzzy Sets in the Mentat Model
The first version of the Mentat model was developed using crisp nonfuzzy values for agent attributes and relationships.This raised several issues, such as the lack of high similarity among the partners found needed for an appropriate children generation or  the over-simplification of boolean and static friendship links, which is inconsistent with the literature.Fuzzy set theory has been introduced in the model in order to reduce these issues, avoid unnecessary biases, and produce more realistic results, consistent with the literature.
Here, we show the fuzzification process step by step, resulting in a fuzzy ABM, the final version of Mentat.The whole process consisted in the fuzzification of the agent  characteristics, the similarity process, the fuzzification of the friendship relationship together with the introduction of a friendship function that varies over time, and a new partner matchmaking calculation.Comparing the results of a nonfuzzy and a fuzzy agent-based model, it can be assessed that the fuzzy version deals with the problem of similar partner finding in a more accurate way.

Fuzzy Set Theory for Modelling
Computational models of social systems can improve considerably by integrating fuzzy set theory.Firstly, because uncertainty is an inherent property of social systems, individuals are often vague about their beliefs, desires, and intentions and they evaluate their opportunities in vague and ever-changing contexts.Not surprisingly, they use linguistic categories with blurred edges and gradations of membership, such as "acquaintance" or "friend."Fuzzy logic is oriented at modelling imprecise modes of reasoning in an environment with uncertainty and vagueness 25, 26 , as it happens for many aspects in human societies.Since vagueness is such a common feature in the social realm, fuzzy logic provides us with a useful way to handle this vagueness systematically and constructively 15 .Secondly, certain complex problems tackled by ABM cannot be properly modelled with the typical simple agent models.There are several ways of tackling such complexity, and depending on the context under study, one or another may be used.An example of a system that requires further considerations in agent modelling would be some sociological analysis derived from the European Values Study and the World Values Survey carried out by Inglehart 27 .In these surveys there are many questions about the degree of happiness, satisfaction in different aspects of life, or trust in several institutions.Although there is some kind of categorisation for the possible answers, such as "Very much" or "Partially," there is always some degree of imprecision, which is difficult to model with discrete/crisp categories.Even more, when the individual is evolving to different positions, some of these values get even more undefined.This issue arises also when modelling agent relationships such as friendship: is it possible to measure a degree of friendship between two persons?Similarity and friendship degree are blurry concepts, and this uncertainty must be modelled rigorously.In this context, an appropriate way of increasing the model complexity in order to improve its refinement can be fuzzy logic.Finally, fuzzy logic might facilitate the communication and mutual understanding among different experts, something crucial in a multidisciplinary field like social simulation.For instance, it is common in ABM to take into account previous research carried out by social scientists and to consider their advice, which should be consulted repeatedly along the modelling process.Very often they use linguistic variables and terms to express their knowledge.These linguistic concepts could be better represented with fuzzy sets.

Reviewing the Importance of Fuzzy Set Theory in ABM
There is an increasing interest among social scientists for adding fuzzy logic to the social sciences toolbox 28 .Likewise, even though it is still incipient, there are several examples of researches linking fuzzy logic with social simulation.Since the early proposal of Cioffi-Revilla 17 , in which the author gave preliminary arguments for the use of fuzzy logic in the social sciences and even computer simulations, some models followed this path.For instance, in some models, agents apply fuzzy logic rules to make their decisions; "fuzzy controls" or "fuzzy agents" are expert systems based on "If → Then" rules where the premises and conclusions are unclear.Unlike traditional multiagent models, where these completely determined agents are an oversimplification of real individuals, fuzzy agents take into account the stochastic component of the human behaviour.
Some authors have proposed to improve the agents' strategy choices within the iterated prisoner's dilemma using fuzzy logic decision rules 29 .Other researchers have claimed that simulation based on two-player games can use fuzzy strategies when analytic solutions do not exist or they are computationally complicated to obtain because agents use fuzzy strategies; i.e., "If I think my opponent will choose action x, I will choose action y" 30 .Agent fuzzification has been already applied for social network analysis, as in the work of Carb ó et al. 31 , but considering mainly relationships among agents.Relevant examples of fuzzy multiagent based models are Fort and Perez work on spatial dilemmas 32 , Jens Epstein's extension of the sugar-space model with fuzzy agents 18 , and interesting computational modelling of "fuzzy love and romance" 33 .

Introducing Fuzzy Sets
Given a universe of discourse U, a fuzzy set µ ∈ U → 0, 1 is a mapping function that gives a membership degree in the interval 0, 1 to every element of U 25 .Note that classical sets are particular cases of fuzzy sets.There are many human characteristics that do not have a clear boundary or depend on the interpretation or context, such as young or beauty.They can be represented by a fuzzy set on the set of human people, giving them a membership degree of the characteristic, such as, for instance, 0.8 or 0.2.An example of such membership degree µ is represented in Figure 3, where µ Age can be observed.There, three fuzzy sets i.e., functions corresponding to three concepts are plotted, with a different membership degree depending on the age of the individual.
Given some fuzzy sets representing characteristics, sometimes it is needed to model algebraical operations on them, as "young" and "beauty," that must also be modelled, for example to trigger a rule in approximate reasoning systems.In order to use different operators, it is needed to define those algebras, generalising the classical sets.Therefore, a fuzzy relation R, generalising the classical logic relations, can be defined as R : U×U → 0, 1 34 .Fuzzy relations have multiple applications to represent degrees of relations between objects in an universe.Those relations can also be characterised without a clear border, such as the Friendship relationship.Classical relations cannot express some types of information as "we are more or less friends," or "a little bit friends."Fuzzy relations are mostly used in artificial intelligence applications to represent degrees of similarity that define unclear groups or clusters or to model implications rules to make inference with uncertainty, imprecision, or lack of knowledge.
There are other definitions of fuzzy concepts related to the mathematical insight of the fuzzification process carried out here.See 35 for a formal clarification of basic operators tnorms and conorms , properties as t-transitivity or t-indistinguishability, and fuzzy similarity generalising the classical equivalence relations 36 .

Communication
This section provides details on the local communication process among agents, based on a two-dimensional neighbourhood.Besides, it tackles the degree of similarity among each two neighbours, exposing two alternative ways of implementing it: a gratification algorithm and its improvement using fuzzy logic.This is illustrated with the Mentat model.

Neighbourhood
The world space in Mentat consists of a 2D square grid of size 100 × 100 configured as a torus, and each agent can be placed in a single grid cell.Agents cannot move, and grid cells are passive and all equal but for their position in the grid .The space represents the "social space" of the agent, that is, the agents around agent A are those with whom A can relate, regardless of their actual geographical distance to it.That is, if A lives in a city and it has no relation neither interaction with its building neighbours, they would not be in its social space.The same way, if A has interaction with individuals who are geographically distant but that share an internet forum, they would be included, as there is chance of some sort of friendship to emerge among them.
As each agent has just local knowledge of such space, it is defined a neighbourhood for each, limiting the number of agents that anyone can interact with.Thus, an extended Moore neighbourhood of radius 6 was chosen, with a maximum of 168 agents around, and an average of 52 based on the agents density of 3.2, in order to reach the typical number of personal friends 37, 38 .Instead of considering the average of around 100 contacts that an individual usually has, the number of friends was chosen, as it reaches maximums of around 50.This is done for limiting agent interaction and avoiding a "town effect" in the model, in which the "friends of friends" of an agent would cover most of the population.
As long as agent A is a neighbour of agent B, they will be able to communicate.In some systems, agents need to compare themselves with their neighbours, in order to take decisions based on that new information maybe selecting only some agents to establish further communication .This comparison is usually carried out through similarity measures.As explained in the next section, the basic crisp version of Mentat uses a discrete gratification similarity, while the fuzzy Mentat defines a new fuzzy similarity.

Crisp Gratification Similarity
The basic behaviour of a similarity function is that the greater the closeness among the two compared objects is, the greater the value it must return.In the case of Mentat, agents with a collection of characteristics are compared with each others.This function should determine how similar two individuals are, taking decisions grounded on sociological theory.Thus, it is obvious that some characteristics are sociologically more relevant than others to determine such similarity: for example, age is more important than hair colour obviously not included in this model or civil state included .With the help of a domain expert, five main characteristics were chosen to determine the similarity: age, political ideology, religiosity, educational level, and economic status.This similarity will be used for the friendship emergence and for the spouse selection.
In the basic crisp Mentat, every function was defined as a crisp nonfuzzy function.Thus, similarity was not different and it was modelled and implemented through a not-normalised gratification algorithm.For each characteristic from the chosen ones , it was defined a range of "closeness" with three categories "close," "standard," and "far" distances .Depending on such "closeness" of the two characteristic values compared e.g., the ideology of A and the ideology of B , the similarity counter was gratified in the "close" case , left equal "standard" or penalised "far" .The sum of all the results of the five attributes comparisons was the output of the function.Thus, this amount of points, could be compared with other results from other agents, and therefore determine which agent was more similar in a crude but straightforward way.

Building a Fuzzy Similarity
Mentat's gratification technique is not very sophisticated and could be improved.The use of fuzzy logic would significantly increase its accuracy.However, the use of fuzzy operators or functions needs the fuzzification of the attributes where they are applied.Therefore, fuzzy sets over these variables are formally defined in a generalised manner .
Thus, the agent attributes, rather different from each other, were normalised in the real interval 0, 1 each one depending on its original range .For example, let µ wealthy : U → 0, 1 be the fuzzy set that gives an economic grade based on the economy variable of the individual.This fuzzy set can be defined by segments with different growth high class, middle class, working class, etc. or by a linear function.This way, an individual with a µ wealthy ind 0.7 would represent a person quite wealthy, with a good economic situation.Each fuzzy set would be defined by a similar process.
Afterwards, the fuzzy similarity can be defined using a T -indistinguishability, which generalises the classical equivalence relations.It can be obtained from the negation of a T * -distance, where T * is the dual t-conorm of the t-norm T .A complete mathematical explanation beneath this can be found in Valverde 39 , but roughly the distance between the attributes of the two agents compared is "how far they are," so its negation will point out "how similar they are."This way the aggregation of the similarities of each couple of fuzzy sets by default, normalised will return the total similarity rate among two individuals.The negation used is a fuzzy strong negation N 40 , the distance operator d was defined as the difference of the fuzzy values, and the aggregation chosen is an ordered weighted averaging operator OWA 41 .Thus, the fuzzy relation is defined as follows: An OWA is a family of multicriteria combination aggregation procedures.By specifying suitable order weights whose sum will result always 1 it is possible to change the form of aggregation: for example, the arithmetic average in the example OWA would need a value of 0.5 to both weights.The weights of the OWAs chosen in Mentat configuration will have, by default, standard average weights.
There are two reasons to justify why OWAs were used for the formalisation instead of standard average functions.First, the generalisation aspirations of this fuzzification process, so it could be applied in other ABMs, encourage the maximum level of abstraction.The possibility of choosing the most appropriate weights for each component could be useful to adapt to different problems e.g., allowing different weights for each main attribute in the similarity definition .Second, this weight selection is allowed inside Mentat configuration: even if the main testing has been used using a single T Lukasiewicz and standard weights, both can be tweaked to obtain different results or to focus on different phenomena.

Friendship Dynamics
This section addresses the sociological literature and empirical research about friendship dynamics.In particular, the important role played by social similarities in friendship choice is highlighted, especially when considering the "proximity principle," as explained.Then, this basic mechanism is formalised by proposing a logistic function, which allows to model over time the process by which strangers become acquaintances, and acquaintances are converted to friends and potentially to partners.

Understanding Friendship
Selecting a friend is among the most personal of human choices.However, friendship choice is also dependent on characteristics that are socially constructed.Consequently, it is not surprising that friendship groups tend toward social homogeneity.Members of the working class usually associate with other workers, and middle-class individuals generally choose friends who are middle class as well.Since individuals only have significant contact with others like themselves, most of the friends they make become similar in sociological, economical, and demographic terms.McPherson et al. remind us that classical Western thought already noticed this pattern in friendship dynamics: Aristotle pointed out in his Rhetoric and Nicomachean Ethics that people "love those who are like themselves" and Plato observed in his Phaedrus that "similarity begets friendship" 42, page 416 .
Empirical research has confirmed this early conjectures: adult friendships are highly homogeneous in social and demographic statuses, race and ethnicity, beliefs, and interests, and that observed homogeneity is higher than it would be expected by considering randomchoice models 43 .In the context of social networks analysis, the homophily principle 42 has been identified as the mechanism bringing about this pervasive pattern of friendship choice 1, 44, 45 .These studies have established that similarity in social characteristics breed friendship connections among individuals and accordingly, homophily implies that distance in terms of social characteristics translates into network distance .Individual preferences, however, must not be overemphasised.Individuals preferences can only affect the choices of associates within limited sets of available alternatives.Specifically, individuals tend to choose their friends from among those with whom they have regular contact in one or another of their focused activities e.g., individuals choose a workplace for the job rather than for the coworkers' characteristics, but they might make friends in that context later on .Therefore, the structure of opportunities must be understood before one can estimate the importance of preference for similarity as a cause of observed homophily 46 .
Once we consider these results, it becomes clear that social context structures friendship choice.Contextual theories of individual behaviour argue that i individual preferences and actions are influenced through social interaction and ii social interaction is structured by the social composition of the relevant environment 47 .The dynamic of "meeting" and "mating" by which strangers are converted to acquaintances, acquaintances to friends, and even maybe friends into partner follow the same rules.Meeting depends on opportunities alone i.e., to be in the same place at the same time ; instead, mating depends on both opportunities and attraction.How readily an acquaintance is converted to close friend depends on how attractive two people find each other and how easily they can get together.
The "proximity principle" indicates that the more similar two individuals are, the more likely they will meet and become friends 43 .Therefore, features like social status, attitudes, beliefs, and demographic characteristics-that is, degree of "mutual similarity"-channel individual preferences and they tend to show more bias toward homogeneous friendship choices.

Strangers → Acquaintances → Friends: A Fuzzy Logistic Function
Similarity, proximity, or friendship is vague or blurry categories, because they do not have clear edges.For this reason, a model of friendship dyads was developed, using the general framework presented above, but considering similarity and friendship as continuous variables.Thus, the fuzzy similarity will be used and friendship will be redefined as a fuzzy relationship.Besides, because friendship occurs through time, in Mentat it was modelled in dynamic terms, letting the friendship to evolve over time.Let R friend : U × U → 0, 1 be the fuzzy relation on the set of individuals who have a degree of "friendship."This fuzzy relation gives a degree of friendship in the interval 0, 1 for every couple on individuals.Let Ind be an individual in U.The crisp set Friends Ind is defined as the set of all the individuals x in U whose R friend Ind, x is greater than 0. Therefore, every individual will have a range from true close friends to just "known" people with the rest of individuals.Note that some restrictions to this definition could be introduced in order to suit context needs.
The friendship process is conceived as a search for compatible associates, in terms of the proximity principle, and where strangers are transformed to acquaintances and acquaintances to friends as a continuous process over time.It is proposed the hypothesis that a logistic function 48 can describe formally the "friendship relationship" or degree of friendship for every couple of individuals.By using a logistic function, we want to express the intuitive dynamic of friendship, in which two similar individuals become friends faster than those individuals that do not share similar values or sociodemographical features and friendship will hardly evolve between two totally dissimilar individuals .Therefore, a logistic model captures the core dynamic; that is, it reflects the likelihood that two individuals will become friends as a function of their individuals' traits.Although we highlight that this formalisation comes from an intuition with no empirical research supporting it , we are confident that the general dynamics of friendship makes plausible the use of a logistic function, which has been extensively used in social research for measuring individuals' attitudes such as logistic IRT models; see 49, 50 .The following equation is proposed: 5.1 Equation 5.1 expresses the hypothesis that friendship increases over time.In Mentat, friendship ties cannot be weakening nor broken.If two individuals are not similar enough, their tie will never grow strong, but once appeared it will always exist.This simplification was acceptable according to the domain expert advice.Thus, at each point of time, F t defines the minimum degree of friendship that is given as an initial condition 0 < F t < K ; K is the maximum degree of friendship that agents can reach K can be understood as the level of "close friends" , and finally g value defines the growth rate of friendship.However, this equation does not include the "proximity principle" described above.This principle can be included in 5.1 by modifying the growth rate g and stating it as follows: the more similar in social characteristics two individuals are, the higher the growth rate of their friendship is.Therefore, g needs to be made sensitive to the similarity value.Thus, the following equation can be expressed: where R similarity is a fuzzy-similarity measure between individual 1 and individual 2 defined in Section 4.2 see 4.1 , and J defines a multiplicative factor that increases the magnitude of R similarity within g.The objective of J is turning g more sensitive to R similarity values, and specially sensitive to high R similarity values.For this reason, J describes an exponential growth depending on R similarity values.Therefore, J itself is a function of R similarity that can be formalised as follows: J R similarity J 0 × e p×R similarity , 5.3 where J 0 is the initial value of J, p defines the constant of proportionality, and R similarity is the similarity value between the individuals.Some graphical examples and implementations of these formalizations are depicted in Figures 4 and 5. Thus, Figure 4 shows how the friendship will develop over time given different initial conditions, while Figure 5 depicts the exponential growth of J as a function of the model fuzzy-parameter R similarity .In Figure 4, it is assumed that K is equal to 1 and F 0 is equal to 0.01; g value is equal to R similarity × J s .On the other hand, in Figure 5, it is assumed that p is equal to 5.8 and J 0 is equal to 0.001.These constants were obtained by experimental procedures.

Friends → Partner
The social system also simulates matchmaking.Once a couple is formed e.g., via a marriage , a stable couple can be defined as a crisp relation: two persons are a couple or they are not.
It is proposed to learn this classical relation R couple : U × U → {0, 1} by using approximate reasoning and fuzzy inference techniques.Note that if a R couple relation is known, a "single" and "married" crisp set on U is also known, defined as married ind It does not exist a specific process for finding a partner in previous social simulation models.A general definition for it was built up with the collaboration of a sociological domain expert.An agent will find a partner always with a random possibility of failure not expressed in the mathematical definitions between the friends that have different gender, are adults, and do not have a partner yet.The chosen one will be the "most compatible" one of its friends, where compatibility is defined as the aggregation of how strong their friendship is and how similar they are this is an oversimplification with respect to real life, and it is future work to allow some randomness in this process .
This important information of how couples are established can be obtained by inferring a fuzzy relation R compatible : U × U → 0, 1 , which in turn can be expressed using a fuzzy aggregation operator 41 , and operations on the classical set "has no partner": U → {0, 1}, the fuzzy set "adult": U → 0, 1 , the classical relation "has different gender": U × U → {0, 1}, and one fuzzy rule of inference, where the premise is the conjunction of the classical sets.
An OWA is again applied to formally define the R compatible : U × U → 0, 1 fuzzy relation using the R similarity : U × U → 0, 1 and the R friend : U × U → 0, 1 fuzzy relation, as the following mapping: R compatible Ind, Ind2 : OWA R friend Ind, Ind2 , R similarity Ind, Ind2 w 1 * R friend Ind, Ind2 w 2 * R similarity Ind, Ind2 ∀Ind, Ind2 in U, where w 1 w 2 1.

5.5
After computing the R compatible fuzzy relation, a R "couple-candidate" : U × U → 0, 1 fuzzy relation can be computed by using the "single" set and the "Adult" fuzzy set on U as follows: R couple-candidate Ind, Ind2 : Adult Ind2 AND single Ind AND single Ind2 0 o t h e r w i s e .

5.6
Note that the AND conjunction is implemented by a t-norm.It can be done many times because of the associative property of t-norms.Thus, T x, y, z T T x, y , z .Then, the method to marry an individual Ind is to find Ind2 such that it maximises the fuzzy relation R "couple-candidate Ind, Ind2 .Then, it would be possible to compute R couple Ind, Ind2 : 1.

Family
As a result of the friendship dynamics exposed in the previous subsections, agents can find spouses to match with.Those couples may have children, following certain restrictions and demographic equations for an in-depth view of those, check 24 .Thus, it produces the emergence of families with parents, children, and brotherhood.The family is represented as a different group type.No third-level relationships are considered e.g., grandparents, uncles, and cousins in order to focus on the family nuclei.Those nuclei are localised and aggregated in space, as children tend to appear close to their parents.This process promotes the appearance of clusters in the social network, where the new-born agents will relate with the friends of their family, relating to the friends of the brothers or parents and even to their children.This link has not been fuzzified, as it was not found necessary.

Results and Discussion
In order to assess the relevance of fuzzy sets in the model, this section analyses the results of the execution of the different versions of Mentat.As shown in Table 1, four different implementations, each one with two configurations, have been analysed, focusing on three measures.The fuzzy modifications have been grouped in two main ones: "Fuzz-Sim," when the attributes are normalised and the similarity operator fuzzified, as stands Section 4.2; and "Fuzz-Fri," when the friendship turns to be fuzzy, evolving over time, and affecting the partner choice Section 5.2 .The four ABM represent all the possible combinations between these, represented in the Table 2 in the pair Fuzz-Sim, Fuzz-Fri .Thus, there is a crisp version of Mentat, Mentat Crisp with its crisp similarity explained in Section 4.2 , with no fuzzy properties; the Mentat FuzzSim , simply the same model but with the "Fuzz-Sim"; the Mentat FuzzFri with "Fuzz-Fri" but not "Fuzz-Sim"; last Mentat FuzzAll , with all the fuzzy modifications i.e., both Fuzz-Sim and Fuzz-Fri .
The two configurations deal with two possible ways of friendship emerging: one promoting random friends and therefore an agent can be linked to a nonsimilar neighbour and the other promoting similarity-based friends and therefore an agent will rarely be linked to a nonsimilar neighbour, as it will give priority to the most similar ones .This is not a trivial decision, because the friendship evolution function already deals with similarity, and if a neighbour is not similar at all, it will never be more than an acquaintance.It is not evident if the closer way to real world is giving double strength to similarity in the second option or letting randomness to decide who will be the friend and thus maybe ignoring similar people .It has to be mentioned that none of the two configurations is so deterministic and both are based on probabilities.
The parameters analyse the couples and how they are affected by the changes in the configuration and fuzzification.The R Similarity shows the proximity taking into account all the characteristics of each partner in a couple.The R Friendship focuses on the friendship link between them, which in a way according to the logistic function depends on their similarity too, but also in the time spent together.The R Compatibility is taken as an average of the other two.The values have been obtained after averaging the output of several executions of each version.Thus, in every execution, it is the mean of the property in every couple.These averaged values are shown in Table 2 in order to compare the performance of the different implementations.
As the first two models have a Boolean friendship, their compatibility is always the same as the similarity.In the first configuration, when the friendship is rarely involved in the neighbours linking, the similarity rates are noticeably similar in all the versions.However, in the second one it is clear that the ones with fuzzy similarity slightly increase their success.But the bigger changes can be observed in the friendship: Mentat FuzzAll beats the other versions with a greater R Similarity and R Friendship in both configurations.We compared the four different orders of fuzzification described above for both R Similarity and R Friendship of couples, by using the statistical test "one-way analysis of variance" for unrelated samples.By using this statistical test, we want to detect evidence of significant differences among the four model implementations.The first analysis revealed significantly higher degrees of similarity between the couples according to the degree of fuzzification of the model, with the Fisher's statistical significance test equal to 7.281 3; 8,814 , and a P -value P < .001.Similarly, the second analysis revealed significantly higher degrees of friendship between the couples, F 3; 8, 814 5, 247.735,P < .001.These results provide strong evidence against the null hypothesis, namely, that the difference in the means among the four orders of fuzzification are by chance, both for R Similarity and R Friendship .These results approach the theoretical qualitative assessments made by the sociological friendship theory considered 43, 47 and the domain expert.Intuitively, the couples of Mentat FuzzAll are more similar to each other following the proximity principle and take into account the degree of friendship in the process of choosing partner which implies historical evolution of the relationship .

Concluding Remarks
This paper has exposed Mentat's social dynamics in-depth, detailing the social relationship mechanisms and how the social network emerges.Besides, throughout the different sections, a fuzzification process was carried out, redefining several crisp model concepts as fuzzy concepts and relations.Fuzzy sets theory improved the behaviour of the ABM in those aspects with some degree of uncertain knowledge.
Thus, some concepts of social relationship dynamics were explained, including an evolution function that was applied for the changing of friendship over time.Fuzzy logic was introduced step by step.Therefore, fuzzy sets over each agent attribute were defined, together with a new fuzzy similarity operator that would influence friendship emergence and partner choice.The friendship relationship nature and importance in the model was significantly modified, fuzzifying it, making it evolve using a logistic function, and letting it influence in the partner choice as much as the similarity rate.The results of these changes were discussed and considered positive, as far as they improve the proximity to the qualitative assessments of the theory.
To sum up the fuzzy application, a sociological friendship theory has been exposed.It was searched where it can be applied, found the useful tools to do that, implemented the application, and extracted a collection of results that are used to validate the model against the theory.
Future research lines that could be followed could take into account other interesting friendship theories.There are deep studies in homophily in social networks 42 that could be implemented.An aspect that the Mentat model ignores but it is important enough to be considered is the stability of friendship 51 .Besides, the fuzzy Mentat could be extended to analyse the importance of weak links along one's life, a new possibility that the crisp Mentat did not allow 52 .

Figure 1 :
Figure 1: Flow diagram summarising the process of emergence of a friendship link.

Figure 2 :
Figure 2: Flow diagram summarising the process of partner finding matchmaking .

Figure 3 :
Figure 3: A graphical example of concept definitions in fuzzy terms.

Figure 4 :
Figure 4: The logistic function chosen for the evolution of friendship, for several one-to-one R similarity values.

Figure 5 :
Figure 5: Exponential growth of parameter J, in relation with R similarity .

Table 1 :
Four different implementations of Mentat.

Table 2 :
Comparison among the different ABM, in increasing order of fuzzification.: The crisp Mentat similarity has other range, but here they have been normalised in the interval 0, 1 in order to be compared.* : When the friendship is not fuzzified, all the couples are friends as this is a Boolean property .