This paper uses a fractal model to analyze aesthetic values of a new class of obstacle-prone or “stealthy” pathfinding which seeks to avoid detection, exposure, openness, and so forth in videogames. This study is important since in general the artificial intelligence literature has given relatively little attention to aesthetic outcomes in pathfinding. The data we report, according to the fractal model, suggests that stealthy paths are statistically significantly unique in relative aesthetic value when compared to control paths. We show furthermore that paths generated with different stealth regimes are also statistically significantly unique. These conclusions are supported by statistical analysis of model results on experimental trials involving pathfinding in randomly generated, multiroom virtual worlds.

Nonplayer character (NPC) agents in
videogames depend on pathfinding to navigate virtual worlds autonomously. The
literature on artificially intelligent pathfinding has generally focused on
machine efficiency and shortest paths. While these concerns cannot be
neglected, they may be of secondary or even doubtful benefit if, in videogames,
they lead to movement lacking in sensori-emotional or aesthetic qualities that
would otherwise appeal to player expectations of plausibility, intelligence, beauty,
and so forth. Indeed, pathfinding without aesthetic considerations tends to look
unrealistic and mechanical, detracting from a game’s immersive potential and
frustrating players [

Aesthetics,
however, pose challenges. According to a modernist, Kantian view [

These efforts have yielded encouraging results and drawn attention to basic issues of incorporating aesthetics in pathfinding. Unfortunately, they have depended almost entirely on anecdotal arguments rather than metrics that facilitate hypothesizing about and testing aesthetic outcomes under more quantifiable, independently verifiable regimes. These investigators have furthermore addressed only beautifying heuristics that navigate by straight lines, smooth turns, and avoiding obstacles without tracking them. Such movement, although appealing in some contexts, is not appropriate for all forms of play and types of games.

In this paper, we
use fractal analysis to examine a new pathfinding aesthetic which we call
“stealthy.” These paths, obstacle-prone by nature, are reminiscent of and
suitable for covert movement in first-person shooter, role playing, and other
types of games wherein the goal is to avoid detection, exposure, all-out
encounters—concepts we
define mathematically later. We use fractal analysis since, among other reasons
we discuss later, this approach has been shown to reliably predict and comport
with player expectations of aesthetic appeal in pathfinding [

We develop a
simple cost heuristic to generate

The fractal dimension, originally
developed by Mandelbrot in his seminal paper [

The artificial
intelligence literature, however, is generally silent on pathfinding aesthetics.
For example, see texts like
those of Bourg and Seemann [

Rabin [

For precisely
this reason, Coleman [

Coleman [

In this paper, we
use

Mandelbrot developed the fractional
(or fractal) dimension as a way to analyze irregularly shaped geometric objects
which are no-where differentiable (i.e., textured) and self-similar [

The fractal
dimension has different interpretations that come under two general mathematical
categories: stochastic and geometric [

One way of interpreting the Hausdorff dimension is through the box counting dimension, that is, reticular cell counting. In this case, if the ruler is a uniform grid of square cells, then a smooth surface passes through twice as many cells if the cell length is reduced by a factor of two. A fractal object passes through more than twice as many cells if the cell length is reduced by a factor of two.

For instance, the
coastline of Maine, USA
, is not straight or smooth but
highly textured with inlets, outcrops, and keys. Researchers using the box
counting dimension have estimated its fractal dimension to be between 1.11 and
1.37 depending on where and how measurements are taken [

Reticular cell
counting is intuitive and straightforward computationally. We use it to estimate
the fractal dimension by computing the regression slope of

The fractal model we describe is from Coleman [

Let the surface,

Example of virtual world,

Let

Let

Others have
sought to reduce or correct these aesthetic deficiencies through beautifying
heuristics [

Yet in a competitive game world setting, the NPC would not necessarily traverse the middle of a hallway in a straight line or make “pleasant,” predictably smooth turns. Indeed, wall tracking is precisely what an NPC might conceivably do if it is seeking to avoid detection, dodge an opponent, or evade a trap.

Whereas the
standard

We state the following lemmas.

By
inspection of (

Three
possible values of

If

At the
limit, there is no stealth effect and

See Lemma

Under experimental conditions,

Lemma

Lemma

These pathfinding algorithms, standard, aesthetic,
and stealthy, are embedded, respectively, in multiroom virtual worlds,

To compute

Each random multiroom virtual world,

We also analyze stealthy paths compared to each
other, namely, less stealthy

To make these ideas clearer, we go through a randomly selected trial, number
18. Namely, the Wells random seed is 18. Readers can view the results of all 100
trials of 400 images online at the author’s website [

Aesthetic pathfinding with beautifying treatment for trial 18.

Figure

Stealthy pathfinding for
trial 18 and

Figure

Stealthy pathfinding for
trial 18 and

In general, one can easily see the difference between stealthy paths and the control paths. The standard path swerves from wall to wall seeming almost to wander. In a sense, the standard path is making random choices since the wall does not affect the cost heuristic. Yet in the stealthy case, the wall is sought out where possible. This movement gives a visual impression of avoiding opening spaces, that is, middle of the room or hallway. In other words, the aesthetic path is less covert compared to the standard one. The stealthy ones, however, appear more covert than both aesthetic and standard paths.

Table

Fractal dimensions,

Figure | ||
---|---|---|

2 | Aesthetic | 1.557638 |

3 | Stealthy (15%) | 1.550786 |

4 | Stealthy (10%) | 1.549607 |

5 | Standard | 1.547505 |

Standard pathfinding (i.e., with no beautifying treatment) for trial 18.

Table

Aesthetic | Stealthy 15% | Stealthy 10% | Standard | |
---|---|---|---|---|

Aesthetic | 0 | |||

Stealthy 15% | 0.006852 | 0 | ||

Stealthy 10% | 0.008031 | 0.001179 | 0 | |

Standard | 0.010132 | 0.003281 | 0.002101 | 0 |

We
organized Table

From a purely
quantitative perspective, Table

In other words, the numerical relationships are somewhat different from visual impressions. We do not attempt to explain this phenomenon here. We only note that the movement patterns are visually distinct and consistent, and as we observe below, statistically significant from the model’s perspective.

The raw data consists of 400
results: 100 standard paths, 100 aesthetic paths, 100 paths for

Figure

These two charts
are generally similar. They both show that stealthy paths tend to have more
fractal beauty than standard ones, while aesthetic paths have more fractal
beauty than stealthy ones. The distribution is somewhat more dispersed for

Table

Number of successes and
failures and

Trials | ||||
---|---|---|---|---|

15% | 100 | 84 | 16 | |

10% | 100 | 78 | 22 |

Thus, we can reject the null hypothesis and accept its logical alternative. Namely, stealthy paths are unique in terms of their aesthetic value.

Table

Number of successes and
failures and

15% versus 10% | 64 | 36 |

The data in Table

We have shown that stealthy
pathfinding is a unique aesthetic objective in relation to controls which have
beautifying treatment and no such treatment. There is also a small but
nevertheless statistically significant difference between the two stealth
effects,

We noted that the quantitative pattern measured by the model is somewhat different from visual inspections of the virtual worlds. This discrepancy is consistent but seemingly counterintuitive. Future work might set up further experiments to explore the matter further.

We chose

The author thanks Maria Coleman for reading the initial draft and the reviewers for providing valuable commentary and feedback.