<!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>On the impact of sensors update in declarative AI for videogames</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Denise Angilica</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giorgio Michele De Giorgio</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giovambattista Ianni</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Calabria</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Declarative methods such as Answer Set Programming show potential in cutting down development costs in commercial videogames and real-time applications in general. Sensors update is one of the major bottlenecks preventing their adoption in such dynamic domains. In this work we show a new optimized approach for the sensors update cycle deployed in our ThinkEngine, a framework in which a tight integration of declarative formalisms within the typical game development workflow is made possible in the context of the Unity game engine. ThinkEngine allows to wire declarative AI modules to the game logic and to move the computational load of reasoning tasks outside the main game loop using an hybrid deliberative/reactive architecture. In this paper, we discuss the crucial role of the sensors update cycle in the run-time performance of our framework and then we propose a new, optimized, sensors update workflow. After describing the new approach, we report about performance improvements.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Answer Set Programming</kwd>
        <kwd>Declarative Methods</kwd>
        <kwd>Game Design</kwd>
        <kwd>Knowledge Representation and Reasoning</kwd>
        <kwd>Unity</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        The interest of the videogame industry in AI research is not new, both whether we are talking
of inductive/machine learning-based techniques or knowledge-based, deductive techniques [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
In this respect, declarative methods show potential benefits, like enabling the possibility of
specifying parts of the game logic in a few lines of high-level statements. Possible applications
range from defining the general game logic, to describing non-player characters, programming
tactic and/or strategic credible AI behaviors, to expressing path planning desiderata, non-player
resource management policies and so on.
      </p>
      <p>
        Many examples of the usage of declarative languages in the industrial videogame realm
exist, starting from the pioneer F.E.A.R. game [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], which used STRIPS-based planning [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
Other remarkable examples are the games Halo [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] and Black &amp; White [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. If we look at
videogames from the basic research perspective, it must be noted the longstanding interest in
using (video)games as a controllable and reproducible setting in which to face open research
issues: one might cite the GDL [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], VGDL [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] and Ludocore [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] which are languages adopted for
declaratively describing General Game Playing [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. The Planning Domain Definition Language
(PDDL) found natural usage in the videogame realm [
        <xref ref-type="bibr" rid="ref10 ref11 ref12">10, 11, 12</xref>
        ]; among its sister languages,
we will herein focus particularly on Answer Set Programming (ASP), the known declarative
paradigm with a tradition in modeling planning problems, robotics, computational biology as
well as other industrial applications [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. ASP does not come last in its experimental usage in
videogames: it has been used to various extents, e.g., for declaratively generating level maps [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]
and artificial architectural buildings [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]; it has been used as an alternative for specifying general
game playing [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ], for defining artificial players [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] in the Angry Birds AI competition [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ], and
for modelling resource production in real-time strategy games [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ], to cite a few. Despite this
potential, however, performance and integration shortcomings are still a limit to the widespread
adoption of declarative methods in professional videogames: ASP makes no exception in this
respect.
      </p>
      <p>
        Two aspects are of concern: i) integration, i.e., the ease of wiring declarative modules with
other standard parts of the game implementation, and ii) performance in real-time contexts.
Concerning the first issue, we build on our recent proposal of ThinkEngine [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ], a tool working
in the known Unity game engine [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ], which allows wiring declaratively-programmed Brains
to videogame implementations.
      </p>
      <p>As for the performance issues, first recall that an ASP solver works by taking in input some
declarative specification , a description  of the input problem at hand and produces output
answer sets, which encode a description of possible solutions to the input  ∪ .</p>
      <p>
        It is known that ASP solvers do not exhibit an acceptable performance for fast-paced and
repeated evaluation. With this in mind, we already moved some steps forward by equipping
our ThinkEngine with the Incremental-DLV2 solver [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ] that allows for faster and incremental
answer sets generation in a variety of domains. However, since the game-world is dynamic,
there is the need to collect game’s information and translate it in logical assertions to be fed
in input to the solver: the impact of this job should not be underestimated as it can be as time
consuming as answer set generation, if not properly implemented.
      </p>
      <p>
        In this paper, after briefly presenting the features of the ThinkEngine system, we show a new
approach for implementing the sensing update cycle based on a new sensor update workflow and
we report about experiments on the new ThinkEngine version, compared with its older version
whose performance was badly afected by the previous sensor update cycle implementation.
2. ThinkEngine overview
ThinkEngine [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ] is a system allowing to integrate declarative-based reasoning modules in a
videogame or any other kind of software developed in Unity [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. Unity is a reference
crossplatform game engine primarily used to develop videogames and simulations for more than 20
diferent platforms like mobile, computers, and consoles [23].
      </p>
      <p>In Unity the game-world’s objects are called GameObject (GO) and their behavior is defined
by enriching them with Components that are scripts encoding specific aspects of GOs. The
main elements of ThinkEngine are the so called Brains. Brains can be attached at will to game
characters, they can drive parts of the game logic, and can be used in general for delivering AI
at the tactical or strategic level within the game at hand.</p>
      <p>
        One can have planner brains or reactive brains, which respectively make diferent types of
decisions: deliberative ones (i.e., plans), which, in the terminology of our ThinkEngine, are
sequences of actions to be executed in a programmable order, or reactive decisions which can
have an immediate impact on the game scene. Plans work in the spirit of the Goal Oriented
Action Planning methodology (GOAP), a popular way of deploying academic planning in
the realm of videogames since its introduction in F.E.A.R. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Multiple planner brains can
be prioritized to control the same character, thus introducing a form of multiple-behavior
programming. Moreover, as game environments are subject to fast changes, one can program
the appropriate plan aborting logic.
      </p>
      <p>ThinkEngine has been developed having the integration of declarative ASP modules in mind,
but other types of automated reasoning can be in principle wired (e.g., PDDL), by writing the
appropriate glue code. ASP specifications are composed of set of rules, hard and soft constraints,
by means of which it is possible to express qualitative and quantitative statements. In general, a
set of input values  (called facts), describing the current state of the world, are fed together
with an ASP specification  to a solver. Solvers in turn produce sets of outputs ( ∪  )
called answer sets. Answer sets contain the result of a decision-making process expressed in
terms of logical assertions. These, depending on the application domain at hand, might encode
actions to be made, employee shifts to be scheduled, protein sequences, and so on.</p>
      <p>ThinkEngine is integrated in the Unity game engine both at design-time and at run-time. At
design-time, one can add, wire and program brains in the game editor. A brain can be wired
to sensor inputs, and one can decide where a brain acts on the game by connecting actuators
or defining plan actions. Sensor values can be aggregated within a time window according
to a policy of choice (like max, min, average, oldest or newest value), while Triggers can be
defined to program when brain reasoning activities must take place at run-time. Brains can
be embedded in reusable objects, called prefabs in the Unity terminology. At run-time, most
of the game runs in the usual single-threaded game loop [24], while brain reasoning tasks are
ofloaded to separate threads. An information-passing layer allows communication between
brains and the main game loop. In this latter, a sensor update cycle periodically refreshes sensor
readings. Inputs (i.e., sensor readings) and outputs (i.e. actuator values or plans) of brains are
bidirectionally converted to/from the ASP-Core2 format [25], according to a properly defined
mapping discipline between the game world data and ASP logic assertions.</p>
    </sec>
    <sec id="sec-2">
      <title>3. The sensors update cycle</title>
      <p>Sensors play a crucial role in various domains where the collection of real-time data is essential
for decision-making, monitoring, and control. There are several domains where real-time sensor
readings are crucial such as healthcare, robotics, gaming, sports, home automation, and more.
Sensor technology continues to evolve, enabling new applications and driving advancements in
various industries.</p>
      <p>The continuous reading of data structures in order to check if values have changed in a
time-critical manner poses several challenges and requires avoiding some drawbacks. There are
Unity</p>
      <p>Brains
Mapping
Decision
Appliers</p>
      <p>ACT</p>
      <p>Knowledge
ASP Solver</p>
      <p>THINK
a number of issues associated with the process, especially concerning performance impact and
resource utilization.</p>
      <p>An informed decision-making reasoning task requires the availability of up-to-date and
comprehensive sensor values. In this respect, a fruitful enactment of ASP within a highly
dynamic environment cannot ignore this fundamental aspect. Let us assume sensor readings
are modeled as a pool of propositional facts  .  should fairly reflect the latest readings from
the game scene before being fed as input to the solver of choice.</p>
      <p>One can implement the sensors update cycle basically in two distinct ways. Let us assume
a sensor collector node  keeps track of the latest readings  of a set of sensors: i) with a
push approach, sensors notify pro-actively  of their changes, and  keeps track of the
update; ii) in the pull approach,  cyclically reads data from the pool of sensors in order
to detect possible changes. Clearly, in the pull approach,  must have an active role and is
subject to a heavier computational load; with the push approach, some computational load is
shifted to the remote sensing nodes. The implementation of a push methodology is however
not straightforward, and some care must be given in order to avoid that  is flooded with
notifications for even the slightest change: this is especially important when sensors range over
continuous values.</p>
      <p>It must be however noted that in simulated environments deployed within a single computing
node, the shift of computational load towards remote sensing nodes is mostly fictitious. In
the specific case of game engines, one has to recall that the game scene data structures are
accessible only within the single-threaded game loop. The Unity game engine does not make
an exception in this respect.</p>
      <p>Furthermore, although feasible in principle, the push approach would put a further burden
on game designers. Indeed, to achieve a push-based update cycle, game designers would have
to modify their existing implementation by enriching it with notification glue code attached to
all the property values to be sensed. This approach does not fit the spirit of ThinkEngine whose
goal is to reduce to the bare minimum the efort required to game designers.</p>
      <p>We thus opted for a pull-based approach, which led to our old implementation ( in the
following).  made use of a reflection layer that, at run-time, would navigate object properties
and retrieve the sensor information to be passed to the reasoning layer [26]. In the next section,
we will overview the role of run-time reflection in this process, and we will introduce the new
approach  where the usage of reflection is moved at design-time, thus reducing the time
required to pull data at each iteration.
4. Improving sensors performance of ThinkEngine
In previous versions of ThinkEngine, the Sensors module consisted mainly of four interacting
classes:
• SensorConfiguration . This class inherits from MonoBehaviour, the class used in Unity
for defining Components of GOs. When designers want to observe the properties of a
given game object , they need to add a SensorConfiguration to it. Properties of
interest in the  can be selected and added to the SensorConfiguration. When a
property is selected as a sensor, an aggregation function can be chosen, which is applied
to the sequence of the last recorded values for the sensor at hand (default is 200). The
aggregation function options include maximum, minimum, average, oldest, and newest
values.
• MonoBehaviourSensorsManager. An instance of this class is automatically added when
the designer inserts a SensorConfiguration and is meant to handle the instantiation
of sensors at run-time. For each SensorConfiguration and each property, this class
instantiates a single sensor for basic type properties. For complex data structures, such as
lists, the number of instantiated sensors matches the number of elements in the collection.
In the latter case, it is dynamically checked whether the size of the data structure has
changed at run-time. Whenever the data structure increases in size, new sensors are
instantiated, while the removal of elements causes the destruction of the homologue
unused sensors.
• Sensor. A sensor is an object associated with a single property or an element of a data
structure. Currently, ThinkEngine supports basic types such as integers and booleans,
and some data structures such as lists and one-dimensional and two-dimensional arrays.
• SensorsManager. A singleton instance of this class performs the sensor update cycle at
run-time. This cycle involves the following operations: for a given sensor  attached
on a property  (1) its value is updated (UpdateValue), (2) it is checked whether the
corresponding MonoBehaviourSensorsManager should instantiate or delete sensors
(Manage), and (3)  is serialized to a string value in the format of a logic assertion for the
ASP solver (Map).</p>
      <p>In the  implementation, all the instantiation, management and update steps use reflection
techniques [27] to achieve their goals. Recall that in object-oriented programming reflection
refers to the ability of a program to examine and modify its own structure and behavior at
runtime. In a sense, reflection corresponds to higher-order reasoning and reification in logic.
For instance, by means of reflection, one can list and modify properties and methods of a given
object at run-time, although this capability comes at the price of slower access to data structures.</p>
      <p>In order to give an idea of the actual update process, let GO be a game object of interest for
the AI module, let C be a component of GO, let Obj be a property of C and list a property of
Obj pointing to a list of integers . At run-time, the property retrieving process would work
as described in Algorithm 1. This process must be repeated each time that an instantiation
(Algorithm 2) or manage (Algorithm 3) or update (Algorithm 4) operation has to be performed.
Indeed, throughout the game, the value of properties can change at any level of the hierarchy.
In the three latter algorithms, SC is a Sensor Configuration associated with GO. Elements in
SC.PropertyNames point to all the properties relevant for the AI module. Each element is a list
of strings, each -th element corresponding to the name of a property at the -th level of the
hierarchy. The serialization operation of the sensor values, i.e. the final translation in logical
assertions, does not need to retrieve the coordinates of the property at hand since all the needed
information, at that point, is stored in the sensor.</p>
      <p>Algorithm 1 Property Retrieval
1: Input: {}
2: Output: Property 
3:  = .RetrieveComponentByName();
4: if  is not null then
5:  1 = .Type().GetPropertyByName();
6: if  1 is not null then
7:  =  1.Type().GetPropertyByName();
8: return 
9: end if
10: end if
Algorithm 2 Sensors Instantiation
1: Input: List of property names . 
2: Output: {}
3:   = .PropertyNames
4: while   is not empty do
5:  =  .Pop()
6:  1 = RetrieveProperty( )
7: if  1 is not null then
8:  = GetMapper( 1.Type())
9: .Instantiate( 1)
10: end if
11: end while
Algorithm 3 Sensors Management
1: Input: List of property names .  
2: Output: {}
3:   = .PropertyNames
4: while   is not empty do
5:  =  .Pop()
6:  1 = RetrieveProperty( )
7: if  1.size &gt; OldSize( 1) then
8:   = GetMapper( 1.Type())
9:  .InstantiateNewSensors( 1)
10: end if
11: end while
Algorithm 4 Sensors Update
1: Input: List of property names .  
2: Output: {}
3:   = .PropertyNames
4: while   is not empty do
5:  =  .Pop()
6:  1 = RetrieveProperty( )
7:   = GetMapper( 1.Type())
8:  .UpdateSensors( 1)
9: end while</p>
      <p>
        In order to overcome performance impact issues, in a previous version of ThinkEngine [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ] we
introduced a workload balancing strategy by distributing the whole update cycle (comprising
both the management step and the update step for each given sensor) over a number of frames.
This strategy is efective in spreading the computational load of the update cycle over longer
intervals of time. However, it is implied some aging of older sensor readings and it afects the
responsiveness of Brains. These have to wait for a full update cycle before being triggered. The
culprit of this loss of performance is mainly due to the heavy usage of reflection at run-time.
      </p>
      <p>We thus opted for shifting the operations of reflection to design-time by providing the
ability to generate and compile ad-hoc run-time scripts for each target property. In other words,
Algorithm 1 is now executed at design-time and it is used in an iterative algorithm that generates
reflection-independent scripts to be executed at run-time. Each of these scripts is tailored to
a specific property  so that at run-time all information about  itself is available without
navigating the property tree. The impact on the designer’s efort is limited to prompting a code
generation task via Unity’s GUI.</p>
      <p>Given a property  , its sensor script generation process is as follows: first, we retrieve via
reflection the features of  by navigating the property hierarchy of the GO that  belongs to.
In particular, depending on the type  of  , we find the appropriate IDataMapper. The code
of a specific IDataMapper implements the serialization strategy transforming an instance of
type  into a set of logical assertions in ASP syntax.</p>
      <p>Once this information is collected, we dynamically generate some code to be compiled and
used at runtime using a template class that is completed in its parametric parts. The generated
sensor class inherits from an abstract class called Sensor and, therefore, implements three
• The Initialize method is responsible for initializing the sensor’s data structures;
• The Update method, called every frame, in the same way as , performs both the
UpdateValue and Manage operations. In , the target property was visited twice: once
to determine if multiple sensors needed instantiation for complex properties like lists or
arrays, and again to observe the actual new value of the property. In  , everything is
done in a single pass within the Update method of the Sensor object. Additionally, there
is no longer a need to instantiate a sensor for data structures. Each sensor, if required
by the property type, has data structures that can dynamically accommodate a variable
number of information, which can change at run-time;
• The Map method returns a string representing the fact(s) for this sensor to pass as input
to the ASP solver.</p>
      <p>These methods collectively handle the update and mapping of the sensor’s data, providing
the necessary functionality for integrating the sensor with ThinkEngine.</p>
    </sec>
    <sec id="sec-3">
      <title>5. Experiments</title>
      <p>We conducted experiments on  and  in order to assess performance improvements and
identify strengths and weaknesses. Given the particular setting in which ThinkEngine works,
we devised a proper data collection experimental setting as described in Figure 3.</p>
      <p>First of all, we are interested in recording frame durations for a given test that is run in an
experimental game scene. Intuitively, the shorter a frame cycle lasts, the higher framerate a
game can achieve. A test is run multiple times: in each run we increased the workload by adding
more sensors to the scene. This is repeated for a certain number of iterations or until the frame
rate dropped below a specific threshold.</p>
      <p>To ensure meaningful measurements and isolate the performance of just the sensor update,
we took further measures:
• The computational load of the sensor update cycle should be dominant compared to the
rest of the application. We thus avoided to add Brains or any other computationally heavy
objects in the scene;
• We started the test in a build of the application rather than through the Unity Editor.</p>
      <p>This avoids any interference from the Editor’s work that could afect the application’s
performance;
• Since the SensorsManager of  adaptively manages the workload of the update cycle,
we disabled it. I.e. during the experiments, the SensorsManager of  is forced to
perform updates for all active sensors in the same frame.</p>
      <p>More in detail, the test procedure is as follows:
• Create a given number of GameObjects, each containing five sensors (i.e. we add a</p>
      <p>SensorConfiguration with five properties of interest);
• Suspend the experiment for a fixed amount of time, in order to avoid inaccurate transient
measurements;
• Begin recording the duration of a given number of frames;
• Save all the recorded durations to a text file;
• If the average duration falls below a certain threshold or a certain number of iterations is
reached, stop the experiment. Otherwise, repeat all the steps.</p>
      <p>The threshold for the average frame rate is set to terminate the experiment when the
performance deteriorates too much. Since the number of recorded frames is fixed, a very low
frame rate would result in a prohibitively long duration for the experiment. The suspension
of the experiment is done to avoid recording a transient performance impact caused by the
instantiation of GameObjects and writing to a file.</p>
      <p>Three experiments1 were conducted: i) the first one compared  and  on the same set of
parameters; ii) the second one aimed to determine how many sensors can be managed before
the performance becomes unacceptable with  ; iii) the third experiment focused on identifying
the bottlenecks in  .</p>
      <p>The performance of  is significantly better than the previous one (Figure 4). The new
version achieves a much higher average of frame per second (FPS) with the same number of
sensors, but it also scales much better when the number of sensors is increased. It must be noted
that  goes below the acceptable threshold of 60 FPS as soon as half a thousand of sensors are
added. In the second experiment we kept the setting of the first experiment but we tested 
only. It was possible to reach several thousand sensors before the test stopped when the lower
bound threshold of 60 FPS was reached.</p>
      <p>Additional information was sought regarding the behavior of  , specifically in order to
identify possible remaining bottlenecks in the update cycle. The third experiment was conducted
by measuring the computational cost of the Update method of the SensorsManager, and
comparing it with the additional work required to generate the mapping string. The results
indicate that a significant portion of the workload is attributed to the Map operation(Figure 6).
The serialization to logical facts made of strings results indeed in a considerable amount of
garbage generation, causing the Garbage Collector (GC) to work more frequently and for longer
periods, thus causing a faster decaying framerate.
1https://github.com/DeMaCS-UNICAL/ThinkEngine-Sensors-Performance-Experiments</p>
    </sec>
    <sec id="sec-4">
      <title>6. Conclusions</title>
      <p>While the videogame industry has long recognized the value of using games as controlled
environments for addressing open research issues, the integration and performance challenges
associated with declarative methods have hindered their widespread adoption. Our contribution
addresses these challenges by introducing the ThinkEngine system, a tool built on the Unity game
engine that facilitates the integration of declaratively-programmed "Brains" into videogame
implementations. This system has demonstrated improved performance over previous iterations,
overcoming limitations associated with the sensor update cycle.</p>
      <p>Our experiments have shown that the new implementation of the sensing update workflow
in ThinkEngine outperforms its predecessor in all aspects. By leveraging a new approach to
collecting and translating game information into logical assertions for the ASP solver, we have
significantly reduced the time required for producing action to be executed. This improvement
enhances the real-time capabilities of ThinkEngine, making it a more practical and eficient
solution for incorporating declarative methods into professional videogames.</p>
      <p>The results of our study highlight the increasing potential for declarative methods in the
videogame industry. Future work can focus on further optimizing performance, expanding the
range of declarative functionalities, and exploring additional applications of ThinkEngine in
diferent types of videogames.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgments</title>
      <p>This work was partially supported by: the PNRR MUR project PE0000013-FAIR, Spoke 9 -
Greenaware AI – WP9.1; the project “Declarative Reasoning over Streams” (CUP H24I17000080001) –
PRIN 2017 and by the LAIA laboratory (part of the SILA laboratory network at University of
Calabria).
Lecture Notes in Computer Science, Springer, 2023, pp. 96–106.
[23] F. Messaoudi, G. Simon, A. Ksentini, Dissecting games engines: The case of unity3d, in:</p>
      <p>NetGames, IEEE, 2015, pp. 1–6.
[24] Unity, order of execution for event functions, Last accessed March 2023. URL: https:
//docs.unity3d.com/Manual/ExecutionOrder.html.
[25] F. Calimeri, W. Faber, M. Gebser, G. Ianni, R. Kaminski, T. Krennwallner, N. Leone,
M. Maratea, F. Ricca, T. Schaub, ASP-Core-2 input language format, Theory Pract.</p>
      <p>Log. Program. 20 (2020) 294–309.
[26] D. Angilica, G. Ianni, et al., Tight integration of rule-based tools in game development, in:</p>
      <p>AI*IA, 2019.
[27] M. H. Ibrahim, Reflection in object-oriented programming, Int. J. Artif. Intell. Tools 1
(1992) 117–136.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>J.</given-names>
            <surname>Pfau</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. D.</given-names>
            <surname>Smeddinck</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Malaka</surname>
          </string-name>
          ,
          <article-title>The case for usable AI: what industry professionals make of academic AI in video games, in: CHI PLAY (Companion)</article-title>
          , ACM,
          <year>2020</year>
          , pp.
          <fpage>330</fpage>
          -
          <lpage>334</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J.</given-names>
            <surname>Orkin</surname>
          </string-name>
          ,
          <article-title>Three states and a plan: the AI of F</article-title>
          .E.A.R.,
          <source>in: Game Developers Conference</source>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>N.</given-names>
            <surname>Nilsson</surname>
          </string-name>
          ,
          <article-title>STRIPS planning systems</article-title>
          ,
          <source>Artificial Intelligence: A New Synthesis</source>
          (
          <year>1998</year>
          )
          <fpage>373</fpage>
          -
          <lpage>400</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Halo</surname>
          </string-name>
          ,
          <year>2001</year>
          . URL: https://www.xbox.com/en-US/games/halo.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Black &amp; White</surname>
          </string-name>
          ,
          <year>2001</year>
          . URL: https://www.ea.com/games/black-and
          <article-title>-white.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>M. R.</given-names>
            <surname>Genesereth</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Love</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Pell</surname>
          </string-name>
          ,
          <article-title>General game playing: Overview of the AAAI competition</article-title>
          ,
          <source>AI Mag</source>
          .
          <volume>26</volume>
          (
          <year>2005</year>
          )
          <fpage>62</fpage>
          -
          <lpage>72</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>T.</given-names>
            <surname>Schaul</surname>
          </string-name>
          ,
          <article-title>A video game description language for model-based or interactive learning</article-title>
          , in: CIG, IEEE,
          <year>2013</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>8</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>A. M.</given-names>
            <surname>Smith</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. J.</given-names>
            <surname>Nelson</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Mateas, LUDOCORE: A logical game engine for modeling videogames</article-title>
          , in: CIG, IEEE,
          <year>2010</year>
          , pp.
          <fpage>91</fpage>
          -
          <lpage>98</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>D. P.</given-names>
            <surname>Liebana</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Samothrakis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Togelius</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Schaul</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. M.</given-names>
            <surname>Lucas</surname>
          </string-name>
          ,
          <article-title>General video game AI: competition, challenges and opportunities</article-title>
          , in: AAAI,
          <year>2016</year>
          , pp.
          <fpage>4335</fpage>
          -
          <lpage>4337</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>O.</given-names>
            <surname>Bartheye</surname>
          </string-name>
          ,
          <string-name>
            <surname>E. Jacopin,</surname>
          </string-name>
          <article-title>A real-time PDDL-based planning component for video games</article-title>
          , in: AIIDE, The AAAI Press,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>J.</given-names>
            <surname>Robertson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. M.</given-names>
            <surname>Young</surname>
          </string-name>
          ,
          <article-title>The general mediation engine, Experimental AI in Games: Papers from the 2014 AIIDE Workshop</article-title>
          .
          <source>AAAI Technical Report WS-14-16</source>
          <volume>10</volume>
          (
          <year>2014</year>
          )
          <fpage>65</fpage>
          -
          <lpage>66</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>J.</given-names>
            <surname>Robertson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. M.</given-names>
            <surname>Young</surname>
          </string-name>
          ,
          <source>Automated gameplay generation from declarative world representations, in: AIIDE</source>
          , AAAI Press,
          <year>2015</year>
          , pp.
          <fpage>72</fpage>
          -
          <lpage>78</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>E.</given-names>
            <surname>Erdem</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Gelfond</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Leone</surname>
          </string-name>
          ,
          <article-title>Applications of answer set programming</article-title>
          ,
          <source>AI Mag</source>
          .
          <volume>37</volume>
          (
          <year>2016</year>
          )
          <fpage>53</fpage>
          -
          <lpage>68</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <surname>A. M. Smith</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Mateas</surname>
          </string-name>
          ,
          <article-title>Answer set programming for procedural content generation: A design space approach</article-title>
          ,
          <source>IEEE Trans. Comput. Intell. AI Games</source>
          <volume>3</volume>
          (
          <year>2011</year>
          )
          <fpage>187</fpage>
          -
          <lpage>200</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <surname>L. van Aanholt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Bidarra</surname>
          </string-name>
          ,
          <article-title>Declarative procedural generation of architecture with semantic architectural profiles</article-title>
          , in: CoG, IEEE,
          <year>2020</year>
          , pp.
          <fpage>351</fpage>
          -
          <lpage>358</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>M.</given-names>
            <surname>Thielscher</surname>
          </string-name>
          ,
          <article-title>Answer set programming for single-player games in general game playing</article-title>
          ,
          <source>in: ICLP</source>
          , volume
          <volume>5649</volume>
          <source>of LNCS</source>
          , Springer,
          <year>2009</year>
          , pp.
          <fpage>327</fpage>
          -
          <lpage>341</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>F.</given-names>
            <surname>Calimeri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Fink</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Germano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Humenberger</surname>
          </string-name>
          , G. Ianni,
          <string-name>
            <given-names>C.</given-names>
            <surname>Redl</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Stepanova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Tucci</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Wimmer</surname>
          </string-name>
          ,
          <article-title>Angry-hex: An artificial player for angry birds based on declarative knowledge bases</article-title>
          ,
          <source>IEEE Trans. Comput. Intell. AI Games</source>
          <volume>8</volume>
          (
          <year>2016</year>
          )
          <fpage>128</fpage>
          -
          <lpage>139</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>J.</given-names>
            <surname>Renz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Ge</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Gould</surname>
          </string-name>
          ,
          <string-name>
            <surname>P. Zhang,</surname>
          </string-name>
          <article-title>The angry birds AI competition</article-title>
          ,
          <source>AI Mag</source>
          .
          <volume>36</volume>
          (
          <year>2015</year>
          )
          <fpage>85</fpage>
          -
          <lpage>87</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>M.</given-names>
            <surname>Stanescu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Certický</surname>
          </string-name>
          ,
          <article-title>Predicting opponent's production in real-time strategy games with answer set programming</article-title>
          ,
          <source>IEEE Trans. Comput. Intell. AI Games</source>
          <volume>8</volume>
          (
          <year>2016</year>
          )
          <fpage>89</fpage>
          -
          <lpage>94</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>D.</given-names>
            <surname>Angilica</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Ianni</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Pacenza</surname>
          </string-name>
          ,
          <string-name>
            <surname>Declarative</surname>
            <given-names>AI</given-names>
          </string-name>
          <article-title>design in Unity using answer set programming</article-title>
          ,
          <source>in: CoG</source>
          , IEEE,
          <year>2022</year>
          , pp.
          <fpage>417</fpage>
          -
          <lpage>424</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <article-title>Unity 3D game engine</article-title>
          ,
          <source>Last accessed: Jan</source>
          <year>2023</year>
          . URL: https://unity3d.com/unity.
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>D.</given-names>
            <surname>Angilica</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Ianni</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Pacenza</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Zangari</surname>
          </string-name>
          ,
          <article-title>Integrating asp-based incremental reasoning in the videogame development workflow (application paper)</article-title>
          ,
          <source>in: PADL</source>
          , volume
          <volume>13880</volume>
          of
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>