=Paper= {{Paper |id=Vol-2472/p2 |storemode=property |title=Takagi–Sugeno fuzzy systems as a method of acting opponents in games |pdfUrl=https://ceur-ws.org/Vol-2472/p2.pdf |volume=Vol-2472 |authors=Karolina Kesik }} ==Takagi–Sugeno fuzzy systems as a method of acting opponents in games== https://ceur-ws.org/Vol-2472/p2.pdf
Takagi–Sugeno fuzzy systems as a method of acting
              opponents in games
                                                                Karolina K˛esik
                                                          Institute of Mathematics
                                                     Silesian University of Technology
                                                   Kaszubska 23, 44-100 Gliwice, Poland
                                                       Email: karola.ksk@gmail.com


   Abstract—Controlling a hero in 2D or 3D games can occur on                   networks and tree searching were used to obtain impressive
different rules. To increase the level of gameplay, there are objects           results. A year later, the authors presented a learning algorithm
in the entire game with which the player can interact. Such                     without the need for knowledge given by programmers [6].
an action is quite often implemented using artificial intelligence,
which has been growing in recent years. In this paper, we propose               Again in [7], the authors presented idea to train deep neural
using a model of a fuzzy system to move objects in the games.                   networks to play othello ie a game on a board with 64 fields
Movement takes place on the principle of moving between two                     and black and white verticals. An interesting idea is to extract
points, where the first one is the player’s position and the second             knowledge from how others play the game [8], or using the
is destination point. The paper presents the mathematical model                 idea of games in other areas, such as medicine. An example
of the Takagi–Sugeno system and tests for the correctness of the
movement.                                                                       is creating decision systems using game theory and rough sets
                                                                                [9].
                         I. I NTRODUCTION                                          The idea of multi-agents and collective using many objects
   The field of artificial intelligence is developing rapidly,                  is a frequent use in games. The results of research on this
which is visible in various applications around us. Especially                  topic are presented in [10], [11] using fuzzy logic. This field
in devices of the Internet of Things, whose times are coming                    of science can also be used in solving various problems [12],
thanks to the 5G network. Enabling communication between a                      [13].
huge number of devices results in acquiring and generating a
                                                                                                      II. F UZZY LOGIC
large amount of digital information. This information must be
processed so that it can be forwarded or take some decisions                      Fuzzy logic was proposed by L. A. Zadeh in 1965, where
based on it. More often, such problems are solved using                         unlike classical sets, partial membership is allowed [14]. So
artificial intelligence (AI) techniques.                                        the sets can be described using the adaptation function
   In practice, almost everyone uses a smartphone, on which
various applications are installed. Especially often of these                                          µA : X → [0, 1].                      (1)
applications are games that use AI methods. Their practical
                                                                                Fuzzy set A on space X can also be described by a set
use is based on the movement of opponents or the genera-
                                                                                of ordered pairs (x, µA (x)), where µA (x) is the degree of
tion of boards/environment. The movement can be simulated
                                                                                ownership of the x object to the fuzzy set A
using various tools such as artificial neural networks, fuzzy
controllers and heuristic algorithms. In this paper, we show                                A = {(x, µA (x)); x ∈ X, µA ∈ [0, 1]}.           (2)
the simple use of the Takagi-Sugeno system to simulate the
movement of objects.                                                            Zadeh suggested another notation for fuzzy sets. For the
                                                                                discrete space X, we have
A. Related works                                                                                          X
   Heuristic methods are used only to simulate player action                                        A=      µA (x)/x                 (3)
[1], but also to create a game environment. An example is the                                               x∈X

creation of labyrinths [2]. The same algorithms can be used                     Again, for continuous space X
for play-testing in various games, especially in card ones [3].                                           Z
Quite often, there is a need for the opponent’s intelligence to                                      A=      µA (x)/x                        (4)
be trained. This is a popular situation with games that have                                                 X
large amounts of different rules, such as chess [4] or go [5].
                                                                                  These markings should be treated as the sum of elements x
The second of these games is much more difficult, which made
                                                                                having a degree of belonging µA (x). Mark / should be treated
training AI quite problematic. In [6] deep learning of neural
                                                                                as a separator.
  c 2019 for this paper by its authors. Use permitted under Creative Com-         The most commonly used affiliation functions that describe
mons License Attribution 4.0 International (CC BY 4.0).                         the sets are as follows



                                                                            5
  •   triangular                                                      variables of the system into the values of its output variables.
                                 0,      x ≤ a,
                               
                                 x−a
                               
                               
                               
                               
                                      , a < x ≤ b,
             µA (x; a, b, c) =   b−a                ,       (5)
                                 c − x
                               
                                      , b < x ≤ c,
                                c−b
                               
                               
                                 0,      x>c
      where a, b, c are parameters (a ≤ b ≤ c).
  •   Gaussian
                                       (x−m)2
                      µA (x; m, σ) = e− 2σ2 ,               (6)
    where m, σ are parameters. For x = m, this function
    assumes the value 1 and the parameter σ > 0 determines
    the width of the fuzzy set.
  • inverse trapezoid
                               
                                b − x a < x ≤ b,
                               
                                b−a
                               
          µA (x; a, b, c, d) =   0     b < x ≤ c, , (7)
                               
                                x−c
                               
                                      c