E ects of the Interaction Between Ideological A inity and Psychological Reaction of Agents on the Opinion Dynamics in a Relative Agreement Model

Ideology is one of the defining elements of opinion dynamics. In this paper, we report the e ects of the nonlinear interaction of ideological a inity with the psychological reaction of agents in the frame of a multiparametric mathematical model of opinion dynamics. Computer simulations of artificial networked societies composedof agents of twopsychological typeswere used for studying opinion formation; the simulations showed a phenomenon of preferential self-organization into groups of ideological a inity at the first stages of opinionevolution. The separation into ideologically akinopiniongroups (ideological a inity)wasmorenotable in societies composedmostly of concord agents; a larger opinion polarizationwas associatedwith the increase of agents’ initial average opinion uncertainty. We also observed a sensibility of opinion dynamics to the initial conditions of opinion and uncertainty, indicating potential instabilities. A measure of convergence was introduced to facilitate the analysis of transitions between the opinion states of networked societies and to detect social instability events. We found that the average of opinion uncertainty distribution reaches a steady state with values lower than the initial average value, sometimes nearing zero, which points at socially apathetic agents. Our analyses showed that the model can be utilized for further investigation on opinion dynamics and can be extended to other social phenomena.


Introduction
. As an inevitable and influential process within daily social, economic, and political life, social dynamics is tightly connected with opinion formation. The study of opinion dynamics includes a wide range of social phenomena, such as the evolution of voting preferences, variations in market demand for products or competitor trademarks, emergence and popularity of topics, dissemination and preservation of minorities' opinions, decisionmaking, political party development, rumour spreading, and emergence and influence of extremists, among others (Xia et al. ). Even though formal defining of the opinion is not an easy task (it can be quantified as a degree of satisfaction, desire, or preference), opinion dynamics seen as an evolutionary problem can be considered within the frame of a dynamical system. There has been an increasing interest in analyzing and mathematical modelling of di erent aspects of opinion formation in networked societies. Since one of the substantial elements defining opinion dynamics is ideology, its inclusion in mathematical models of opinion formation should clarify the role of ideology in di erent social scenarios. .
Agent-based modeling of networks is an e icient and rapidly growing, quasi-deterministic approach to social dynamics for studying collective e ects resulting from the interaction of a number of "simple" agents in a social network (Schweitzer ). Members of social groups are considered to be adaptive rather than rational agents, and no individual strategy is involved except a common rule for opinion updating. Bounded Confidence, Relative Agreement (BC/RA) models of opinion dynamics are e ective agent-based modeling methods

.
The substantial part of an ideology is an individual's a inity with their social group vision expressed in terms of their opinion; herea er, we will refer to this as opinion a inity. Sociology (Vela-McConnell ) sees social a inity as an adaptation, sympathy, trend, or similarity of characters, likes, and preferences among the agents of a society; for example, a person may have an inclination towards certain political party, which represents his individual ideas. Previous works have introduced the concept of a inity or similar notions into the study of opinion dynamics models. Salzarulo ( ) introduced the measure of self-identification of a person with a group, based on the self-categorization theory (Turner et al. ; Oakes et al. , ). People's typical behavior is defined by their self-categorization with respect to the situational context because people identify themselves and behave in specific ways in di erent situations. Ramirez-Cano & Pitt ( ) define mentality as a set of beliefs, attitudes, assumptions, and trends that predetermine how an agent evaluates an accepted opinion. In this way, the closeness between an agent and a group of agents sharing the same mentality is defined as a function of a inity. This function evaluates the linear similarity between an opinion and a constant µ, which is a reference value for the agent's mentality to a given problem. Finally, Yang & Xi ( ) crystalized agent personality in a simplified De uant model; such personality is defined as the attitude agents display when their opinions are incompatible with others' opinions during the course of a discussion; personality is thus represented by the convergence rate parameter µ in opinion updating equations.
. In this paper, following up on previous research by Kurmyshev et al. ( ), we propose an extension of the PA/C opinion dynamics model introducing ideological a inity between agents in artificial societies. The aim is to analyze opinion dynamics in specific scenarios in societies including concord (C-) and partial antagonism (PA-) agents, taking into account their ideological preferences by means agent opinion a inity. The following section describes the PA/C model with opinion a inity, Section presents a computer experiment design for the application of this model, Section shows the simulations results, and finally, Section presents our conclusions and discussion.

PA/C Model with Opinion A inity
. In order to be validated, mathematical opinion dynamics models must be based on the key elements of Social Influence, Social Judgment, and Social Identity theories that are psycho-sociological approaches dealing with the manner in which individuals change thoughts, feelings, opinions, and behaviours of others. Social influence theory is focused on the interaction between psychological processes and social factors involved in-group behaviour (Asch ; Sherif ). Bounded confidence (BC) models (Wood ; De uant et al. ; Hegselmann & Krause ), based on the concept of Social Influence, assume that two interacting agents change their opinion (i.e., come closer to each other) if and only if their initial opinions are close enough. Otherwise, they ignore each other. Another theory used in these models is the Social Judgment theory (Sherif & Hovland ), which argues that the success of a message depends on the relationship between the message and the receiver's beliefs. Relative agreement models use principles from the Social Influence and Social Judgment theories. .
An ideology influences and interacts with the agent's psychological profile during the process of opinion formation and changes their attitudes (Sherif & Hovland ). That is definitely observed when interacting agents support di erent ideologies; agents act their psychological profiles out during their decision-making processes and, on the other hand, they must adhere to an accepted ideology -this can cause an agent's socio-psychological conflict, which can be interpreted as cognitive dissonance. This concept, developed by León Festinger ( ), refers to the stress or disharmony of a system of ideas, beliefs, and emotions perceived by an agent experimenting simultaneous conflicting thoughts, or whose behaviour is in conflict with their beliefs. The question is, which one of the two trends is stronger? When interacting agents are in the same ideological group, they do not have this conflict. So, agents can act naturally, representing their psychological profiles when interacting with ideological friends, or in the opposite way, opposing their own psychological profiles when interacting with ideological opponents.

.
Mathematical models of opinion dynamics in networked societies are characterized by four basic elements (Fan et al. , ; Kurmyshev et al. ). Opinion space -a discrete or continuous set of values that represent the opinions of agents. Updating rule -basically, the model equations describing opinion change as a result of agent interaction. Updating dynamics -establish the manner and conditions under which agents update their opinions. Social network (networked society) -represents the communication channels between agents of a society by means of a graph where nodes represent agents and communication channels between agents are represented by links. Usually, opinion dynamics models are distinguished by their specific updating rules and updating dynamics, while other elements are shared. .
In order to define the opinion model including ideological (opinion) a inity between agents, we used the concepts, definitions and, to some extent, the methodology of the PA/C model (Kurmyshev et al. ). Note that relative agreement (RA) models, along with the opinion variable x i , use a new variable u i , to account for uncertainty, which can be interpreted as the tolerance of an agent "i" to the opinions of others or the level of confidence that an agent has in their own opinion x i . In RA models with one pair of agent interactions, the degree of social influence depends on the overlap of a (i, j)-pair of agents that interact. The more confident an agent is in his opinion (small value of u i ), the more influential and less prone to influence the agent will be. As in the PA/C model, we considered agents of two psychological types: partial antagonism (PA) and concord (C). The psychological composition of society was characterized by the parameter p in [0, 1], which partitions society in two disjoint subsets, S C and S P A of sizes pN and (1 − p)N respectively, where the total number of agents is N .

.
Our updating dynamics is stochastic, and based on unidirectional interaction in pairs of agents. In each updating stage, N edges of a network are randomly chosen. Then, in the pair (i, j) of agents associated with each of these edges, one agent is considered passive (influenced) and the other active (influential), also randomly. If h ij ≥ 0, the passive agent of the pair, say j, updates their opinion x j and uncertainty u j according to the psychological profile. Note that, in the PA/C model (Kurmyshev et al. ), the interaction of passive C-agents is always attractive in the opinion space, while the interaction of passive PA-agents can be repulsive-attractive according with relative agreement, as is explained below. In order to include the influence of ideology on opinion formation, we modified the PA/C model updating rules by introducing the opinion a inity function A ij (t), defined below. So, if the passive agent j is C-agent, then: If the passive agent j is PA-agent, then: In the above equations, the multipliers µ s in ( , . ) are convergence parameters (s = , , , ). In this work, being limited by the one-topic opinion model, we used a very simple mathematical function to express ideological (opinion) a inity: the signum function. So, herea er: Note that Kurmyshev et al. ( ) PA/C model is a special case of our proposed model, where the ideological a inity function is always equal to A ij (t) = 1. As previously stated, our model uses ideas developed by the Social Influence (Asch ; Sherif ), Social Judgment (Sherif & Hovland ), and Social Identity (Tajfel ) theories. Particularly, social influence is expressed by the distance between opinion segments of pairs of agents and their overlap, while the basic concepts of Social Judgment and Social Identity theories (beliefs of agents and group belonging) are modelled by the psychological profile of PA-or C-agents and opinion a inity A ij . .
In order to better understand the model interaction mechanism between ideological a inity and agent psychological type, we replicate the basic features of the original PA/C model. In that model, the opinions of C-agents tend to come closer to the opinions of active agents, so that the interaction is always attractive. Nevertheless, the relative agreement of PA-agent in the interval 0.125 ≤ (h ij /2u i )(h ij /u i − 1) ≤ 1, can take negative, positive, or zero values. Thus, a passive PA-agent "j" can refuse (when (h ij /u i − 1) < 0) or accept (when h ij /u i − 1 > 0) the opinion of an active agent "i"; if h ij /u i − 1 = 0, the PA-agent is indi erent. The PA/C model is doubly heterogeneous: • Parameter p in [ , ] regulates the psychological composition of the society.
• Parameter 0 ≤ l ≤ 1 manipulates the initial political preference of agents.
. The initial opinions of lN "le -wing" oriented agents are drawn from the interval [-, ], while the opinions of (1 − l)N "right-wing" oriented agents are drawn from the interval [ , ]. As we can see, the proposed PA/C model with opinion a inity, as a natural extension of the original PA/C model, belongs to the class of RA opinion dynamics models. It also has a multiplicative heterogeneity caused by a number of ideologies induced into the society. The ideological a inity of agents, defined in this study as a signum function (Equation ), expresses two important issues. First, society can be seen as governed by the two fuzzy, equally powerful ideologies, say rightist and le ist. Second, it indicates the conflict of consciousness between an agent's ideology and psychological behavior. There is only one ideology in society when A ij (t) = 1, so opinion formation takes place in accordance to the psychological reaction of agents, as in the PA/C model. However, in a society with various ideologies, particularly when A ij (t) is the signum function, the reaction of an agent is influenced by their ideology and psychological profile: this ideological a inity inverts the psychological reaction of an agent to the opposed point of view when the agent interacts with an ideological opponent.
. Opinion a inity, seen through the e ects of demographic composition on team cohesion and performance, was studied with a model by Flache & Mäs ( ). Even though the PA/C with a inity and Flache-Mäs models are both based on the same social mechanisms, they cannot be considered an extension of one another due to differences in the way each model considers agent a inity and opinion updating (see Table ); in particular, they operate in di erent feature spaces. Social influence, rejection, homophily, and heterophobia are the four social mechanisms used in both models, but they are treated in di erent ways. In the Flache-Mäs model, the mathematical representation of social mechanisms is based on fixed and flexible attributes and their combinations. Specific (dis)-similarities between the PA/C and Flache-Mäs models are as follows. While Flache-Mäs considers a continuous dimension K opinion space (= in the experiment), where agent's opinions (flexible attributes) are related to team-work, we consider a 1 − D continuous opinion space which can be interpreted as an aggregate of K's opinions. An agent's flexible attributes are entangled with each other through social influence w ij . The influence w ij agent j has over agent i changes depending on the di erences between demographic attributes (fixed attributes) and opinions. With Flache-Mäs, the group similarity of agents i and j is measured in terms of both demographic and flexible attributes; in our model, we consider agent similarity in terms of ideological a inity and opinions. In the PA/C model, agent ideological a inity, A ij can be regarded as a combination of the fixed, correlated attributes of the Flache-Mäs model. In the Flache-Mäs model, social influence w ij is a qualitative analog of relative agreement in the PA/C model, a combination of opinion di erence and opinion uncertainty; the latter is a psychological more than social entity and there is no equivalent concept in the Flache-Mäs model. We consider PA-and C-agents from the two psychological types. In these terms, homophily or heterophobia can be associated with a combination of (PA/C + Ideological a inity + Uncertainty). Social influence is expressed in the PA/C model by a combination of (Opinion di erence + Uncertainty + Ideological a inity + PA/C). Rejection in the PA/C model is determined by a combination of (PA/C + Ideological a inity). As for opinion updating, we use the pair (i, j) interaction dynamics, while Flache-Mäs appeals to the modified Hegselmann-Krause updating rules when the opinion of i is changed in function of the opinion di erences of i and all members of the team. Even though in some scenarios these dynamics show similar overall behavior (consensus, polarization), they can di er in particularities (convergence rate, extremists, fixed points). It should be noted that the work team of the Flache-Mäs model is necessarily a small social group of agents, whereas the PA/C model is focused on large societies. .

An extension of Huet et al. ( ) bounded confidence model was proposed by Alizadeh et al. (
), in adimensional opinion space, in order to resolve the problem of cognitive dissonance in social systems including in-group favouritism and social identity. In both models, Cooperative Bounded Confidence (CBC) and PA/C with a inity, opinion dynamics are based on the theories of social influence, social identity, and cognitive dissonance. Both models use similar social notions, such as opinion, uncertainty, and opinion rejection: their di erence lies in their specific variable updating mechanisms and model parameter interpretations. In the CBC model, opinion updating is governed by the distance between the opinions of interacting agents only, whereas the relative agreement PA/C model updates opinions in accord with the distances between agents' opinions and their uncertainty magnitude (see Table ). In the CBC model, the updating dynamics is bidirectional and invariant to the commutation of agents' indices (i, j), which causes double rejection or attraction of opinions in a pair of interacting agents. Both the CBC and PA/C models describe attraction, rejection, and no opinion change. In our PA/C model with ideological a inity, these changes are determined by relative agreement, which in turn depends on the psychological type of an agent (PA-or C-agent) and their a inity with an ideological group, A ij . In order to represent opinion rejection, the CBC model uses the opinion space of at least two dimensions. A "secondary" opinion is used to determine if the "main" opinion is rejected or attracted. In addition, a new parameter Îť, named intolerance threshold, is introduced to describe the cognitive dissonance (psychological discomfort) of agents. In the PA/C model with a inity, the state of an agents' cognitive dissonance and its evolution are the result of an interaction between the ideological a inity and psychological type of interacting agents. It should be noted that cognitive dissonance is a psychological characteristic of an agent, and it is di icult to expect this feature to be described by means of the unique parameter δ for all agents and scenarios in nonhomogeneous societies. .
As an attempt to better describe the proposed model's place among RA models, this paper o ers a comparison of components from the most widespread of these models. Xia et al. ( ) provide an exhaustive multidisciplinary review including the best known opinion dynamics models, both in discrete and continuous opinion spaces. Table summarizes  , the PA/C model (Kurmyshev et al. ), the CBC model (Alizadeh et al. ) and the PA/C model with opinion a inity; each of these models can be applied to social networks of any topology. .
The cited models and their variants exhibit, in general, three types of attractors (Mathias et al. ): central Threshold, d

Convergence, µ
Bi-directional pair interaction Homogeneous linear system The similar way for the agent i Bi-directional pair interaction Homogeneous nonlinear system The similar way for the agent i Nearest neighbour interaction Flexible attributes a f lex ik The interpersonal relations w ij The fault-line strength f

Number of flexible attributes K
Number of fixed attributes D

Neighbour interaction
With (Note: the opinion dynamics is studied only)

Psychological profile of agents
Medium initial uncertainty or tolerance, U

Nonlinear relative agreements
Uni-directional pair interaction Homogeneous nonlinear system C-agent: PA-agent: CBC model (Alizadeh et al. ) Opinions Uncertainty in-group U int and outgroup U out ; with U out ≤ U int

Number of groups m
The intolerance threshold δ Bi-directional pair interaction Uni-directional pair interaction

Homogeneous linear system
Homogeneous nonlinear system C-agent: PA-agent: cluster (the group of agents with a centrist opinion), double extreme (opinion polarization in two groups of agents with opposed opinions tending to extremism), and single extreme clusters (a unique group of agents sharing an extreme opinion).

Computer Experiment Design
. Everyday life itself shows that opinion dynamics in real-world societies are not always unique, and their results are not always predictable. Social group members can come to the same opinion, a consensus, in di erent ways and by means of di erent dynamics or, on the contrary, social agents can come to di erent conclusions via similar -if not identical -dynamics; this is due to the instabilities of some social processes. Those features have to be taken into consideration in the modelling and simulation of opinion dynamics. Although the updating rules of opinion and uncertainty are deterministic (see Equations and ), the proposed model is characterized by important stochastic elements: updating dynamics and initial distributions of both opinion and uncertainty, psychological distribution of agents on the social network. This combination makes it di icult, if possible, to undertake an analytical study of the model. So, a computer agent-based simulation of the model was used.
Due to the stochasticity of the proposed model, we were faced by the di icult decision of studying particular scenarios or the averaged results of many individual experiments. Pilot simulations showed that averaging the results of many experiments (see also Kurmyshev et al. ) made it possible to capture quite general opinion evolution tendencies, although very interesting and important characteristics of each particular scenario remained hidden. On the other hand, the study of one particular scenario shows rather general trends of opinion evolution in addition to salient particularities. For that reason, in this work we decided to explore systematically individual scenarios in a wide range of parameters o ered by the model.

.
In order to make the description of the experiments more understandable, we will clarify a few notions. Society is for us a network (graph), with specific psychological types (C or PA) assigned to each agent. It should be noted that for a given value of the p parameter, two societies represented by the same graph are considered to be di erent if they have di erent psychological type distributions over the nodes. A particular scenario of opinion formation is defined by the following elements: the society itself, the initial opinion distribution, and the particular realization of updating dynamics, which is stochastic in our model. The evolution of opinion and uncertainty can be simulated on a social network with any topology. In this study we used small-world networks. The simulation of a particular scenario begins with setting initial conditions: • A network of N = 1000 nodes with a small-world topology is fixed as per the Watts-Strogatz model with an edge redirecting probability of . , being < d >= 40 the average degree of each node (Boccara ).
• A uniform distribution of C-and PA-agents in the network is controlled by the value of parameter p.
• The uniform opinion distribution in the interval [-, ] is used at the initial time t = 0. We use the same array of data for all p and U values.
• The uniform probability distribution in the interval [U − . ,U + . ] is employed to assign initial uncertainty to agents. The average initial uncertainty of agents U is varied in the interval 0.2 ≤ U ≤ 0.7.
. A er the initial conditions have been fixed, the experiment is conducted as per the following algorithm: • N = 1000 edges are chosen randomly.
• In each edge (i, j), the passive agent is chosen randomly.
• The overlap h ij of opinion segments is calculated.
• If h ij ≥ 0, the opinion and uncertainty of the passive agent are updated according to their psychological type, Equations for the C-agent or Equations for the PA-agent, with µ s = 0.5 for each s.
• In regard to h ij < 0, neither opinion nor uncertainty of the passive agent are modified. .
It should be noted that opinions are maintained within the opinion space [-, ] as follows: if it happens that x j (t) > 1 or x j (t) < −1, then we assign x j (t) equal to or -, respectively. Similarly, uncertainty u j (t) is maintained in the interval [ . , ]. It is important to note that agents with u j (t) = 0 values are not expressive since they are not willing to change their opinion neither their tolerance despite being related in the network, because they have zero opinion segment overlap with other agents. These agents can be considered as apathetic or socially closed because they do not admit interaction with other agents. In order to maintain at least a nominal interaction, a small margin ( . ) was le in uncertainty for keeping opinion exchange. .
In order to monitor the evolution of opinion distribution (to a stochastically steady state, if it was the case), a convergence measure was defined as follows. Opinion space is divided into 2m + 1 subintervals. At a time t, the opinion distribution function is given by the set of N k (t) numbers of agents with opinions in each subinterval (k = 1, . . . , 2m + 1) so that N is the total number of agents in the network. The convergence measure is of the gradient type, is equal to the number of agents who changed their opinion from one subinterval to another in a unit of time. Since the opinion dynamics corresponds to a stochastic system, it is expected for the convergence measure D(t) to be a time series with fluctuations, rather than a smooth function. .
To visualize and analyze the opinion formation process, we opted for presenting the results by way of opinion and uncertainty temporal evolution plots. However, sometimes these plots are confusing as to how they represent the number of agents in the opinion groups. To avoid this confusion we used opinion distribution histograms as a complementary representation. To calculate opinion histograms, we divided the opinion space [-, ] into subintervals, in order to have statistically significant opinion di erences between the opinions of agents in di erent subintervals. Regarding histograms for uncertainty distributions, the same number of subintervals was used in the interval [ . ,u * ], where u * = max{u i (t) : i = 1 . . . N ; t ≥ 0}.

Simulation Results
. Using the PA/C model as a framework and incorporating ideological opinion a inity, fi een scenarios were simulated and analyzed. The following model parameters were varied: psychological composition of society p = , . , . , . , and ; initial average uncertainty U = . , . , and . . It should be mentioned that the same society (a network with a given psychological type distribution) and the same initial opinion distribution were used for each p-value, so that particular scenarios di ered from each other in their value of U and in stochastic updating dynamics. Herea er, simulation results are presented in groups for each psychological composition p, varying the values of U .

Society of C-agents
.  140 (Figures a, c). Uncertainty converges to values close to . (Figure b), which explains the stabilization of the convergence measure for the values of t > 140 (Figure c) and the attainment of a statistically steady state opinion by the society. In addition, the separation of the society into two opinion subgroups (x in (-, ) and x in ( , )) divided by opinion a inity is noteworthy, and it clearly shows ideological preferences. .
At the initial average uncertainty U = 0.5, we observed the formation of only two opinion groups with an equal number of agents, centred at x = ±0.6, in an even shorter time t > 40 (Figures a, d). In contrast to the previous case, uncertainty converged to a value of u = 0.4, approximately (Figure b). Additional experiments showed that increasing the initial average uncertainty U renders opinion fragmentation polarized (compare Figure d with d), evincing the increased separation between ideologically opposed groups. For example, when U = 0.7, we found that the opinion groups were centred in x = ±0.75, and uncertainty converged to a value of u = 0.6. Similar dynamics to those described above were obtained in societies with 0.95 ≤ p ≤ 1.    .
When U = 0.5, three representative opinion groups were formed in the society: a relatively small group of centrists and two large extremist groups (Figures a, d). The stabilization of the groups ended at t ≈ 300 (Figure c), while uncertainty converged to values close to . . These results di er from those shown in Figures a and a, since the decreasing of concord agents' fraction in a society with U = 0.5 stimulated the emergence of a centrist group and a dramatic polarization of opinions in the rest of the society. Moreover, uncertainty converges to di erent values, u = 0.4 for p = 1 and u = 0.08 for p = 0.7 (Figures b and b).

.
When U = 0.7 in societies with p = 0.7, we observed notable transient processes in opinion dynamics and uncertainty over a time lapse t < 250, approximately; the distributions became statistically stable a er this time (Figures a, b, c). Regarding opinion, the initial uniform distribution evolved basically in two groups of agents with mass centres at x = −0.9 and x = 0.6, respectively, and a relatively small group of centrists (Figures  a, c). It is remarkable how the initially uniform distribution of uncertainty transformed into a distribution with two well-defined peaks, of almost equal magnitude, at u = 0.1 and u = 0.33 (Figures b, d).
. In societies with . ≤ p ≤ . , variations of parameter U showed simulation results qualitatively similar to those reported for p = 0.7, and so they are not presented here.

Mixed society with % of C-agents .
The graphs in Figure show simulation results in a society with equal number of C-and PA-agents (p = 0.5) for U = 0.2. This society is seen finally to be fragmented in various opinion groups (Figures a, d), and the convergence of uncertainty to values close to .    .
The increase of initial average tolerance to U = 0.7 in a society with p = 0.5 shows decreased opinion polarization along with a significant growth of the centrist group (compare Figures c and c). The centrist group dynamics is peculiar: in a time interval of 100 < t < 300, an important group of centrist agents is formed, accompanied by a close le -wing group; subsequently, a significant number of agents leave the centrist group to join the le -wing group (see Figures c, time interval 400 < t < 470). This behavior can be interpreted as an indication of ideological preferences that lead to the splitting of a centrist group fraction (Figure c). The uncertainty is observed to converge to values below the initial average U with a clustering trend near u = 0.1 (Figures b, d).

Mixed society with % of C-agents .
In societies with p = . , we carried out simulations with initial average uncertainty values U = . , . , and . . For the low initial tolerance U = . , evolution of opinion, uncertainty, and convergence measure were similar to those in the case of p = . and U = . (see Figure ), showing the fragmentation of opinion and uncertainty convergence to u = . .

.
Increasing the initial average uncertainty to the value of U = . , uncertainty tends to two values, u = . and u = . approximately (Figures b, d).    group actually breaks into two well-defined subgroups of opinion close to x = (Figure a), since it consists of a group of agents with low uncertainty u = . and di erent ideological preferences. Since the convergence measure shows a similar behaviour to the case presented in Figure c, the graph was omitted. .
For simulations with high initial uncertainty, U = . , the partition of society into two opinion groups shows the influence of ideological preferences in the time lapse from to about units (Figure a). Later, in a time interval close to t = , such opinion groups show an important approach each other. However, it does not result in a complete confluence, since the centrist group actually consists of two well-defined subgroups with opinions very close to x = (Figures a, d), again due to their low-uncertainty agents u = .
(time t > ) and di erent ideological preferences. In addition, in early evolution stages, the distribution of uncertainty converges to a value near u = . , is maintained during the time lapse from to units, and then it abruptly falls to a rather small value of u = .
( Figure b) in a relatively short interval < t < . Accordingly, the convergence measure graph shows an intense change of opinion in two groups of agents in the lapse from to units of time. A er that, a peak in the vicinity of t ≈ on the convergence measure graph marks the just mentioned approaching of opinion between the two groups (see Figures a, c, d). .
Additional simulations with societies with . ≤ p ≤ . and U = . , . , . showed qualitatively similar simulation results to those described in paragraphs . to . .

Society of PA-agents
. Figure shows the results obtained when U = . for the society composed only by PA-agents (p = ). It is observed that the society becomes fragmented in opinion groups (Figures a, d) and agent uncertainty converges to values near u = . (Figure b). The convergence measure shows that opinion distribution reaches a stochastically steady state (Figure c).
. At the initial average uncertainty U = . , the society manages to form three well-defined groups at a time interval of < t < , a centrist group, and two extremist groups (Figures a, d). Yet, in the opinion evolution plot it can be observed the centrist group divided into two sub-groups of di erent ideological preferences, but sharing very close opinions. Besides, interaction among these groups is observed at time intervals centred in t ≈ , , , and which is expressed by the convergence measure graph (Figures a, c). Uncertainty    , which makes the centrist group dissipate. Finally, four opinion groups are formed in the society: a dominant group centred on opinion x ≈ -. , a small group with an almost centrist opinion x ≈ . , and two small groups of extremists (Figure d). The interactions between groups of di erent ideological preferences (t ≈ and ), along with the internal processes in groups (t ≈ and ), are reflected in the convergence measure graph (Figures c and d). We found that the final uncertainty distribution consists of a group of n 1 ≈ agents with uncertainty near u ≈ . and another of n 2 ≈ agents with uncertainty near u ≈ . (Figure b). Significant di erences between the results of those two experiments, shown in Figures and , show the sensitivity of the society with p = and U = . to initial conditions; in other words, the instability of the dynamical system is observed.

.
When p = and U = . , we observed even higher social system sensitivity to small changes in initial uncertainty distribution and updating dynamics. Figures and show results of two almost identical experiments that di er only in the seeding of data for the initial uncertainty distribution, as well as in the updating dynamics, since the latter is stochastic and therefore cannot be replicated.
. Figure show the formation of two well-defined opinion groups of ideological opponents in a very short time interval < t < (Figures a, d) with high uncertainty value u = . (Figure b). The convergence measure marks an opinion displacement of the "rightist" group at around t ≈ , further away from the opposing group (Figures c, d).

The graphs in
.

Conclusions and Discussion
. The importance of ideology in the realm of opinion formation motivated us to include it as an element in the PA/C model, and to study its influence via agents' opinion a inity. In our study, the simulation the opinion dynamics in artificial societies composed of C-and PA-agents (two psychological types of agents) with opinion a inity, revealed a variety of behaviours distinctive of human societies, such as fragmentation and polarization of opinion, consensus within the ideological groups and, in addition, the emergence of groups with di erent ideological preferences up to their becoming extremist groups. Each social scenario, described by the combination of the model parameters (p, U and initial distributions of opinion and uncertainty), exhibits quite particular opinion and uncertainty dynamics, showing the richness of behavioural characteristic of human societies. .
The temporal evolutions of opinion and uncertainty were studied in a relatively long time interval ( units of time), which allowed us to accurately determine characteristic times when opinion converged into a stochastically steady state, if that occurred. We noted that, in general, convergence into a steady state occurs in much shorter times, and therefore computer simulations may be performed for shorter time lapses, let us say . However, the anticipated completion of the simulation might match a quasi-stationary state, causing the loss of significant transient events in the dynamics of the system (see Figures a, b). In addition, real-life time frames of election campaigns are imposed in an administrative-legal manner, and the end of a campaign may fall in times when the opinion state of society is stationary (in this case, voting results are expected to be predictable) or in time intervals when substantial transient processes are taking place (voting results are little predictable). So, since the time of convergence depends on a particular scenario, we recommend that computer simulations be designed using relatively long time lapses to prevent the loss of important particularities of the system's dynamics.

.
The dynamical system under study has important stochastic elements: the psychological distribution of the agents in the social network, the initial distributions and the updating dynamics for opinion and uncertainty. To facilitate the analysis of transitions between the states of the system in the opinion space, we have introduced a measure of opinion convergence. The temporal evolution of the convergence measure allowed us to observe and quantify the transition of the social system to a stochastically steady state. Through the measure of convergence, events such as social agitation (intensive change of opinion) could also be modeled. Real-life proves that social agitation can lead a society's opinion and consciousness towards new states, or societies may end up in the same state as well. A change of state or the return to the state before agitation is predicted by comparing the opinion states at the times when agitation starts and ends. The degree of social agitation can be evaluated by calculating the area below the agitation crest in the convergence measure curve. .
In model simulations, we observed that events such as social agitation occur in societies with a dominant fraction of PA-agents or, in some cases, when the initial average uncertainty U is high. When initial average uncertainty U is high, the opinion segments are relatively large, which increases the frequency of interactions between agents. As a consequence, due to the conflict between the ideology and the psychological behavior of the agents, the interaction between agents of ideologically opposite groups close to the centrist opinion x = lasts a long time and sometimes becomes intensified, in comparison with societies without ideology. This interaction produces so-called 'activity revivals' in opinion dynamics (see convergence measure plots). In each scenario, these events occur in quite a particular way, at di erent magnitudes and emergence times. These events are indicators of the instability of the dynamical system, evinced by a noteworthy increase in social activity as represented by the convergence measure graphs. Another instability manifestation, although in the parameter space, is the high sensitivity of the social system to initial conditions, in particular, the initial distribution of uncertainty, accompanied by the stochastic updating dynamics clearly observed in PA-agent societies, p = and . ≤ U ≤ . , Figures and . On the other hand, in societies with a dominant presence of C-agents, the separation of agents into two groups of ideologically opposite opinion occurs quickly and definitely (see Figure  ).
. The competition of two ideologies, defined in this study as the a inity of opinions within "le ist-rightist" groups, is usually manifested through the partition of societies into two sub-societies in the opinion space, with or without subsequent interaction between them. In this context, in societies with a low initial average tolerance U = . , we found that increasing the percentage of C-agents in the interval ≤ p < . has little e ect on dynamics and the final distributions of opinion and uncertainty: opinion remains fragmented and uncertainty converges to a value near u = . . When the initial average tolerance is low, the rate of interaction between agents decreases, and so opinion dynamics stabilizes more rapidly and ideology lacks enough time to produce an e ect. When C-agents predominate in a society with . ≤ p ≤ , a inity separates the society into two opinion groups of di erent ideologies, each group having a dominant subgroup (see Figures and ). With U = . and ≤ p ≤ , uncertainty converges to low values near u = . (see the sequence of Figures b, b, b, and b). .
It should be noted that, in societies with initial average tolerance-uncertainty U = . and psychological composition in a range ≤ p ≤ . , the centrist group breaks into two opinion subgroups as a result of conflicting ideologies, even though the opinion of such groups may be very close in some cases. In real life, the emergence of a centrist group of agents slightly separated in two ideologically opposite subgroups can favour to coalitions, for example, between two political parties. On the other hand, in a group consisting of centrist or indecisive agents, ideology can be a key factor when voting for a party, x > or x < (see the sequence of Figures , , , and ).
. In mixed societies with high initial average uncertainty U = . , two opinion groups influenced by ideology are initially formed, which then merge into a quasi-centrist opinion group; the result of confluence is observed in the final state of opinion distribution. As the value of p increases, the formation of opinion groups is manifested at an earlier time. Also, the increase in the percentage of C-agents causes the polarization of opinion groups and the splitting of uncertainty distribution into two well-defined peaks. That is, in societies with a high initial tolerance value, the e ect of ideology is more visible.
. Although a inity tends to form groups of ideological opponents in the early stages of opinion evolution, we see that the ideological di erences diminish at a later time, leaving only one predominant opinion group in most scenarios (Figures to ). It can be said that in some societies the e ect of ideologies does not last forever.
. Since its introduction in relative agreement models, agent opinion uncertainty has been regarded as a halfhidden variable of little interest. However, social system dynamics are strongly influenced by the interaction of the two groups of variables, opinion, and uncertainty. In this work, we studied the dynamics of uncertainty along with the opinion dynamics, which allowed us to make relevant observations on their mutual influence. The importance of understanding the interaction between the two groups of variables comes from the conceptual di erence between them; opinion is a social characteristic, whereas uncertainty, interpreted as tolerance, is more psychological than social. Having observed the dynamics of the two groups of variables, we conclude that the influence of opinion on uncertainty is manifested as follows: the average of uncertainty (tolerance) distribution reaches a steady state value lower than the initial average value, sometimes reaching a value near zero. Moreover, in some occasions, the formation of two or three groups of agents with di erent uncertainties is observed. Agents showing an uncertainty close to zero can be considered socially apathetic, since they do not interact with other agents, which can be appreciated in opinion and uncertainty evolution graphs. .
It should be noted that the Alizadeh's ( ) CBC model uses an a priori partitioning of society in social groups, without specifying any characteristic property. Instead, ideological a inity in the PA/C model characterizes the agents' belonging to a social group; this partitioning can be easily extended to any number of ideological groups. In certain scenarios, we observe inter-group consensus in ideological groups as well as in the centrist group, the latter being split into two groups of di erent ideologies by a small distance between opinions. In addition, fragmentation, polarization, and emergence of extremists are observed in the CBC and PA/C models.

.
Ideologies are "sets of ideas" applied to real or idealized societies. In this respect, the proposed one-topic opinion model (say, political or economic one) is rather limited; nevertheless, it may provide useful insights for further research with more complicated and complex models. The analysis of our results shows that the model can be used for further investigation on opinion dynamics, and that it may also be employed as a tool to explore conflicts between ideologies and the psychological behaviour of agents in social, economic, and political phenomena using other functions for ideological a inity.