<!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>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Dep. Ingenier a del Software e Inteligencia Arti cial Universidad Complutense de Madrid</institution>
          ,
          <country country="ES">Spain</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Dynamic di culty adjustment (DDA) in video games context allows a game to be automatically adjusted and customized based on the player's performance. Our goal is to build a DDA architecture able to learn from behavioral data and return appropriate feedback to maximize the player's performance and enjoyment. For our experiments, we use Tetris Analytics video game, which is like a traditional Tetris from the player's point of view. However, it allows us to extract data from the games such as the movements made by the player, the state of the board, next piece, etc. With this data, we predict the player's pro le and personalize the game.</p>
      </abstract>
      <kwd-group>
        <kwd>Dynamic Di culty Adjustment Time Series Video games Tetris Case-based Reasoning K-Nearest Neighbor</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        A majority of the game content is static and created during the development
phase of video game production. Game designers attempt to make game content
that is challenging but not overly di cult for the average player in the target
audience. For this reason, feedback from players is essential to help game designers
to distinguish from an exceedingly di cult task to a great challenge [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
Computer games need to provide appropriate responses to changing circumstances
and perform complex behaviors in realistic environments [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Mainly to keep
players engaged, happy, and playing the game more and buying more games by
the company. Games require a certain level of \intelligence" to remove the need
to expensive and time-consuming manual editing of game di culty by game
designers. It also helps players that fall outside of the \average" to still have fun.
And on top of that, it ensures a more \life-long" consistency to the di culty so
that the game will keep changing over-time to maintain the perfect challenge.
      </p>
    </sec>
    <sec id="sec-2">
      <title>Objectives</title>
      <sec id="sec-2-1">
        <title>General Objectives</title>
        <p>
          Dynamic Di culty Adjustment is a new subject compared to other application
areas in the eld of video games. It can be used to automatically alter the game's
di culty to meet the player's expectations [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. It is complex to know the skill
level of a player with one decision. Therefore we use time series, where we can
analyze the evolution of the player in a time frame. We also employ CBR because
it works with little data. It is a simple technique to explain since it works with
experience. And in case there is a lack of knowledge in the experience data, then
the addition of expert knowledge domain complements it.
        </p>
        <p>Our research focuses on using Theory of Flow, DDA, CBR and time series in
video game context to create a DDA architecture that improves the experience
of the player by adapting the game to the level where it is challenging but not
overwhelming.
2.2</p>
        <p>Speci c Objectives
{ Review DDA state of the art in video game context.
{ Evaluate novel techniques for the categorization of behavioral data.
{ Use time series to identify the evolution of a player in a speci c time range.
{ Use categorization techniques for player pro le prediction.
{ Review The Theory of Flow and its application in video game context.
{ Implementation of DDA in real game.
{ Execute experiments to analyze DDA efect in players' experience.
{ Create DDA architecture that allows abstraction of the fundamental
processes for game adaptation.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Research Plan</title>
      <p>The planning of our research divides into three stages. The rst stage focuses
on the review of the state of the art and application of knowledge acquired in
a simple video game called Tetris Analytics. This stage takes place in the rst
two years, and it is complete. The highlighted activities of this phase are the
following:
{ Review of the state of the art of machine learning techniques.
{ Review of techniques applied in video games for players categorization and
prediction of their skill level.
{ Perform experiments of player classi cation and dynamic di culty
adjustment based on user interaction in TetrisAnalytics using the techniques
reviewed previously.
{ Compare performance of evaluated techniques.
{ Publication of ndings.</p>
      <p>The second stage focuses on the establishment of a methodology for players
categorization and dynamic di culty adjustment based on user behavior in video
games. This stage is partially completed and must nish next year. The main
activities are:
{ Establish general processes used in Tetris Analytics that can use in other
games.
{ Establishment of a methodology for a player's categorization and dynamic
di culty adjustment in video games.
{ Publication of ndings.</p>
      <p>The third stage focuses on the application of our ndings in a more
sophisticated video game. This stage should nish within two years, and we have not
started yet. The main activities of this stage are:
{ Conducting experiments with a more complex game for players
categorization and dynamic di culty adjustment based on user interaction.
{ Veri cation of methodology.
{ Publication of ndings.
{ Writing the thesis.</p>
      <p>{ Preparation and presentation of the thesis.
4
4.1</p>
    </sec>
    <sec id="sec-4">
      <title>Current Research State</title>
      <sec id="sec-4-1">
        <title>Tetris Analytics</title>
        <p>We used Tetris Analytics, a version of Tetris implemented in Java by a member
of our research group. Our Tetris game looks like the original one for the player
point of view but internally provides extra functionality to extract, store, and
reproduce game traces. Tetris is a widely known game, where the di culty is
always rising, so it is easier to evaluate the stress level of a player, and it is a
simple game to adjust. Therefore we can extract behavioral data, select the most
signi cant features to characterize the playing style of each player, determine
their skill level, and dynamically adjust the di culty of the game.</p>
        <p>Each time a new piece appears on the top of the board, players have to make
two di erent decisions. The rst one, the tactical decision is to select where to
settle the piece. The second decision involves all the moves (translations and
rotations) required to lead the piece to that nal location. We only consider the
tactical decisions to de ne the skill level of the player, but we are aware that we
could also extract valuable information from the concrete moves.
4.2</p>
      </sec>
      <sec id="sec-4-2">
        <title>Player Pro le and Cases</title>
        <p>
          We used clustering to analyze data extracted from TetrisAnalytics. My work
on this resulted in a publication at The Florida Arti cial Intelligence Research
Society [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. From these experiments, we were able to determine 3 player pro les
and their score ranges:
{ Newbie players score between 0 to 2999
{ Average players score between 3000 to 5499
{ Expert players score 5500 or more
Then, we notice that it was di cult to predict players' pro les during gameplay
by analyzing individual tactical decision. It was better to analyze the evolution
of the player in a time range. So, we started to group tactical decision and use
CBR to nd the most similar case in the case base of past games [
          <xref ref-type="bibr" rid="ref3 ref4">3,4</xref>
          ]. We tried
di erent ways to create our case base and found that the most e ective approach
is to take ten consecutive tactical decision. Each case contains the following data:
{ Time or number of the piece falling through the board.
{ Time series with the evolution of the score.
{ Time series with the evolution of the total empty space on the board.
{ Time series with the evolution of the maximum height reached by any piece
on the board.
{ Player pro le or skill level.
        </p>
        <p>{ Flow level: a score describing how good the game was for the player.
Note that the game computes the last two features once it nishes. After a game
ends, we asked the player on how was their experience during the game. The
ow level was a score given by the player on a Likert scale of 5 values.</p>
        <p>To calculate player pro le during gameplay, we use a query case Q describing
the evolution of the variables during the last ten tactical decision and use a
K-Nearest Neighbor classi er (k-NN) algorithm to get similar cases from our
general case base. The similarity between the two cases is the linear combination
of the similarities between their time series. We use a simple similarity measure
based on the Euclidean distance to compare time series. The similarity function
only considers cases that have the same time range in previous games. Each time
series has a weight or importance. The most signi cant time series is the score
(70%), followed by the number of holes in the game board (25%) and nally the
max pieces' height (5%).</p>
        <p>A majority vote decides the current player's pro le among the k most similar
cases. To avoid extreme pro le changes, we use an inertia function that eases the
transition from newbie to expert and vice versa. Every time the game predicts
the player's pro le, the inertia function is applied, and it compares the current
player pro le with the new one.
4.3</p>
      </sec>
      <sec id="sec-4-3">
        <title>Best Next Piece</title>
        <p>To select an excellent piece for the player, we compute all possible ways to place
each type of piece and use a heuristic to decide how good those likely future
boards are. The heuristic tries to maximize the score (i.e., complete newlines)
and minimize the number of holes and height of the board. Then we assign to
each piece the rating of the best game board that can be reached placing the
piece optimally. Finally, we randomly choose one of the three best options and
use it as the next game piece. Now, we only worry about making the game more
relaxed, but it is in our plan also to make it harder for more experienced players.
Now, we are working on the second stage of the research plan, trying to extract
the main processes from dynamic di culty adjustment in Tetris Analytics and
create a DDA system architecture. Ideally, from this architecture, we will create
an abstraction of the processes involved in dynamically adjusting a game.</p>
        <p>
          Each user has a di erent way of playing, performance level and thoughts
in what would be a game that he would enjoy to the fullest. The idea is to
create a stress level that maximize the user experience during gameplay. For
this purpose, we create a user experience ow that takes advantage of dynamic
di culty adjustment bene ts. In Tetris Analytics we change the game by giving
the best next piece that helps the player make lines [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ], we use a case base that
help us determine if the player needs help and which would be the best next
piece according to their performance.
        </p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Charles</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kerr</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>McNeill</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>McAlister</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Black</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kcklich</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Moore</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stringer</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Player-centred game design: Player modelling and adaptive digital games</article-title>
          .
          <source>In: Proceedings of the digital games research conference</source>
          . vol.
          <volume>285</volume>
          , p.
          <volume>00100</volume>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Jennings-Teats</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Smith</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wardrip-Fruin</surname>
          </string-name>
          , N.:
          <article-title>Polymorph: dynamic di culty adjustment through level generation</article-title>
          .
          <source>In: Proceedings of the 2010 Workshop on Procedural Content Generation in Games</source>
          . p.
          <fpage>11</fpage>
          .
          <string-name>
            <surname>ACM</surname>
          </string-name>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Lora</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sanchez-Ruiz</surname>
            ,
            <given-names>A.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gonzalez-Calero</surname>
            ,
            <given-names>P.A.</given-names>
          </string-name>
          :
          <article-title>Di culty adjustment in tetris with time series (</article-title>
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Lora</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sanchez-Ruiz</surname>
            ,
            <given-names>A.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gonzalez-Calero</surname>
            ,
            <given-names>P.A.</given-names>
          </string-name>
          :
          <article-title>Time series and case-based reasoning for an intelligent tetris game</article-title>
          .
          <source>In: International Conference on Case-Based Reasoning</source>
          . pp.
          <volume>185</volume>
          {
          <fpage>199</fpage>
          . Springer (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Lora</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sanchez-Ruiz</surname>
            ,
            <given-names>A.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gonzalez-Calero</surname>
            ,
            <given-names>P.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gomez-Mart n</surname>
          </string-name>
          , M.A.:
          <article-title>Dynamic di culty adjustment in tetris (</article-title>
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Pagulayan</surname>
            ,
            <given-names>R.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Keeker</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wixon</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Romero</surname>
            ,
            <given-names>R.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fuller</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>User-centered design in games</article-title>
          . CRC Press Boca Raton, FL (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>