An Agent-Based Model of Discourse Pattern Formation in Small Groups of Competing and Cooperating Members

Discourse patterns in a small group are assumed to form largely through the group’s internal social dynamics when group members compete for floor in discourse. Here we approach such discourse pattern formation through the agent-basedmodel (ABM). In the ABM introduced here the agents’ interactions and participation in discussions are dependent on the agents’ inherent potential activity to participate in discussion and on realised, externalised activity, discursivity. The discourse patterns are assumed to be outcomes of peerto-peer comparison events, where agents competitively compare their activities and discursivities, and where activities also a ect agents’ cooperation in increasing the discursivity, i.e. floor for discourse. These two e ects and their influenceondiscourse pattern formation are parameterised as comptetivityα and cooperativityλ. The discourse patterns are here based on the agents’ discursivity. The patterns in groups of four agents up to seven agents are characterised through triadic census (i.e. though counting triadic sub-patterns). The cases of low competitivityα is shown to give rise to fully connected egalitarian, triadic patterns, whichwith increasing competitivity are transformed to strong dyadic patterns. An increase in cooperativity λ enhances the emergence of egalitarian triads and helps to maintain the formation of fully and partially connected triadic pattern also in cases of high competitivity. In larger groups of six and seven agents, isolation becomes common, in contrast to groups of four agents where isolation is relatively rare. These results are in concordance with known empirical findings of discourse and participation patterns in small groups.


Introduction
. Discourse and communication patterns in small groups have received attention because certain patterns seem to be connected to successful task performance or good learning outcomes.The beneficial discourse patterns are o en characterised by bidirectional mutuality, which is caused by the reciprocity in turn taking in discourse and responses (Barron ; van Boxtel et al. ; Hogan et al. ; Stahl et al. ).A widely held notion is that discourse patterns in a small group not only reflect the competencies and cognitive capacities of the group members, but also how they evaluate and appreciate each other (Bonito , ) and how tasks or knowledge needed to complete the tasks are organised (Tschan ).
. A closer look on published research shows that although the discourse patterns depend on diverse factors such as context, the structure of tasks and group composition, certain structural features are recurring.These recurring features include at least: successful strong dyads (two partners strongly connected) and egalitarian triads (three partners all connected) (Bonito , ; Barron ; Hogan et al.
; Stahl et al. ) while in some cases one also finds dyads to which a third partner is more weakly connected (Heo et al.
). Very o en, however, one finds isolation, with some group members remaining weakly connected or not connected at all to other members in a group (Bonito , ; Janssen et al.
).The common trend revealed by the empirical studies is that strongly reciprocated dyadic and triadic patterns of interaction are characteristic to successful and high achieving groups (Bonito ; Hogan et al. ; Stahl et al. ) and similar findings have also been reported in studies focusing on task related group performance (Lusher et al. ).
. The beneficial roles of discourse on group performance and group learning have led to many suggestions to enhance discourse and cooperation in such groups.One persistent problem is that despite repeated attempts it has proved di icult to engage the whole group in discourse that is productive as regards of task or learning outcomes (Barron ; Bonito ; Janssen et al.
). Very o en one or more of the group members remain passive, are not engaged in the discussion or gradually drop out from the discourse (Janssen et al.
).These problems seem, at least to some degree, to be generic since similar situations are found in di erent contexts.Isolation and marginalisation also seems to be more common in groups of five and larger than in groups of three or four, independent of the type task (Bonito , ; Janssen et al.
).Recent results on participation in groups of seven reveal on closer inspection that even if isolation does not happen, participation and engagement in group activities is in many cases unequal; a significant fraction of group members are much less engaged in group activities than the most active members (Heo et al. ).
. One possibility to consider is that such generic phenomenon of discourse pattern formation as the emergence of strong dyads, egalitarian triads and isolates in a task engaged small groups is related to the inherent social dynamics of the group and status generation within the group.Several theories of social dynamics addressing the formation of social ties in fact either indirectly support such a view or even explicitly claim that such a connection exists.Two examples of such theories are the a ect theory of social exchange (Lawler et  ).
. The a ect theory of social exchange (ATSE), for example, attributes formation of mutual ties through engagement in a common task and how goal orientation in a group generates positive feedback, which enhances the reciprocation of ties when the interaction is found to be satisfying by the interacting partners.The peers in a group have expectations for their performance and roles in completing the task, and when these expectations are felt to be fulfilled, this increases satisfaction and future engagement and exchange (Lawler et al. ; Lawler ; Lawler et al. ).In the ATSE this self-enhancing reciprocation of ties then leads to the formation of social patterns, which have strong dyads and strongly connected triads (Lawler et al. ; Yoon et al. ). .
The expectation state structuralism model (ESSM) posits an explicit connection between the mutual comparisons and participation pattern formation in a task performing group.In ESSM the group members expectations of their peers' competencies decides how each member is given a chance to participate in task completion or in discussion, and that participation then a ects the member's status in a group.There is dynamic, bidirectional relationship between performance and status (Skvoretz & Fararo ; Skvoretz et al. ).In the ESSM the basic mechanisms are such that they generate status hierarchies, which are reflected as cyclic and transitive patterns of interactions (Skvoretz et al. ).In ESSM the so called by-stander e ect is central in deciding whether or not highly transitive patterns emerge.Although the ESSM is designed to describe formation of social hierarchies and does not directly address the reciprocation of ties as ATSE, the basic notion of a close relationship between status and participation patterns is similarly at the core of the ESSM as it is in the ATSE.
. A key feature of both ATSE and ESSM is the central role they attribute to peer-to-peer comparisons as a driving force of formation of ties in a group or in status generation.This parallels with the social learning theory (SLT) that posits that individuals in a group constantly compare their performance with their peer's performance and form not only a conception of themselves as learners but also of their peer's as learners (Bandura , ).In fact, ATSE directly refers to SLT in seeking support for the role of satisfaction and a ection in shaping the social ties in task performing group.The mechanisms of peer-to-peer comparison and how these comparisons a ect the formation of ties, appreciations or status in task engaged groups are thus basically very similar not only in ATSE and SLT but also in ESSM and SLT.In all these views, it is recognised that individuals' conceptions of how they are appreciated in social groups essentially determine how much e ort they put into the performance, or the others are expected to put into the cooperation.However, it is important to note that such competition in a task engaged group is not usually or at least is not meant to be only discriminative or di erentiating, but contains also a component of mutual support and cooperation.The aspect of support and cooperation arises from the fact that activities and discursivities are evaluated in regard to the task to be performed and there are mutual benefits to be gained if the interacting partners are both active and discursive (Bonito , ; Lusher et al. ).
. The formation of discourse patterns in task engaged groups is here approached from the viewpoint that the key driving forces in the formation of discursive connections are to be found in competitive comparisons and cooperation in a very similar way as the ATSE and SLT posits.As in ATSE and SLT, the focus here is on individual's participation within the group, which aims to found a consensus concerning a solution of task or problem.It is assumed that participation in discourse concerning the consensus requires activity, and that this activity is self-reinforcing but constrained by competition and boosted by cooperation.The competition in this case is for floor in discussions and gaining visibility in contrast to others, while cooperation is about seeking a cooperation between the discursive and active group members.The formation of discourse patterns under such conditions is approached here through the agent-based model, where interaction rules between agents simulate the comparisons based on competition and cooperation in discourse.Recently, some similar kinds of systems have been studied through agent-based models.For example, the generation of status as it is described by ESSM has been studied through an agent-based model, which allowed a detailed investigation of how status hierarchies are formed, and when they have emerged, how they may lead to the formation of transitive patterns of social ties (Grow et al.
).Another recent agent-based model describes the formation of elite and egalitarian groups and how vanity (i.e.seeking praise) shapes group formation in social and political life (De uant et al. ).
. The model introduced here is most closely related to an agent-based model (ABM) recently introduced for description of the generation of mutual appreciation patterns through competitive comparisons in small groups (Koponen & Nousiainen ).In that model, many patterns of interaction that emerge correspond patterns found typically in cooperation or discourse in task-engaged small groups.The model, however, was not able to reproduce transitive patterns and cyclic patterns, which, though not common in cooperative learning groups, are found in certain situations.Even more seriously, the model was not able to produce the e ect of isolation or marginalisation, except in the very high competitive case.In this study we introduce a closely related model which performs better in these aspects.In the new model, the essential di erence is that advantage seeking cooperation is included as a part of the model dynamics.We focus here on groups of sizes from to individuals because this size range is of most interest for small group dynamics, for emergence of isolation e ects, and is very common in practical discourse situations (Barron ).In addition, the previous models based on similar kind of dynamics as the model introduced here, suggest that the most interesting and representative group dynamics is manifest groups of sizes between and ; group of size is too simple and predictable (Koponen & Nousiainen ) and groups larger than individuals appear to behave qualitatively similarly (Koponen & Nousiainen ; Grow et al. ) as is confirmed by the results presented here.In summary, the model introduced here, its basic assumptions and rules of interactions, are designed to reproduce the phenomena of interest for discourse in relatively small task focused groups, where competition and cooperation govern the discourse dynamics.

Agent-Based Model of Discourse Pattern Formation
. We present here an agent-based model (ABM) to simulate how competitive comparisons and cooperation a ect the formation of discourse patterns in a small group.The model assumes that the agents' decision to interact and participate in a discussion depends on two properties of it; activity and discursivity: • The activity is agents' potential, inherent activity to participate in a discussion.Activity as agents' inherent property is not directly observable but related to willingness to send queries or responses to other agents in discursive events.The activities indirectly prompt the interaction (e.g.query-response events) but do not determine it in direct way.Agents' activities, however, are assumed to be indirectly manifest to peers through discursivity, which is assumed to depend on activity.
• The discursivity is directly proportional to realised and externalised discourse events (e.g.query-response events) that connect two agents.These events can be observed empirically.The discourse patterns, on the other hand, are then patterns formed out of the discursivities between agents.
It should be noted that although activity and discursivity are closely related, they are di erent properties; activity is a property of one agent, while discursivity is a property linking two agents (a dyadic property).In an interaction, an agent compares its activity and discursivity to the activities and discursivities of its peers.As a consequence of this comparison agents change both their own activity as well as their discursivity towards their peers.

Basic assumptions
.
The basic assumptions of the agent's state (its knowledge of itself and its peers) in the present model can be comprised more formally as states κ characterising the agent as follows: • An agent i has activity κ ii .
• An agent i is aware of its peer j's activity κ jj .
• An agent i has discursivity κ ij towards its peer j.
• An agent i is aware that its peer j has a discursivity κ ji towards it.
. The second assumption concerning the agent's inherent property of activity as a property sensed by its peers is based on additional assumption that discursivity is proportional (or nearly linearly correlated) to activity.Similar assumption of how agents sense the internal states of other agents is made in modelling collective decision making (Zafeiris et al. ).In addition, in models based on update rules similar to Equations -values of variables κ ii , κij and κ ji are strongly correlated when discourse patterns are stabilised (Koponen & Nousiainen ).
. Competitive comparisons are assumed to a ect both activities and discursivities and these changes take place through pair-wise comparisons.The comparisons are competitive in the sense that an agent, through comparison, seeks to increase its floor in discourse by using the information that is available to it of its peers' activities and discursivities.In the present model changes in activities and discursivities due to competitive comparisons take place as follows: • Change in the agent's activity κ ii .If in the comparative interaction event agent i finds that its activity κ ii is lower than its peer j's discursivity κ ji towards it, then i tends to increase its activity because it tries to compete for floor in the discussion.If agent's activity is higher than its peer's discursivity, then agent tends to decrease its activity because there is no need to compete.
• Change in the agent i's discursivity κ ij is a ected by two competitive comparison contributions.First, the agent's discursivity κ ij towards its peer j increases/decreases if the agent finds that its peer's discursivity towards it κ ji is higher/lower than its own activity κ ii .This is a similar competitive e ect as in case of the agent's change in activity.Second, the discursivity κ ij is decreased if it is higher than peer j's activity κ jj .This e ect reduces the discourse activity towards agents that have low activity.
. The agents also seek cooperation.Cooperation changes agent's discursivities so that if both interacting agents have high activities the discursivities increase.In cooperation, agents with high activity benefit from interacting with other similar agents, thus mutually reinforcing each other.The pay-o in increase of discursivity is higher for agents of high activity than for agents of low activity.Such a mutual reinforcement mechanism leads to synergy, characteristic for collaborative actions (Caram et al. , ).This reflects the assumption that cooperation is a multiplicative rather than additive feature; for success or mutual benefits in gaining floor, both agents need to be active.The cooperation is thus assumed to change the discursivity between agents so that the change is proportional to the interacting agents' activities as follows: • Change in agent i's discursivity κ ij due to cooperation towards its peer j.This change is proportional to the geometric mean √ κ ii κ jj of the agents' activities.Agents' activities, however, are not assumed to change directly through cooperation. .
Agents have di erent sensitivity to competitive comparisons and to cooperation.The sensitivity described how easily agent changes its state due to comparisons or cooperation.Insensitive agents, despite of their interaction with other agents, maintain their states more robustly, while sensitive agents are more susceptible to change.These inherent sensitivities of agents are referred as sensitivity α to competitive comparisons (competitivity) and a inity λ to cooperation (cooperativity).The operationalisation of these properties is explained in more detail later on, when the rules corresponding the di erent possible changes of states are formulated.

Decision probabilities
. The agents' decision to interact is assumed to be probabilistic, guided by how the agent's activity and discursivity compare to the activities and discursivities of other agents.In all interactions the basic model is dyadic interaction model D, where agent i randomly selects a partner j to interact with, but it depends on the activities and discursivities whether or not this interaction actually leads to any changes in the agent's state (i.e.activity and discursivity).In addition, a second peer k may also be selected as a partner in the interaction.This second agent, however, is included only collaterally so that only κ ik changes.This model, introduced in (Koponen & Nousiainen ) is referred to as the triadic collateral model T because it promotes the formation of patterns consisting of three agents.Similar type of collateral participation is also used in modelling formation of egalitarian and elite groups (De uant et al. ).Both models D and T contain the probabilities whether the interaction leads to any change, but the magnitude of the change depends in a more complex way of on the interacting agents' states.

.
In both cases, for competitive comparisons and for cooperation the probability to change state in an event is formally taken as a probabilistic decision, where two factors A and B a ect the choice.To these factors A and B we assign utilities U A (i, j) and U B (i, j) which both may depend on states of agents i and j.These utilities are related to decision to compete or cooperate and they depend on the agents' state (to be defined in more detail later on).In the general case the probability that agent i adopts a new state when it interacts with j is then given as the canonical probability (Laciana & Oteiza-Aguirre ; Sîrbu et al. ) where is the di erence between the utilities.The parameter σ regulates the agent's tolerance to the di erence in the utilities.Now, with this probability, the selection of utilities is a key factor in defining the model.It should be noted that there are di erent ways to motivate a similar type of weight or probability (De uant et al.
; Grow et al.
) but here we have chosen the probabilistic decision theory as the basis of the definition.

.
The utilities for competition are here taken to be is the di erence between activity and discursivity toward its peers.This choice reflects the assumption that if agent's i activity is already higher than its discursivity towards agent j, it is not likely that i's interaction with j will lead to further changes in its activities or discursivities, whereas in the opposite case, it is very likely that change will take place.In this case the parameter σ = σ α describes the agents' tolerance to diversity in the context of competitive comparisons, when they interact with other agents.It is thus referred to as the diversity in competition in what follows.Such diversity is closely related to homophily, with a large diversity indicating a low homophily and a low diversity indicating a high homophily.
. The utilities for cooperation are here taken to be the di erence between agents' j and i discursivities towards each other.This reflects the assumption that when agent i has chosen to interact with j, the cooperation is more likely to take place the higher is j's discursivity towards i.Interpreted di erently, this is a condition of rewarding reciprocation where agent i's partner's high attention towards i's boosts cooperation.In the case of cooperation the parameter σ = σ λ describes the agents' tolerance to diversity in cooperation.

Evolution of activities and discursivities
.
The evolution of agents activities and discursivities are described stochastically, where the probability p ij is central in deciding whether the change takes place.The mathematical form of probability is the same for competitive comparisons and for cooperation.The agents' sensitivity to the competitive comparison is regulated by the parameter α ∈ [0, 1], referred to as the competitivity in what follows.If α = 0, there is no e ect.If α = 1, the e ect is maximal.The a inity of agents to cooperation is described through the parameter λ ∈ [0, 1], called cooperativity.The probabilities for competitive comparisons and cooperation with corresponding di erences in associated utilities are briefly denoted as What kinds of changes are realised in interaction events is decided by these probabilities.This is done by selecting at a time two random numbers R α , R λ ∈ [0, 1], and if R α > p ij and R λ > p * ij the corresponding e ects takes place (Koponen & Nousiainen ; Laciana & Oteiza-Aguirre ; Lipowski & Lipowska ).
. The update rules for agent i's activity κ ii and discursivity κ ij in the dyadic (D) model, and in the triadic collateral model (T), where agent i holds also the discursivity κ ik towards agent k, are now expressed in the form where propagator dependent changes δ 0 κ ii , δ α κ ij and δ α κ ij are .
In all incremental/decremental changes in Equations -, the model takes into account that activities and discursivities do not increase/decrease without limit and are constrained to the maximum value, which is here .
Similarly, the lowest possible discursivity and activity has a value of .The discursivity and activity values mean no participation in discourse and thus isolation, while values mean maximal possible participation and thus equal division of available floor for discourse.In real discourse, these extremes are probably not available, except in case of isolation in which case also activity as it is defined here must have a value .In order to take these constraints into account, the equations are of the logistic type and contain the term κ(1 − κ).Due to the logistic growth activities and discursivities are nearly always in range from . to .except in case of isolation when they approach a value .The parameter π o is the overall sensitivity of agents to changing their discursivities and activities.This parameter is treated stochastically, thus simulating the randomness in strengths of individual decisions.In practice, we have assumed that π o is normally distributed with an average value of π o < 0.3 and a standard deviation of 0.3π o .These values are small enough to prevent instabilities in iteration and to ensure convergence to results that do not depend on exact values of π o .Then the exact value a ects only the number of steps needed so that the iterations converge to dynamically stable values of discursivities and activities.

Simulations and parameters
.
The simulations are carried out by selecting stochastically the agents that interact (two agents for the dyadic model D and three agents for the triadic collateral model T).The initial values of activities and discursivities κ are assigned randomly from a uniform distribution in the range 0.333 < κ < 0.667.This is a practical choice and a wider/narrower distribution of initial values does not a ect the distribution of stable patterns; stabilisation of patterns just takes more/less iterations.The parameter α is varied from to , with steps of ., thus spanning the e ect of competitivity from a nonexistent e ect to a maximal e ect.The cooperativity is studied for no cooperation at all λ = ., and for intermediate and high cooperation λ= .and ., respectively.The value λ = 0.3 is high enough so that an increase in cooperation does not significantly change the results.The tolerance to diversity is explored for σ α = ., .and ., where the lowest and highest values are chosen so that there are no essential changes in results beyond these limits.The tolerance to diversity in cooperation σ λ was not found to a ect much the results and a moderately high value σ λ = .and the denotation σ α = σ will be used throughout.
Table : The key parameters of simulations, their symbols, roles and values used in simulations.In what follows, σ λ = 0.25 in all simulations and therefore the denotation σ α = σ is used throughout.).All the simulations were carried out for repetitions of each parameter combinations.Some simulation runs were done with di erent choices of initial values as well as di erent choices of π o to test the robustness of the results in regard to the choice of parameters regulating the computation.

Discourse Patterns
. Important characteristics of the relationships in discourse and associated discourse patterns can be understood by focusing on di erent dyadic and triadic sub-patterns and how the ties in these sub-patterns are reciprocated.
Given the background assumptions, the expectation is that reciprocated dyads and triads, as well as reciprocated dyads embedded as parts of di erent triads, are important as expected on the basis of task or engagement based interactions as expected by ATSE (Lawler et al. ; Lawler ; Lawler et al. ).One can also expect to find patterns of the leadership type containing directed ties in which one agent is more central than the others, as predicted by ESSM (Skvoretz & Fararo ; Skvoretz et al. ).Cyclic (i. ) . In what follows the patterns are given short-hand names on the basis of their roles in the social dynamics in discourse, and they are roughly of three di erent types; triadic, dyadic and leadership-type patterns.The short-hand names of the patterns in Figure and their indexing are given in Table .In simulations, we were looking for these patterns and counting their abundances at the stage of simulation where patterns were stabilised (roughly the last % of update events in the simulations).In region where patterns are stabilised discursivities which are higher than threshold .are taken into account.Nearly all such discursivities are close to value in stabilisation of patterns.Variation of threshold does not thus significantly a ect the pattern counts.
Table : The abundance n ind of discourse patterns (ind) based on discursivities κ ij .The following descriptive names of patterns in shorthand notations are used: L=leadership, C=collateral, B=broker.The abundance n ind of di erent patterns can be counted from the adjacency matrix K , which has elements 05 and [K ] ii = 0 (excluding activities) providing all the information to count n ind .Three other auxiliary matrices derived from K are introduced: The matrix K, where entries are for all non-zero entries in K , the symmetric part of K, denoted by S, and the asymmetric part, A = K − S; and the symmetric matrix E constructed so that if K ij = 0 or K ji = 0, then E ij = E ji = 1.Standard matrix operations are used so that T denotes transpose, Tr trace and • is the element-wise multiplication (Hadamard product).The logical inverse (complement) of the matrix is denoted by ∼ e.g.K as the complement of K.

index name
Number • Triadic patterns are groups in which all three agents are linked to each other in di erent ways.In the egalitarian triad ( ), all links are reciprocated.In the collateral triad ( D), only two agents are connected ) of all triadic patterns and the formulas to count their abundances n ind .In the indexing, the first digit indicates the number of reciprocated pairs, the second digit the number of non-reciprocated pairs, and the last digit the number of unconnected pairs.The last character, if given, di erentiates between directedness (U for upward, D for downward) of otherwise similar patterns.
by a reciprocated link and the third agent is collaterally connected to them both by an incoming but nonreciprocated link.This is a broker's position, where a single agent is appreciated by a dyad and can thus influence the dyad.By contrast, in the broker triad ( U), the two agents are connected to the third one by an outgoing link (a pattern known as tertius gaudens (Simmel )).The cyclically connected (CC) triad ( C) has a cyclic pattern C as a part of it.Finally, one triadic pattern of interest is transitive triad T, typically found in hierarchical patterns (Skvoretz & Fararo ; Skvoretz et al. ).
• Dyadic patterns are groups in which a reciprocated dyad is the most dominant structural element.In an egalitarian dyad ( ), both agents are in symmetrically reciprocated positions but not connected to a third party at all.In a collateral dyad ( U), one of the agents in the dyad is connected collaterally but unidirectionally to another agent, whereas in a broker dyad ( D), one collateral agent connects to one of the agents in the dyad.These patterns have very di erent roles in discourse; the one who is always contacted but never responds (U), and the one who always contacts but is never responded to (D).These two latter structures are o en transitory structures not only in forming corresponding balanced triadic patterns but also in situations in which balanced triadic patterns fall apart.
• Leadership patterns are groups in which one agent attains a special position as a leader.The simplest of such structures is the endorsed leader ( U), in which one agent is contacted by others but which is not responsive towards any of the other agents.Such a position is expected in cases of strong dominance and competition.A similar type of pattern in which one agent a ects two other agents is a broker type pattern D. A more egalitarian type of leadership is the dyadic leader ( ), in which two dyads share a common agent, which then have a leader-type position.This pattern can evolve to or from a triadic leader ( ), in which the agents, which are not in a leader-positions, are non-reciprocally connected.
In addition to the patterns listed in Table also totally isolated (no connections at all) triads were recorded in the simulations.The simulations provide the matrix K of all connections in terms of discursivities, and from this matrix, the abundance n of di erent patterns (see ) and are not reproduced here.

Results
. The formation of the discourse patterns is examined here for groups of , , and agents.The three agent group is omitted because in a three agent group, G , the pattern formation is essentially constrained by the geometry, and only egalitarian triads, leadership dyads and dyads are observed (Koponen & Nousiainen ).Most results are shown for four-and five agent group G and G .This is due to the fact that G is large enough so that its geometry does not essentially constrain the formation of patterns.The four agent group G is interesting because it easily splits into two independent dyads.It is expected that the five agent group G will provide a di erent collection of dyadic and triadic patterns and more isolated patterns in comparison to G .The six-and seven agent group, G and G , and higher are expected to be in many ways very similar to G as far as our interest is in the basic units of dyads and triads.The most important di erence between G and groups with higher number of agents is that as the number of agents increases also the relative number of isolated agents (isolates) increases.Consequently, G is of interest as a transitory case between G and G or larger groups.

.
The di erent patterns are counted throughout the simulations, and average values over final steps (the stabilised stage) of total steps in each case and repetitions (ensembles) are reported in what follows.The parameters used in simulations are as listed in Table .In all simulations, the competitivity α is the most important parameter that a ects how the discourse dynamics change and what patterns are dominant.
. First, we show the average abundance of patterns n for G and G and study the e ect of diversity for σ= ., .and . in Figures and .In all cases, for each group, the values of n ind for each pattern ind are normalised so that n 300 = 1 for fully connected triads.For low α triads dominate and therefore, for ease of comparisons, we have divided the number of triads by a factor of two in all figures (i.e. in all figures triads with n 300 = 1 correspond to the value of .).Second, the e ect of collaterality on pattern formation in terms of models D and T is explored for G and G in  ) as a function of the competitivity α.The results in upper panel are for diversity σ = .and for cooperativities λ= ., ., and . .In the lower panel the results are for λ = 0.3 with σ= ., ., .and . .Note that the normalisation of all n ind is to the value n 300 = 1 of egalitarian triads, and in figures n 300 for triads is divided by a factor of resulting in a maximum value of . .(lower panel) in order to see how tolerance to diversity a ects the results.Cooperativities higher than λ= .give essentially similar results as λ = 0.3 which is thus chosen to be the highest cooperativity studied.The results for G show that the most dominant patterns for low competitivity α < 0.4 are fully connected egalitarian triads ( ), while for intermediate competitivity 0.3 < α < 0.6 the dyadic leadership patterns ( ) are dominant.Increase in cooperativity increases the abundance of these dyadic leadership patterns, and they persist even for the high competitivity region α > 0.6.Cooperativity thus increases the tendency to dyadic leadership type patterns very clearly.In the high competitivity region α > 0.5 dyads ( ) become increasingly prominent patterns and also the abundance of broker triads ( D) increase.This signals transition to the strong dyadic interaction when competition is high.This is an outcome of the self-reinforcing feedback e ect between highly discursive agents, which become engaged in a mutually reinforcing cycle of discursive interactions while reducing interactions with their less discursive partners.significant di erence between G and G is that in G the abundance of dyads ( ) is significantly lower and abundance isolates significantly higher than in G with corresponding parameters.Thus, the bigger group enhances the tendency for isolation and drop-outs.This result agrees with the notion that in big discourse groups face-to-face contacts tend to decrease and risk of isolation increases (Bonito , ).The model results suggest that transition to this kind of behaviour takes place at G and it is expected that the number of isolates is even larger in G and G .

.
In addition to the patterns shown in Figs. and , we also checked the abundance of cyclic patterns ( C and ) as a function of the competitivity α.The results in upper panel are for diversity σ = .and for cooperativities λ= ., ., and . .In the lower panel the results are for λ = 0.3 with σ= ., ., .and . .Note that the normalisation of all n ind is to the value n 300 = 1 of egalitarian triads, and in figures n 300 for triads is divided by a factor of resulting to maximum value of . .C) and their sub-patterns ( C), but their abundance was so low that they were not of interest.The absence of cyclic patterns is known to be a typical feature of social dynamics in which the formation of reciprocated ties is common, e.g. when social ties are based on mutual trust or engagement in common tasks (Lawler et al. ; Yoon et al. ).In what follows, we focus on the six patterns that are the most abundant in all cases: egalitarian triads ( ), dyadic leaders ( ) and single dyads ( ), which are the most abundant patterns, and triadic leader ( ), broker and collateral dyads ( D and U), and isolates ( ) which are the patterns most abundant and also most indicative of sociodynamic changes.

Collaterality
. Collaterality refers to relationships in which one agent in a reciprocal dyadic pair of agents connects to a third.
This model of interaction is as a triadic collateral model (model T).In Figure is shown the e ect of collaterality for G (upper panel) and G (lower panel) for model T. The results show that inclusion of collaterality increases the abundance of triadic leaders ( ) and collateral and broker triads ( D and U, respectively), while abundances of dyads ( ) and dyadic leaders ( ) are decreased in comparison to model D. This is as expected because collaterality tends to add a third agent to the reciprocated dyads.As the results in Figure show the e ect of collaterality for G is nearly similar to the G case.In G , in high competitivity region, however, also collateral triads ( U) are abundant, while they are absent in the dyadic model D. An interesting feature in G is the appearance of endorsed leaders ( U) at very high competitivity, a feature absent in G .

.
Increased collaterality causes the egalitarian triads ( ) to survive in the region of higher competitivity.As a result, egalitarian triads are now prominent for high competitive regions too.This is as expected, as increasing the tendency to include collateral partners in discourse, and increasing cooperation, make completely connected egalitarian triads become favoured patterns.The e ect of collaterality on the abundance of di erent patterns is qualitatively similar in G and G .In G , the abundance of dyads ( ) and dyad-dependent patterns (e.g.D and U) is higher than in G .This is obviously due to fact that a group with an odd number of agents can be split into mono-dyadic units.Therefore, dyads and dyad-dependent collateral and broker patterns are more abundant in G .For dyadic and triadic leadership patterns, group size dependent di erences are insignificant in comparison to the di erences caused by collaterality.

.
In summary, if the collaterality of social interactions can be controlled in real groups (as presumably it can be), opportunities are provided to tune the reciprocated dyadic discourse patterns.By increasing collaterality we can suppress the formation of dyadic and dyadic leader patterns and the group can be maintained in a balanced egalitarian mode.However, whether or not the egalitarian mode is more preferred than the dyadic mode is, of course, a decision that depends on the goals and task engagement of the group.In addition, as can be expected, in a small group, it matters whether the group consists of an even or odd number of agents.
If egalitarian patterns are of interest, the best option is a group consisting of an odd number of agents and the triadic collateral interaction mode (T), in which case collateral and broker positions become more abundant in comparison to the dyadic interaction mode (D), which leads eventually to the stabilisation of egalitarian triads and connected dyads.

Group size .
The dyadic and triadic patterns are the elementary blocks of higher-order social patterns and it is of interest to see how group size a ects the relative proportions of these elementary units.In order to examine the e ect of group size, simulations were also carried out for groups of sizes and (groups G and G ) in addition to In G for model D, the dyadic leaders are also quite common in situations of high competitivity, which is as expected because the larger the group the more it provides combinatorial freedom to form connected pairs of dyads as dyads become more abundant.In model T dyadic leadership patterns are nearly absent for low cooperativity but increasing cooperativity increases the number dyadic leadership patterns, as in case of G .In general, the di erences between the results for model D and T is also similar to what is seen in case of G .
. The results for di erent group sizes show that the most egalitarian triadic discourse patterns are always obtained for low competitivity independent of group size.The larger the group, the higher competitivity it can tolerate while maintaining the egalitarian mode in which all members can equally participate in discourse and discursive moves are reciprocated.The larger the group size the more transition to dyads and dyadic leadership patterns occur at high values of the competitivity α.However, with increasing group size, the relative amount of dyads increases and the larger groups break up into dyadic groups more easily a er the transition has taken place.This is expected when reciprocation is high at high competitivity.The comparison of results for G -G with the results obtained for G confirm the assumption that G is qualitatively di erent from the larger groups, while larger groups behave rather similarly in regard to triadic census.

Discussion and Conclusions
. We have here demonstrated that many patterns of interaction that are found to be typical in cooperation or  discourse in task-engaged small groups are reproduced by the agent-based model in which the interaction of agents is based on their activity and discursivity, which dynamically evolves through mutual competitive comparisons and cooperation.The model introduced here is a minimal model in which only very basic competitive comparative evaluations and very simple forms of cooperation are taken into account.Two notions concerning the realism of the model must be made.First, the implicit assumption in constructing the model is that agents perceive not only their own states (activity and discursivity) but also their peers' states.Though the assumption that discursivities (which are externalised actions and thus observable for all agents) are fully perceived is plausible, the assumption that peer's activity is also perceived may raise doubts because it is not directly available through e.g.query-response events or discourse moves.However, the activity of agents can be taken as property which is manifest in group level and as such, agents can nevertheless make estimates of their peer's activity on basis of how peers have participated in discourse in long run.Such an assumption is justified by notion that in models obeying the update rules similar to Equations -values of variables κ ii , κij and κ ji become strongly correlated when their values (and thus discourse patterns) are stabilised (Koponen & Nousiainen ).A similar problem with how agents sense the internal states of other agents is common with models of collective decision making, where internal state of the agent also appear as a factor in the model.In those models the problem is resolved by assuming that such internal state corresponds to how that property is manifest in group level and is thus also equated with the value perceived by the agent itself (Zafeiris et al. ).Also, the model depends on group level parameters of sensitivity to competitive comparisons (α) and to cooperativity (λ), which in principle are parameters related to a single agent, but are treated here as being the same for all agents.The phenomenological meaning of these parameters corresponds to how the social learning theory views the roles of cooperation and collaboration.However, the exact values of the parameters can not be derived or deduced from the underlying theory because there is no direct correspondence how the qualitative notions of theory are operationalised.Instead, the values which correspond "high" or "low" sensitivity, must be deduced a posteriori on basis how they a ect the evolution of the discourse patterns.Such a model is phenomenological and generative; it gives rise to observable states based on underlying unobservable states and interactions, not derivable from an underlying theory, but yet based on plausible behavioral rules (Nowak et al. ). Keeping these limitations and idealisations in mind generalisation to real discourse situations seems possible and useful.

.
The results show how delicately the discourse patterns depend on mutual comparisons, how the competition of gaining better discursivity (i.e.floor in discourse) shapes the patterns, and how by raising the competition the tendency to reciprocated dyadic patterns is raised.In practice, this means that highly discursive agents have the tendency to strengthen their mutual ties and ignore their less discursive peers, thus forming tightly connected dyads.When competition becomes very high, pure dyads begin to emerge while some group members lose all connections and become isolated.Only when competition is moderate or low, do all the partners in discussion receive attention (i.e. are given the floor in discussions) and no special dyadic patterns arise.This picture is very close to Simmel's notions (Simmel ; Yoon et al. ) of the formation of strong, mutually dependent dyads vs. the formation of more egalitarian groups.

.
While the regions of very high and very low competition turned out to be rather unsurprising, the region of moderate competition shows a richer collection of patterns.When competition is moderate the leadershiptype patterns and broker-type patterns emerge, where the basic unit is still a strong dyad, but now connected unidirectionally to a collateral agent.The discourse is still intense between tightly connected dyads, but now a third agent in di erent roles, either a collateral or broker role, is included.These roles can be seen as either the role of adviser (broker) or the adviced (tertius gaudens).
. In addition to the competitive comparisons also the e ect of cooperation was investigated.Cooperation here is a kind of advance seeking cooperation, where agents look for partners willing to active mutual discourse (in expectation that discourse is useful).How cooperation then reinforces the mutual discursivity of agents depends, on the other hand, on agents' activities (i.e.potential willingness to participate in discourse, independent of the partner).As expected, such cooperation helps to maintain the egalitarian discourse patterns even if the agents' sensitivity to competitive comparison is high and it also helps to maintain the collateral agents attached to the groups.This is seen as a higher abundance of patterns where in addition to strong dyads also single links to collateral agents are maintained.Also the tendency for isolation is reduced.Somewhat unexpectedly it turned out that agents' increased tolerance to diversity, a kind of homophily, a ects the pattern formation in very similar way as the increased cooperation.On closer examination, however, this similarity is reasonable since both mechanisms increase the tendency to reciprocate the ties between the agents, although in a di erent manner.
. In regard to modelling and simulations of group processes in discourse pattern formation the model introduced here is most closely related to model describing formation of appreciation patterns on basis of competitive comparisons (Koponen & Nousiainen ), designed to follow the social learning theory (Bandura , ).
The major extension of the present model in comparison to model introduced before (Koponen & Nousiainen ) is inclusion of cooperation, which leads to richer pattern formation than competitive comparisons alone.The model discussed in this study shares similarities also with models of competition and cooperation (Caram et al. , ; Lipowski et al. ), elite and egalitarian group formation (De uant et al.
), and status construction in groups (Grow et al.
).Some previous agent-based models for cooperative and competitive small groups have modelled the e ect of status comparisons as direct comparisons of the statuses of individual agents (Caram et al. , ).Also, in these cases, agents of similar statuses form sub-groups or cliques.These models, like ours, also include the notion that such a status is o en bounded and cannot increase or decrease without limits, thus requiring the introduction of logistic growth type terms in update rules.This restriction clearly has an e ect on how the groups are formed (Caram et al. ).More refined agent-based models of sub-group formation in small groups take into account the fact that the dynamics and status comparisons depend not only on agents' status but also on other agents' beliefs or expectations about other agents' statuses.This e ect is taken into account in agent-based models for small groups in which agent-to-agent relations are reinforcing (Lipowski et al. ).Such models lead to the formation of di erent types of leadership patterns, and depending on the strength of the reinforcement, the leadership can be absolute, symmetric (all links of equal strength) or asymmetric (one link stronger than others).These patterns are very similar to the leadership patterns found in the present study.Some agent-based models of the formation of social ties take a further step by taking into account both the agents' status and the reinforcement of agent-to-agent links so that the comparisons are between the agent's status and the other agents' expectations of that status.Comparison to models where the statuses of agents are compared directly or where only agent-to-agent connections are the basis of comparison, such models add an important sociological component: how an individual's self-conception is a ected by peer evaluations.Such factors are included in agent-based models of the formation of elite and egalitarian groups, within the so-called Leviathan model (designed to follow Thomas Hobbes's view and thus named Leviathan) of the role of vanity in human social and political life (De uant et al.
).The Leviathan model illuminates how self-appraisal and vanity, when very strong, leads to the formation and consolidation of elite groups, and simultaneously, to the isolation of those outside the elite.In all these cases, status, status expectations and their comparisons essentially a ect the social structure of groups.This kind of structure generative dynamics is demonstrated by a recent agent-based model describing the formation of status hierarchies (Grow et al.
), based on the sociological model of the creation of status hierarchies (Skvoretz & Fararo ; Skvoretz et al.
).The agent-based model presented here is, in its spirit and aim, very closely related to the Leviathan model (De uant et al.
) and the status construction model (Grow et al. ) in that it also identifies the relevant micro-level mechanism of how individual relations are formed.

.
In regard to the empirical results, the model provides insight on formation of strong dyads and egalitarian triads in discourse groups (Barron ; Heo et al. ; Hogan et al. ; Tschan ) and to the phenomenon of isolation (Bonito , ).Empirical research has recognised the strong dyads and egalitarian triads as common discourse patterns emerging and stabilising in real discourse situations.However, research has lacked means to address the underlying social or psychological mechanism behind pattern formation dynamics.This is due to fact that empirical access to learners' internal mental or psychological states and how they perceive their social status is far from straightforward and usually not accessible at all.The present model suggests that strong competitive comparison is a behaviorally plausible factor behind the formation of dyads, while cooperation facilitates the formation of egalitarian triads.The isolation e ect, known also from several empirical studies of discourse, emerges already in groups of four, although not significantly, and increases with increasing group size.In groups of seven the isolation is quite pronounced when competitive comparisons dominate the group dynamics.The isolation e ect that increases with group size is also known from empirical studies and it is known that it can be moderated or suppressed only with special arrangements (Bonito , ).The model results presented here suggest that one possibility to moderate the formation of strong dyads and isolation is by forcing collateral triadic interaction (T model) instead of dyadic interaction (D).In practice, this means that in exchanges of opinions or in each query-response events a collateral partner is included, i.e. directing attention also to the collateral partners.
. The similarity of simulation results to empirical findings suggests that empirical research of small group cooperation, learning and performance, should pay close attention to the individuals' expectations of their own and their peers' competencies and performances, and how these expectation are mediated through engagement with the task.In addition, information is needed of how sensitive the individuals are to the outcomes of these comparisons.In broad terms, these notions are in line with how the a ect theory of social exchange (ATSE) and the expectation state structuralism model (ESSM) conceptualise the social interaction in task engaged groups.This agreement suggests that ATSE and ESSM could be promising candidates to model and understand discourse dynamics and participation, and could possibly shed light on open problems in analysis of participation in small groups (Bonito , ; Janssen et al. ; Stahl et al. ). .
The main purpose of the model is to help in identifying factors that might a ect the participation and to understand better what kinds of factors a ect the isolation and drop-out.The agent-based model proposed here serves as a tool for conceptualisation and reasoning about how individuals' psychological factors (sensitivity to comparisons, competitivity and cooperativity, etc.) may a ect the formation of discourse and participation patterns.The model parameters are partly related to factors that are intrinsic, and partly to factors that can be manipulated.The competitivity and cooperativity are supposedly largely related to individual psychological factors and formation of ties on that basis, but they can be nevertheless enhanced or moderated by the external conditions and instructional strategies that regulate group dynamics.The collaterality and the diversity, however, depend more on the practical arrangements and can be altered according to how the group work is organised.In addition, the group size is of much importance.For example, the specific nature of groups of four members should be recognised.All these factors may be essential in determining how the discourse and dialogue are shaped and what kinds of interaction patterns emerge.On what assumptions is/are the agents' decision model(s) based?Agents change their activity and discursivity as a consequence of pair-wise comparisons.Competitive comparisons a ect both activities and discursivities and these changes take place through pair-wise comparisons.The comparisons are competitive in the sense that an agent, through comparison, seeks to increase its floor in discourse by using the information that is available to it of its peers' activities and discursivities.Cooperation changes agent's discursivities so that if both e. three agents A, B and C connected cyclically as A → B → C → A), transitive (A → B,C and B → C) and completely non-reciprocated triadic patterns, however, are expected to be rare under situations favouring reciprocation (Yoon et al. ; Block ).The possible dyadic and triadic patterns are shown in Figure where we have indexed the patterns according to the common structural indexing (Moody ) (see the caption of Figure for details).Such triadic census of the patterns acts as a fingerprint of the group dynamics and structure (Moody ; Itzkovitz et al.

Figure :
Figure : Patterns and their indexing.Pattern indexing (ind) (Moody Figure .Third, and last, the e ect of group size on pattern formation is explored up to G for model D in Figure and for model T in Figure .

Figure :
Figure : The relative abundance n of discourse patterns in G (without single links

.
The e ects of competitivity and cooperativity are most prominent in G and G with dyadic interactions (model D), shown in Figure (all other patterns except the nearly nonexistent single link are shown).The results for moderate tolerance to diversity in competitive comparisons σ= .and for cooperation λ = .(no cooperation), .and .are shown in Figure (upper panel) and for comparison, for λ = .with σ = ., .and .

.
The e ects of tolerance to diversity in discourse pattern formation for G in case of model D are shown in Figure , lower panel.Somewhat unexpectedly the increased tolerance to diversity has very similar e ects to increased cooperativity.In both cases, the e ect in comparison to no cooperation or low diversity is to increase the dyadic leadership patterns ( ) while the number of dyads ( ) decreases.This behaviour results, when with increased cooperation or tolerance to diversity, dyads are combined to connected dyads (i.e. to dyadic leadership patterns).This notion is interesting because it supports the anticipated beneficial e ects in discourse when participants are cooperative or alternatively tolerant to di erent opinions.The e ects of competitivity, cooperation and tolerance to diversity for G and model D are shown in Figure with similar parameters as those for G shown in Figure .The comparison of results in Figs. to those in Figure show that the most

Figure :
Figure : The relative abundance n of the discourse patterns in G (without single links

Figure :
Figure : The relative abundance n of the discourse patterns in G and G in the triadic collateral interaction model T as a function of the competitivity α.The results in upper panel are for diversity σ = .and for cooperativities λ= ., ., and . .The normalisation is as in Figs. and .
G and G .The results for G -G are shown in Figure for model D and in Figure for model T. The results in Figure for model D show that for G and G the results are very similar to G .With increasing group size, the number of isolated agents increases, the number of triadic leadership patterns ( ) and collateral ( U) and broker ( D) triads decrease.

Figure :
Figure : The relative abundance n of the discourse patterns in G , G and G in model D as a function of the competitivity α. Results are for diversity σ = 0.20 and for cooperativity λ = 0.0 (upper panel) and for λ = 0.3 (lower panel).The normalisation is as in Figs. and .

Figure :
Figure : The relative abundance n of the discourse patterns in G , G and G in model T as a function of the competitivity α. Results are for diversity σ = 0.20 and for cooperativity λ = 0.0 (upper panel) and for λ = 0.3 (lower panel).The normalisation is as in Figs. and .
, values of activity kappa_ii and discursivity kappa_ij towards other agents are created.SIGMOIDAL PROBABILITY Tabulate probability p_ij for difference/diversity TABLES FOR PATTERN COUNTS ntotmotif #EXECUTION OF ITERATIONS If number of iteration < maximum number iteration [ Select randomly interacting agent i and j and collateral agent k Obtain probability p_ij from tabulation that interaction produces change in activity and discursivity Calculate strength of change pi_o Use roulette wheel method on basis of p_ij to decide if change in activity and/or discursivity takes place.Total magnitude of change depends on pi_o and alpha and differences in appreciations , theories or hypotheses are underlying the model's design at the system level or at the level(s) of the submodel(s) ?The model is based on the notion of the importance of reciprocation of query-response sequences and how such reciprocation is self-enforcing.
, R λ ∈ [0, 1] at a time.If R α > p ij the activity and discursivity are updated according to Equations -and Equations -.If also R λ > p ij , discursivity is a ected also by cooperation and is updated accordingly by following the rule in Equation .In addition, π o in Equations -is also treated as a stochastic variable and selected from a uniform distribution between the values π o ± δπ o , where δπ o = 0.33π o .
λ Tolerance to diversity in cooperativity σ λ = 0.25 .The decision to interact is done by simple application of the Monte-Carlo rejection based rule (Koponen & Nousiainen ; Laciana & Oteiza-Aguirre ; Lipowski & Lipowska ).This is done by selecting two random numbers R α Table ) can be obtained (Moody ; Itzkovitz et al. ).Details and proofs of the formulas provided in Table to count the patterns are given in (Moody ; Itzkovitz et al.