<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Emergence detection using an fuzzy expert system in complex system⋆</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Ali Boukehila</string-name>
          <email>al.boukehila@lagh-univ.dz</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Fatima Zohra Bouakrif</string-name>
          <email>fatimazohrabouakrif@gmail.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nora Taleb</string-name>
          <email>Talebnr@hotmail.fr</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Amar Telidji Laghouat University</institution>
          ,
          <addr-line>03000, Laghouat</addr-line>
          ,
          <country country="DZ">Algeria</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>LISCO Laboratory,Badji Mokhtar Annaba University</institution>
          ,
          <addr-line>23000,Annaba</addr-line>
          ,
          <country country="DZ">Algeria</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Swarms of insects, schools of fish, flocks of birds, and other natural phenomena all exhibit emergent behaviors, which are among the most widely discussed subjects in the world today. When these organisms are on a mission, it is evident that they maintain their consistent direction of travel without colliding with one another. This paper suggests a fuzzy expert system-based approach to emergent behavior analysis.Besides that, the paper describes the first results of a three-step procedure and investigates how interactions can be utilized as a metric to detect emerging behaviors in the Boids model: (1) Representation and acquisition of simulation data,(2) Building a fuzzy expert system,(3)Learning process and emergence detection. Since this is a part of ongoing research, future direction is also discussed.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Expert systems</kwd>
        <kwd>Emergence</kwd>
        <kwd>Agent-based modelling</kwd>
        <kwd>Swarm Introductio</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Flocking or swarm behavior is observed in many species in nature. A prominent Recent advances in
modeling have led to the widespread application of agent-based simulation in complex systems across a
wide range of academic fields, including organizational behavior, decision-making, and problem-solving.
Emergence behavior is a result of the complexity of agent behaviors and their interactions; it can be
found in a wide range of systems, from the simplest to the most complex, and can take many diferent
forms (positive or negative). From [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] divided emergent behaviors into four categories according to
the kinds of input that vary and the causal connections between a system’s micro and macro levels. In
complex systems, a weak emergence [2] can be identified and comprehended. Emergence validation
techniques in the field of complex systems can be divided into three primary groups: grammar-based,
variable-based, and event-based. Variable-based approaches use a particular variable to characterize
emergence. Variations in this variable’s values are considered to indicate the existence of emergence
properties [3]. One may use the center of mass of a flock of birds, as demonstrated in [ 4], as an
illustration of how emergence in bird flocking behavior occurs. A sequence of events that alter the state
of a system or a subsystem is referred to as behavior in event-based approaches [5].
      </p>
      <p>This paper is organized as follows. Section two defines the fundamental concepts, section three
introduces the related works, section four presents the proposed approach, the first results are shown
in section 5 and finally, section six makes a conclusion.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Fundamental Concepts</title>
      <sec id="sec-2-1">
        <title>2.1. Fuzzy Expert System</title>
        <p>One basic method that arises immediately from the nature of fuzzy logic is the merging of fuzzy logic and
expert systems. Right present, fuzzy expert systems are the most widely used application of fuzzy logic,
with numerous implementations running in a wide range of fields [ 6]. A professor at the University of
California, Berkeley named Lotfi Zadeh first proposed the idea of fuzzy in 1970 [ 7].Numerous industries
employ fuzzy expert systems. A few instances are software quality assessment [8], agricultural [9], [10],
security systems [11], [12], and medical [13], [14]. In a fuzzy expert system, the rules often take the
following form:</p>
        <p>If A is low and B is high then X = medium.</p>
        <p>Where A and B are input variables, X is an output variable. Here low, high, and medium are fuzzy
sets de fined on A, B, and X respectively.</p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. Emergence in complex systems</title>
        <p>
          There have been enormous eforts to define the meaning of emergence. Originating in philosophy
[5], emergence has gained popularity within the study of complex systems and Multi-agent systems.
The study of emergence has several potential for understanding the interactions of agents and their
environments [15]. We use fromm’s [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] categorization in this study. He presents a taxonomy that
categories four forms of emergence based on distinct sorts of feedback and causation.Addressing
security vulnerabilities is crucial to ensure trust and reliability in IoV systems, which also impacts
overall eficiency, as discussed next.
        </p>
      </sec>
      <sec id="sec-2-3">
        <title>2.3. The Boids model</title>
        <p>Reynolds[9] showed that algorithmically implementing the three rules of alignment, cohesion and
separation leads to flocking behavior while an individual only needs local knowledge about its surrounding
neighbors (called Boids). These rules are :
• Cohesion : this is the force which makes boids move close to the other boids in their
neighbourhoods.
• Alignment: this is the force which makes boids move in the same direction as the otheir boids in
their neighbourhoods.
• Separation: This is the force which makes boids avoid collision with the other boids in their
neighbourhoods. The emergence behavior in the Boid model is the presence of an unexpected
grouping packing behaviour , this behaviour is often observed in this model, This is the reason
why the boid model is one of the most used ABS model to study weak emergence.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Related Work</title>
      <p>Agent-based simulation (ABS) specifically used compared to other simulation techniques. Emergence as
a result from simulation, is normally investigated with (ABS) tools. Structures with massive wide variety
of parts frequently display emergence, and through ABS simulating platforms, it is common to visualize
and to control the rise of unexpected behaviour. Variety of emergence definitions exists, however
to facilitate the study, we simulated the technique primarily based on bedau’s[2] week emergence
definition, a weak emergence can be verified via simulation, it is expected and may be controlled in
certain systems. For Example, in boids model, the simulation of the flocking is controlled by three rules
: separation, cohesion, and alignment. Applying those regulations will result in a grouping behaviour
(emergent). Professionals can with a few parameters modifications, accelerate the rise of the flocking or,
eliminate it.</p>
      <p>Many techniques have been used to track emergence. [16] defined emergent behavior as a time-series
changing point and proposed the use of changing point detection techniques for the discovery of
emergent behavior. [13] employed interaction statistics as a metric to examine the emergence of emergent
behavior from agent-based simulation(abs). [14] introduced a method for semantically validating
emergence using an ontology-based framework. The method measured the semantic diferences between
element attribute values using a semantic state distance metric. A summary of metric-based approaches
for analyzing vision-based car behavior is provided by [17], [18], [4], [19] which employ interaction
metrics to identify and categorize emergence in real-time simulations, and [3] which employed age
metrics to identify and categorize emergence through swarms of unmanned aerial vehicles (UAVs). We
discuss our work in the next part to address the constraints stated by [20], who presented a statistical
metric to find emergence and demonstrated how data loss afects communication in contested situations.
4. Proposed Approach
we analyse the boids model, which captures the motion of bird flocking and is a seminal example
for studying emergence. We model this system as a multi-agent system in which each bird is an
agent. In this section, we present the multi-agent simulation framework (Figure 1) that consists of
two components, agent-based simulation engine and expert system engine. These two components
communicate with each other to implement their functionality. The main functionality of the simulation
engine during the simulation is to retrieve data which will be passed to the expert system to detect new
system state which can be unknown (Emergent behaviour).</p>
      <sec id="sec-3-1">
        <title>4.1. The simulation engine</title>
        <p>We use Reynolds’s Boids model [21] with multi-agent system for the simulation, Netlogo[20]simulation
plat-form is used. The purpose of this simulation engine is:
1. Step 1: Running the system in several ‘’normal”situations when interaction=separation.
2. Step 2: In every situation ,gathering and formalizing the simulation data.</p>
        <p>3. Rerun step1 and step2 but with emergent situations.</p>
      </sec>
      <sec id="sec-3-2">
        <title>4.2. The fuzzy expert system</title>
        <p>The designed fuzzy expert system for identifying emergent behavior consists of four parts.The parts
have been defuzzed.The information derived from the fuzzy rules generated was inferred using the
Mamdani fuzzy inference approach, which was utilized in this work. Numerous computer languages
can be used to create a fuzzy expert system. This system is implemented using MATLAB as a tool.</p>
        <sec id="sec-3-2-1">
          <title>4.2.1. The Knowledge-Base</title>
          <p>The fuzzy knowledge base contains fuzzy facts and rules so that the knowledge base systems will allow
approximate reasoning. For easily performing knowledge representation and reasoning, all rules in the
knowledge base are presented as a set of if &lt;antecedent clauses&gt; then &lt;consequent clauses&gt; rules.</p>
        </sec>
        <sec id="sec-3-2-2">
          <title>4.2.2. Fuzzification</title>
          <p>Convert values to fuzzy inputs by using membership functions [22]. In this research, there are three
linguistic variables (input variables) used, namely:Alignment(A), separation(S),cohesion(C) and one
output variable : Emergent behavior (EB). Fuzzy linguistic values of input/output variables are set as
[Low, medium, high]. we use the triangular shape has been selected due to its simplcity.</p>
          <p>Triangular Membership Function:
⎧⎪0,  &lt; 
⎪</p>
          <p>Triangular(, , , ) = ⎪⎪⎪⎪⎩⎪⎪⎨ 0−−−,− ,,  ≤ ≤&gt;  ≤ ≤</p>
          <p>The next step in the fuzzification process is the development of fuzzy rules.</p>
        </sec>
        <sec id="sec-3-2-3">
          <title>4.2.3. Inference engine</title>
          <p>The inference process is the mathematical operation used to determine the certainty degree of the
emergent behaviour being in each of the three levels considered .Mamdani [23] is a well-known fuzzy
logic method,fuzzy Mamdani is frequently used to create systems with reasoning that resembles human
intuition.</p>
        </sec>
        <sec id="sec-3-2-4">
          <title>4.2.4. Defuzzification</title>
          <p>After the inference process, the overall result is a fuzzy certainty value measuring the emergent
behaviour in each of the three levels (Low,Medium,High). This result must be defuzzied to obtain
a final crisp output.the commonly used defuzzification method is known as centroid.it finds a point
representing the center of gravity(COG)of the aggregated fuzzy set.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>5. First Result</title>
      <p>Our initial experiments for emergence identification are presented in this section. This is the Boids
model, or ABS model. As stated in section 4, we intend to take the following three actions. Initially, the
simulation should be run using only the "Separation" interaction. The intention is to stop a packing
behavior from developing. This is referred to as "normal behavior." In every iteration, we retrieve
interaction data from the simulation.</p>
      <p>In Figure 3 we have several grouping behaviours, in this case, we run the simulation with all Boids
rules. We retrieve the simulation data into an excel file using a Netlogo Spreadsheet extension.</p>
      <p>For simplifying the calculation : x/10
Sample Membership function is given below :</p>
      <p>Membership function equation for the separation variable is declared using equation (1), equation (2)
and equation (3).</p>
      <p>⎧⎪1,
⎪⎩0,
⎧⎪0,
⎪⎩1,
 Low[] = ⎨ 452− 0 , 25 ≤  &lt; 45
⎧ −1025 , 35 ≤  &lt; 45
⎪
 Medium[] = ⎨ 551− 0 , 45 ≤  &lt; 55
⎪⎩0,
 &lt; 35 atau  ≥ 55
(1)</p>
      <p>(2)
 High[] = ⎨ −2045 , 45 ≤  &lt; 65</p>
      <p>(3)</p>
    </sec>
    <sec id="sec-5">
      <title>6. Conclusion</title>
      <p>In recent years, the significance of emerging has increased.Emergence can happen in a range of systems
and be either positive or negative. As a result, we need a system that ofers a consistent technique for
evaluating and controlling such actions. In this paper, the usage of expert systems in conjunction with
ABS data was examined. We suggest a technique to identify flocking behavior in multi-agent systems
using a fuzzy expert system in order to solve this problem. The rules database is currently being tested
and expanded. We hope to evaluate our method with more sophisticated models on more ABS systems,
as the initial results are promising.</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgements</title>
      <p>The authors would like to thank the DGRSDT (General Directorate (General Directorate of
Scientific Research and Technological Development )-MESRS(Ministry of Higher Education and Scientific
Research),ALGERIA, for the financial support of LISCO Laboratory.</p>
    </sec>
    <sec id="sec-7">
      <title>Declaration on Generative AI</title>
      <p>The authors have not employed any Generative AI tools.
[3] A. Boukehila, N. Taleb, Case-based approach to detect emergence, in: Proceedings of the 2019 3rd</p>
      <p>International Conference on Big Data Research, 2019, pp. 98–102.
[4] S. Singh, et al., Detection and classification of emergent behaviors using multi-agent simulation
framework (wip), in: S. Mittal, J. L. R. Martin (Eds.), Proceedings of the Symposium on Modeling
and Simulation of Complexity in Intelligent, Adaptive and Autonomous Systems (MSCIAAS ’17),
Society for Computer Simulation International, San Diego, CA, USA, 2017, pp. Article 3, 8 pages.
[5] B. e. a. Fraser, Simulating the efect of degraded wireless communications on emergent behavior,
in: Winter Simulation Conference (WSC), 2017.
[6] L. R. Medsker, Hybrid intelligent systems, 2020.
[7] L. A. Zadeh, Fuzzy sets, Information and Control (1965) 338–353.
[8] D. Gupta, A. Ahlawat, Taxonomy of gum and usability prediction using gum multistage fuzzy
expert system, The International Arab Journal of Information Technology 16 (2019).
[9] K. F. Alam, T. Ahamed, Climate-adaptive potential crops selection in vulnerable agricultural lands
adjacent to the jamuna river basin of bangladesh using remote a fuzzy expert system, Remote
Sensing 15 (2023) 2201.
[10] A. Setiawan, K. Kusmaya, I. Abadi, E. Yulianto, Expert system for diagnosing disease symptoms of
rice pests using the dempster shafer algorithm and fuzzy tsukamoto algorithm, Jurnal Sisfokom
(Sistem Informasi dan Komputer) 11 (2022) 407–414.
[11] L. O. Batista, V. S. ArauJo, Fuzzy neural networks to create an expert system for detecting attacks
by sql injection, The International Journal of Forensic Computer Science (2018).
[12] R. Nourian, S. M. Mousavi, S. Raissi, A fuzzy expert system for mitigation of risks and efective
control of gas pressure reduction stations with a real application, Journal of Loss Prevention in
the Process Industries 59 (2019) 77–90.
[13] R. Boadh, R. Grover, M. Dahiya, A. Kumar, Study of fuzzy expert system for the diagnosis of
various types of cancer, Materials Today: Proceedings 56 (2022) 298–307.
[14] J. Tang, X. Liu, W. Wang, Covid-19 medical waste transportation risk evaluation integrating
type-2 fuzzy total interpretive structural modeling and bayesian network, Expert Systems with
Applications 213 (2023) 118885.
[15] R. Gore, P. J. Reynolds, An exploration-based taxonomy for emergent behaviour analysis in
simulations, in: Proceedings of the 2007 Winter Simulation Conference, 2007.
[16] C. C. Chen, S. B. Nagl, C. D. Clack, Complexity and emergence in engineering systems, Complex</p>
      <p>Systems in Knowledge-based Environments: Theory, Models and Applications 168 (2009) 99–128.
[17] O. Arsene, I. Dumitrache, I. Mihu, Expert system for medicine diagnosis using software agents,</p>
      <p>Expert Systems with Applications 42 (2015) 1825–1834.
[18] A. K. Seth, Measuring emergence via nonlinear granger causality, Artificial Life XI 324 (2008)
545–552.
[19] M. Randles, H. Zhu, M. Taleb-Bendiab, A formal approach to the engineering of emergence and
its recurrence, in: Proceedings of the 2nd International Workshop on Engineering Emergence in
Decentralized Autonomic Systems, 2007.
[20] A. Boukehila, N. Taleb, Y. Benazzouz, Interactions-based method to detect emergent behavior in
ongoing simulations, International Journal of Modeling, Simulation, and Scientific Computing 12
(2021) 2150022.
[21] C. W. Reynolds, Flocks, herds and schools: A distributed behavioral model, ACM SIGGRAPH
computer graphics 21 (1987) 25–34.
[22] C. Wang, A Study of Membership Functions on Mamdani-Type Fuzzy Inference System for</p>
      <p>Industrial Decision-Making, Ph.D. thesis, Theses and Dissertations, 2015.
[23] I. Iancu, A mamdani type fuzzy logic controller (????).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>J.</given-names>
            <surname>Fromm</surname>
          </string-name>
          , Types and forms of emergence,
          <source>Complexity Digest</source>
          <volume>25</volume>
          (
          <year>2005</year>
          ). [2]
          <string-name>
            <given-names>M.</given-names>
            <surname>Bedau</surname>
          </string-name>
          , Weak emergence, Blackwell Publishers,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>