<!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>Intuitive Pathfinding of Autonomous Agents</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Carsten Hahn</string-name>
          <email>carsten.hahn@ifi.lmu.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Mobile and Distributed Systems Group, LMU Munich</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2017</year>
      </pub-date>
      <fpage>53</fpage>
      <lpage>60</lpage>
      <abstract>
        <p>This paper treats the pathfinding of autonomous agents from a given start point to a set of targets. It mainly focuses on continuous domains with continuous state and action spaces of the agents. In these continuous domains a technique called Cross Entropy Online Planning can be deployed by the agents to plan and assess sequences of actions in order to reach their goals. However, this technique requires a simulation model of the environment to enable the agents to predict and evaluate future states of the environment. This could be combined with results of the field of Intuitive Physics which tries to create models for simple physical object interactions based merely on observations. The contribution of this work is the idea to replace the simulation model in Online Planning with results of the field of Intuitive Physics in order to create Intuitive Acting Autonomous Agents. The benefit of this will be the automated creation of the otherwise manually created model and an enhancement of the flexibility of the agents.</p>
      </abstract>
      <kwd-group>
        <kwd>Artificial Neural Networks</kwd>
        <kwd>Intuitive Physics</kwd>
        <kwd>Online Planning</kwd>
        <kwd>Cross Entropy</kwd>
        <kwd>Autonomous Agents</kwd>
        <kwd>Machine Learning</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Pathfinding denotes the problem of finding a path between a given start point and one
or more goal points. Generally this is done with respect to a given metric in order to
find for example the shortest path between two points which is quite relevant to location
based services [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. A common form of it could be a user, who shall be guided to a
desired target give the knowledge of the map and his position determined by the GPS
module of his smartphone. In this context the map is usually represented in a discrete
manner as weighted graph and the pathfinding can be performed by using the
wellknown shortest path algorithms in graph theory like Dijkstra's algorithm [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>
        Nowadays the instance in the need of finding a path between two points does not
necessarily have to be a human. It could also be some sort of autonomous acting agent.
In the recent years there is an increased interest in deploying robots in home automation
or in Industry 4.0 production scenarios. It is intended that those robots act mostly
autonomously which is why they also face the problem of finding paths between their
current position and certain goal points. These robots can be considered as autonomous
agents as they will be called in the following of this paper. They usually act on two
dimensional floor plans which enables them to move in a continuous domain, except
for static borders and obstacles that have to be avoided. In these continuous moving
domains the previous mentioned graph theory algorithms for finding the shortest path
cannot be directly applied. That is why multiple approaches exist to discretize such
spaces [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] in order to be able to apply shortest path algorithms on the resulting graph.
Additionally to the continuous space the robots can move in, they also face a continuous
action domain which might for example consist of turning a certain degree and then
moving in that direction with a certain velocity for a defined amount of time. Moreover
it might also be required for the robots to adapt to changes in the environment they
move in. Their desired targets might move or there might even be dynamic obstacles
additional to the static obstacles that have to be avoided.
      </p>
      <p>
        There are approaches like Cross Entropy Open-Loop Planning (CEOLP) [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]
respectively Time-Adaptive Cross Entropy Planning (TACE) [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] which try to cope such
complex problem domains. In TACE the agent is equipped with a simulation of the
environment he is acting in. This simulation enables the agent to estimate the dynamics of
its surroundings in order to plan and evaluate sequences of actions to reach its targets.
This has the drawback that the environment the agent is acting in, has to be previously
(manually) modeled and this model hast to be adapted if this environment changes.
      </p>
      <p>On the contrary, getting a feeling for the dynamics of their environment is something
humans intuitively learn while growing up. This is subject of a research field called
Intuitive or Naive Physics which tries to build models of the physical interaction
between objects only based on experiences respectively based on observations.</p>
      <p>The focus of this paper is on the question to what extent the previously manually
build simulation model in Cross Entropy Planning can be replaced with results from
the research field of Intuitive Physics in order to enable the agent to predict the
dynamics of its environment.</p>
      <p>The contribution of this work is the idea of combining Cross Entropy Planning of
autonomous agents in continuous state and action spaces with results of Intuitive
Physics for automatic model building together with a discussion of possibilities, challenges
and limitations.</p>
      <p>This paper is structures as follows: In Section 2 existing approaches for pathfinding
in discrete and continuous domains are outlined followed by an overview of the
research filed of Intuitive Physics and how autonomous agents might benefit from results
in this field in Section 3. In Section 4 the new approach of combining Online Planning
with Intuitive Physics is discussed followed by a conclusion in Section 5.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Pathfinding of Autonomous Agents</title>
      <p>There are numerous occasions in which an autonomous agent has to find or plan a path
from a start point to a predefined goal. The strategy that is deployed by the agent in
order to plan its path is bound to the representation of its environment that it has on
hand. This world representation can be distinguished in discrete and continuous and
will be discussed in the following section.
2.1</p>
      <sec id="sec-2-1">
        <title>Discrete Domains</title>
        <p>
          Discrete domains, like grid worlds, can be interpreted as graph and in the case of
uniform edge weights already Depth-first or Breadth-first search are suitable to find the
shortest path from a given node to a target, as long as cycles are handled accordingly.
In the case of diverse edge costs Dijkstra's algorithm [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ] can be used to find the shortest
path from a given start node to all other nodes. Is there for example a geographical
relationship between the nodes a heuristic of the shortest direct path between the start
and goal can be uses to facilitate the path search, resulting in the A* search algorithm
[
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. Even further, the D* algorithm [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] was developed to reduce the search costs in
domains in which the graph might change dynamically. In continuous domains, on the
other hand, graph search algorithms are not directly applicable. Hence multiple
approaches exist for the quantization of these domains.
2.2
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>Continuous Domains</title>
        <p>
          Considering the continuous domain as depicted in Fig. 1. The agent is the circle at the
bottom left. It has to collect the red boxes (which might be in motion) for which it
receives a reward. The walkable area is framed by grey borders and the grey rectangles
are static obstacles. There might also be dynamic obstacles which follow certain
movement patterns depicted as the grey circle. The action space of the agent consists of
turning a certain angle and then moving in that direction for a certain amount of time.
In previous works problem domains of this form were countered with Cross Entropy
Open-Loop Planning (CEOLP) [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] respectively Time-Adaptive Cross Entropy
Planning (TACE) [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. In these approaches the agent is equipped with a simulation of the
environment it is acting in. This enables the agent to simulate its actions before
executing them and to aggregate quantitative information about the outcome of a sequence of
actions (plan). By aggregating information about multiple plans a probability
distribution over plans can be constructed where potentially promising plans are more likely to
be drawn. By interleaving the execution of actions and assessment of plans by
simulation the probability to draw high value plans is increased, as lined out in Fig. 2.
Typically, the simulation of candidate plans is the most expensive part of this
procedure, which TACE tries to reduce by adaptively optimizing plan length and individual
action duration. Nevertheless, the agent has to be manually equipped with a simulation
of its environment. The drawbacks of this procedure are as follows:
 The simulation model of the environment has to be manually built.
 The evaluation of the simulation model could be computation-intensive especially
for the simulation of physical processes.
 The pre-built model is inflexible to changes in the environment.
        </p>
        <p>This is where results of the field of Intuitive Physics could put into play which will be
explained in the course next section.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Intuitive Acting Autonomous Agents</title>
      <p>Autonomous agents that use some sort of Cross Entropy Planning to plan and evaluate
their actions in order to reach their target highly depend on the simulation model of
their environment. The more accurate this model describes the dynamics, movement
patterns and physical interactions of object in the environment, like moving targets,
dynamic objects and their collision, the more accurate the agent can predict these
processes and adapt its plan accordingly. However it can be complex and costly to develop
models which accurately describe the environment the agent acts in and furthermore it
might be very computation-intensive for the agent to simulate its environment using
these models. Moreover these pre-built models might be inflexible to changes in the
environment and could require manual adjustments.</p>
      <p>It would be desirable that the agents had a basic understanding of object dynamics
and their physical interaction just like the one that humans develop while growing up.
If the agent had for example a basic understanding of concepts like bouncing objects,
it could estimate the outcome of a collision without the need of exact physical
simulation model and its calculation. This kind of thoughts are closely related to the field of
Intuitive Physics which tries to enable artificial intelligences to predict physical
relationships between objects only based on previous observations.</p>
      <p>
        The field of Intuitive or Naive Physics is driven by the concept that humans have the
ability to predict the outcome of physical interactions between object on a macroscopic
scale only based on their experience respectively based on observations they made
before. Only by observation, humans develop an understanding of concepts like gravity,
object solidity, conservation of shape and momentum of the objects involved without
the explicit knowledge of for example Newtonian laws [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. It is argued that an
intuitive physics understanding of artificial intelligence only based on observations
could be a building block for better common reasoning thereof. In the course of
Intuitive Physics research multiple approaches where suggested that use artificial neural
networks in order to build a model for the physical relationship that should be predicted.
      </p>
      <p>Artificial neural networks can be seen as biologically inspired generic function
approximators. They consist of artificial neurons that are arranged in a network of
multiple layers through which an input is propagated in order to map it to a certain output.
Every edge in this network is associated with a weight. These weights determine to
which extent the input received over this edge influences the activation of the neuron
as its activation is commonly calculated as the weighted sum of its inputs. An output
function applied on the aggregated inputs determines the outcome which serves as input
of the following neuron in the network or as overall output of the network in the last
layer. Neural networks can be "trained" by example. This means that the error between
the output of the network for a certain input and the known desired output can be
minimized by propagating the error backwards through the network in order to adjust the
edge weights accordingly with the goal to also minimize the output error on unseen but
similar input data.</p>
      <p>
        One work in the field of Intuitive Physics is [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] where the authors present a
learning-based approach based on simulated data that predicts stability of towers comprised
of wooden blocks only based on an image as input. The model was trained with
simulated data but tested with a real robot, which placed wooden blocks as a tower and was
guided by the model for the prediction of the stability of future block tower states.
      </p>
      <p>
        In another work the concerning authors considered the domain of playing billiards
[
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. The authors suggest an object based, image centered model to predict the
movement and collision of billiard balls. The input for the model is a stack of 4 images
comprised of the current as well as the previous 3 time steps focused on the object (billiard
ball) to be predicted as well as the force that is applied to it at the current time step. The
model then predicts the velocity of the object at each of h future time steps, with h =
20 for example. This prediction of future states is done for each object individually to
predict the future world state, while the same model is applied to all the objects in the
world. To explore the generalization of this method, the predictive model was trained
on a variety of billiards environments, with different numbers of balls and different wall
geometries and later tested on unseen setting. The authors argue that it could be
valuable for an intelligent agent to be equipped with an internal model of the dynamics of
the external world in order to plan and execute goal specific actions in varied and
unseen environments.
      </p>
      <p>In order to further investigate the possibility of predicting the future state of dynamic
objects with a model that is only build on previous observations, an additional
experiment of Intuitive Physics was conducted in an unpublished preparatory work of the
author of this paper.</p>
      <p>The scenario consisted of an elastic ball that bounced in an enclosed two dimensional
area after being initialized at a random position with an impulse in a random direction.
The ball was subject to gravity and friction which slowed it down. The goal in this
scenario was to build a model to predict the trajectory of the ball after a certain point
after being feed with a segment of the previous part of the path. The model was created
only by observing trajectories of the ball. For this reason 100 000 example trajectories
where created by using a physics simulation. After that the dataset was split into
training and test set. The input of the model is the x and y coordinate in the area as well as
the velocity in x and y direction for the last 50 time steps, which means that the used
artificial neural network had 200 input neurons. The neural network was used to predict
the next 20 time steps of the ball trajectory. The architecture of the neural network was
a simple feed forward network with 4 fully connected layers each consisting of 200
neurons with rectified linear unit (ReLU) activation. These fully connected layers
where interleaved with dropout layers (20%) for regularization. As loss function the
mean squared error between the models output and the real measurements from the
physics simulation was used for training.</p>
      <p>The evaluation on the test set showed promising results concerning the accuracy of
the prediction of the ball trajectory. This preliminary investigation as well as the other
related work of Intuitive Physics lead to the assumption that an autonomous agent could
benefit from the possibility to predict the dynamics in its surround in order to find,
respectively plan, its path to (possibly moving targets) while avoiding static and
dynamic obstacles. The idea is to replace the simulation model in the previous mentioned
Cross Entropy Planning with (possibly pre-trained) neural networks to enable the agent
to estimate the dynamics of its surrounding. The possibilities and challenges of this
approach shall be discussed in the following section.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Discussion</title>
      <p>In previous sections the technique of Cross Entropy Planning was explained. In this
approach an autonomous acting agent is equipped with a simulation of its environment
in order to plan and assess sequences of actions. These actions could consist of turning
a certain angle and moving forward in the facing direction with a certain speed for a
defined amount of time. Action sequences that lead the agent to a predefined goal yield
higher expected values and are therefore chosen for execution. In a dynamic
environment also the dynamics of this environment have to be modeled as accurate as possible.
One big drawback is that this simulation model has to be manually built which might
be labor-intensive. It would be desirable that the agent had an intuitive concept about
the dynamics in its environment and could estimate respectively predict the dynamics
of its targets or dynamic obstacles. This is where results of the field of Intuitive Physics
could put into play, as researchers of this field try to automatically build models for
physical processes merely bases on observations. This lead to the idea that the agent
could be provided with artificial neural networks to predict the dynamics of its
surroundings, may it be targets or obstacles. This approach shall ease the creation of the
model and make it more flexible to changes in the environment. Moreover the
evaluation of the neural network could be less computation-intensive than the evaluation of a
complex physics simulation, depending on the complexity of the model and the
environment. The neural networks could be pre-trained in other domains in order to model
physical object relations. It needs to be examined whether these models can be further
trained in the target domain in order to adapt to changes or whether the training of the
neural networks for dynamic object prediction could start together with the plan
generation of the agent respectively be interleaved with the plan generation. It is to be further
investigated how well neural networks as future state estimator perform compared to
detailed physical simulations in terms of efficiency and accuracy of the prediction and
to which extent this approach can be generalized.
5</p>
    </sec>
    <sec id="sec-5">
      <title>Conclusion</title>
      <p>In this work the concept of Intuitive Acting Autonomous Agents was introduced. The
idea is to replace the simulation model in Cross Entropy Online Planning with results
of the field of Intuitive Physics and combine these research areas thereby. Promising
results in Intuitive Physics show that it is possible to build models for simple physical
object interactions only based on observations. This might ease the model creation and
flexibility of the model. Further research is required to investigate how well neural
networks perform compared to a manually defined simulation of the agent's surroundings
in order to plan and assess future states.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Hannah</given-names>
            <surname>Bast</surname>
          </string-name>
          et al.,
          <article-title>"Route Planning in Transportation Networks,"</article-title>
          <source>CoRR</source>
          , vol.
          <source>abs/1504.05140</source>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>E. W.</given-names>
            <surname>Dijkstra</surname>
          </string-name>
          ,
          <article-title>"A note on two problems in connexion with graphs,"</article-title>
          <source>Numerische Mathematik</source>
          , vol.
          <volume>1</volume>
          , no.
          <issue>1</issue>
          , pp.
          <fpage>269</fpage>
          -
          <lpage>271</lpage>
          ,
          <year>Dec 1959</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>I.</given-names>
            <surname>Millington</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Funge</surname>
          </string-name>
          , Artificial Intelligence for Games.: CRC Press,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Ari</given-names>
            <surname>Weinstein and Michael L Littman</surname>
          </string-name>
          ,
          <article-title>"Open-Loop Planning in Large-Scale Stochastic Domains</article-title>
          .,
          <string-name>
            <surname>" in</surname>
            <given-names>AAAI</given-names>
          </string-name>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Lenz</given-names>
            <surname>Belzner</surname>
          </string-name>
          ,
          <article-title>"Time-adaptive Cross Entropy Planning,"</article-title>
          <source>in Proceedings of the 31st Annual ACM Symposium on Applied Computing</source>
          , New York, NY, USA,
          <year>2016</year>
          , pp.
          <fpage>254</fpage>
          -
          <lpage>259</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>P. E.</given-names>
            <surname>Hart</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N. J.</given-names>
            <surname>Nilsson</surname>
          </string-name>
          , and
          <string-name>
            <given-names>B.</given-names>
            <surname>Raphael</surname>
          </string-name>
          ,
          <article-title>"A Formal Basis for the Heuristic Determination of Minimum Cost Paths,"</article-title>
          <source>IEEE Transactions on Systems Science and Cybernetics</source>
          , vol.
          <volume>4</volume>
          , no.
          <issue>2</issue>
          , pp.
          <fpage>100</fpage>
          -
          <lpage>107</lpage>
          ,
          <year>July 1968</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>A.</given-names>
            <surname>Stentz</surname>
          </string-name>
          ,
          <article-title>"Optimal and efficient path planning for partially-known environments,"</article-title>
          <source>in Proceedings of the 1994 IEEE International Conference on Robotics and Automation</source>
          , May
          <year>1994</year>
          , pp.
          <fpage>3310</fpage>
          -
          <lpage>3317</lpage>
          vol.
          <volume>4</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>Lenz</given-names>
            <surname>Belzner</surname>
          </string-name>
          ,
          <article-title>"Simulation-based autonomous systems in discrete and continuous domains,"</article-title>
          <source>LMU Munich</source>
          ,
          <source>Ph.D. dissertation</source>
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Brenden</surname>
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Lake</surname>
            ,
            <given-names>Tomer D.</given-names>
          </string-name>
          <string-name>
            <surname>Ullman</surname>
          </string-name>
          , Joshua B.
          <string-name>
            <surname>Tenenbaum</surname>
          </string-name>
          , and
          <string-name>
            <surname>Samuel J. Gershman</surname>
          </string-name>
          ,
          <article-title>"Building Machines That Learn and Think Like People," Behavioral and Brain Sciences</article-title>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>101</lpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Katerina</surname>
            <given-names>Fragkiadaki</given-names>
          </string-name>
          , Pulkit Agrawal, Sergey Levine, and
          <string-name>
            <given-names>Jitendra</given-names>
            <surname>Malik</surname>
          </string-name>
          ,
          <article-title>"Learning Visual Predictive Models of Physics for Playing Billiards,"</article-title>
          <source>CoRR</source>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Wenbin</surname>
            <given-names>Li</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Ales</given-names>
            <surname>Leonardis</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Mario</given-names>
            <surname>Fritz</surname>
          </string-name>
          ,
          <article-title>"Visual Stability Prediction and Its Application to Manipulation," CoRR, vol</article-title>
          .
          <source>abs/1609.04861</source>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>