# Long Memory of Pathfinding Aesthetics

Authors: Ron Coleman
Journal: International Journal of Computer Games Technology
 (2009)

---

## Abstract

This paper investigates a new  dynamic (i.e., space-time) model to measure aesthetic values in pathfinding for videogames. The results we report are important firstly because the artificial intelligence literature has given relatively little attention to aesthetic considerations in pathfinding. Secondly, those investigators who have studied aesthetics in pathfinding have relied largely on anecdotal arguments rather than metrics. Finally, in those cases where metrics have been used in the past, they show only that aesthetic paths are different. They provide no quantitative means to classify aesthetic outcomes. The model we develop here overcomes these deficiencies using rescaled range (R/S) analysis to estimate the Hurst exponent, H. It measures long-range dependence (i.e., long memory) in stochastic processes and provides a novel  well-defined mathematical classification for pathfinding. Indeed, the data indicates that aesthetic and control paths have statistically significantly distinct H signatures. Aesthetic paths furthermore have more long memory than controls with an effect size that is large, more than three times that of an alternative approach. These conclusions will be of interest to researchers investigating games as well as other forms of entertainment, simulation, and in general  nonshortest path motion planning.


---

## Body

## 1. Introduction

Pathfinding in  videogames must appeal to player expectations for plausibility and naturalness, that is, what natural intelligence might conceivably do. Thus, navigation in games is not necessarily optimal in machine efficiency or shortest distance. Indeed, these goals are assumed to be secondary and possibly even undesirable. That is, if they lead to unrealistic, mechanical-looking movement lacking in sensori-emotional or aesthetic qualities, movement as such frustrates players and detracts from the game’s replay appeal and immersive quality [1].Aesthetics, however, pose special challenges. The philosopher, Immanuel Kant (1724–1804), argued inThe Critique of Judgment [2] that matters of beauty, taste, and so forth  are subjective and relative and by implication beyond the pale of automation. The question for us, however, is not what  beauty or harmony in pathfinding  is but what is knowable about such ideals which game researchers and developers have identified as goals of “aesthetic optimizations” and “aesthetic corrections.” Yet these endeavors, while generally successful, derive almost entirely from anecdotes rather than metrics. Indeed, the investigators do not take the next logical step, namely, to measure the efficacy of aesthetic treatments. They do not ask to what degree beautifying regimes improve aesthetic outcomes and whether the results are consistent with player expectations.In this paper, we study these questions using  a dynamic (i.e., space-time) assessment of aesthetic values. Our model is based on rescaled range (R/S) analysis to estimate the Hurst exponent, H, which measures long-run noncyclical autocorrelation (i.e., long memory) in stationary time series [3, 4]. In the past, H has been used by many others including Mandelbrot to study dynamic phenomena, although none involving pathfinding. H offers novel insights into pathfinding, and it has distinct advantages compared to alternatives like the fractal dimension to assess “snapshot” aesthetic values in 2D imagery [5–7]. H does not employ static imagery and furthermore provides a three-tier mathematical classification that is particularly appropriate for pathfinding:  (i) H = 0.5 characterizes a Gaussian or random walk; (ii) 0.5<H≤1.0 evinces persistence or a trend;    (iii) 0.0≤H<0.5 is evidence for antipersistence, namely, mean-reversion.Model results onN=100 pathfinding trials in randomly generated  multiroom levels  suggest that both aesthetic and control  paths are persistent—and common sense demands that  they should be since each path follows a trend toward the goal. However, the median amount of persistence appears to be crucially dependent on the transform operator, Θ, which we use to transform a path to a stationary time series. Despite the caveats, agents pursuing aesthetic paths have more measurable long memory compared to controls, and for several transform methods we study  the  difference which is statistically  significant, that is,  Haesthetic>Hcontrol with P<10-15 in the best case. Also, for the best transform operator, the effect size is large, more than two times greater than the fractal dimension approach.A motivation for this research is generally aimed toward development of a more quantitative understanding of aesthetic values in dynamic artifacts. We study games and simple navigation for 2D or 3D games like first person shooters. The principles, however, have broader implications and may well support investigations of other dynamic behaviors that include gestures, gaits, choreographies, acrobatics, and so forth, which we posit to be inappropriate for “snapshot” measures of aesthetic value. We do not study or explore the implications of these concepts here. Nevertheless we believe that the model may be of interest to researchers investigating games as well as other forms of entertainment, simulation, and in general  nonshortest path motion planning.


## 2. Background and Related Work

The mainstream artificial intelligence (A.I.)  literature is largely silent on pathfinding aesthetics. For instance, Russell and Norvig [8] give thorough treatment of pathfinding but do not mention aesthetics. Even texts specializing in A.I. for games, like Millington [9] and Bourg and Seemann [10],  do not refer to aesthetics.Rabin [11] appears to be the first to investigate “aesthetic optimizations” as a primary objective of pathfinding using splines and hierarchical approaches. Higgins [1] proposes to search for aesthetic paths through “aesthetic corrections” as a second pass after the main path has been computed. Stout [12] and Pinter [13] offer related suggestions for creating  “pleasing” and  “realistic” paths.  Botea  et al. [14]  do not specifically study aesthetic pathfinding but acknowledge, at least in passing, that pathfinding without aesthetic considerations is not practical for games. The efforts of these investigators have at least two features in common. Firstly, they recognize that smoother and straighter paths are more appealing and plausible than ones that zigzag or track obstacles. Secondly, they do not grade or score paths for aesthetic value.For this reason, we put forth the beauty intensity,ℜ [15]. It measures the second-order derivatives (i.e., zigzags) and obstacle tracking. ℜ formulates these into a simple  nonlinear model designed to resemble the Weber-Fechner law in which human sensibilities are logarithmic in response to stimuli [16]. In every case for a path, P1, treated with Rabin-Higgins beautifying regimes and a reference or control path, P0, not subjected to such treatment, we observe ℜ(P1∣P0)>0.We subsequently developed a more sensory model,G(P1∣P0) [5]. It is based on the fractional or fractal dimension, D, which Mandelbrot developed in his seminal paper to measure the length of coastlines and other irregularly shaped geometric objects [17]. We were basically following others who had used D to study masterpieces like the “action paintings” of Jackson Pollack [18]. That aesthetic paths nevertheless have higher fractal dimensions is surprising because G measures surface texture differences and has no parameters related to pathfinding. In other words, unlike ℜ, G is nonparametric and consequently  more robust.UnfortunatelyG has some limitations. Firstly, as a geometric interpretation of the fractal dimension, it operates on the spatial domain only. It completely ignores the temporal domain and thus  seems inadequate to us for games and other dynamic phenomena that evolve in both space and time. Moreover, aesthetic paths have higher fractal dimensions, that is, they are “rougher,” not smoother or straighter as sought by aesthetic optimizations and corrections. This reversal suggests to us that texture is a useful sensory metaphor, and D works well on snapshots of coastlines, brush strokes, and other static imagery [7]. However, a different method is needed for dynamic artifacts like pathfinding. Finally, G is a robust discriminator—it has absolutely no assumptions about pathfinding. Yet it is not very powerful. The median G is less than 0.1% of the median D, and Hedges-Olkin [19] index is 0.41 which is a small-to-medium effect size [20].H is a stochastic, rather than a geometric, interpretation of the fractal dimension. Hurst developed R/S analysis to study hydrology [21], and Mandelbrot showed that  it reliably measured long-range dependence in stationary systems [4]. In other words, an effect or “shock” does not necessarily dissipate instantaneously but decays over time as if, metaphorically speaking, the system has memory of the event. This observation was not new, of course, but Mandelbrot suggested a general way to measure it through R/S analysis, and this work aroused the interests of many others working in diverse areas [22–25], although none involving pathfinding. Thus, textural and memory interpretations of H are complementary descriptions of the same phenomena.A number of researchers have usedR/S analysis to model long-range dependence in Internet network traffic; see [26] for cross references. While working in this area, Karagiannis [26, 27] developed a Java tool, Self-Similarity and Long-Range Dependence Analysis (Selfis), which we use to estimate H.We also use the second derivative and obstacle tracking techniques developed in Coleman [15]. Unlike that case, however, we do not integrate these parameters with respect to the time. The experimental trials are the same. The opinion survey of players [28] uses the same trials, and the results are reported in [5].Finally, we note that   literature contains many references to mathematical patterns of beauty related to Aristotle’s Golden Ratio, Fibonacci series, and so forth [29]. There is also a growing body of related work to assess musical patterns [25]. The former is concerned principally with the spatial domain while the latter with the temporal domain. Pathfinding in necessarily incorporates both which is part of the uniqueness and opportunities of the present study.


## 3. Study  Objectives

The main objective of this study is to identify a dynamic model,ℵ, based on the Hurst exponent which discriminates between paths subjected to aesthetic treatment and controls without such treatment. We emphasize that we are not investigating new ways to generate aesthetic paths but rather to analyze them using a new approach. The most important characteristic of ℵ, as far as this paper is concerned, is its effect size. That is, it is not sufficient that the model gives statistically significant results. Our “benchmark” model, G, already does that except in a static manner and with a small effect size [5].A meaningful improvement, therefore, would at the very least have a medium effect size. The effect size, however, depends on the operator, Θ, which transformsP into a stationary time-series, ξ. While the number of possible Θ appears large, we are interested only in those that meet a set of criteria or have specific properties which we explain below. Thus, wherever we write  H(P), we mean H(ΘP) = H(ξ), namely, the Hurst exponent of a transformed path.


## 4. Hurst Exponent

A stationary process is said to have long-range dependence or long memory if there is a real numberα∈(0,1) such that(1)limk→∞p(k)=Ck-α,
where C is a constant, and p(k) is the autocorrelation function of sample observations, ξ(t), with lag k. The Hurst exponent, H, is related to α as(2)H=1-α2,
where0.5<H≤1.0which implies ξ(t) is persistent, that is, positively autocorrelated. If the last move was up, the next one most likely will be up. It will have a trend. Also,0.0<H<0.5 implies  that  ξ(t) is antipersistent or negatively autocorrelated. This is what Mandelbrot and Wallis termed the Joseph Effect—feast followed by famine [4]. If the last move was up, the next one most likely will be down.  And,H=0.5 implies that ξ(t) has no autocorrelation. It is a random walk. The next move in no way depends on the last one.The “walk” metaphor is very appropriate for pathfinding. Indeed,   literature often speaks ofξ(t) as a “path.” However, our paths, P, are inherently four dimensional, and thus, we need to transform them into ξ(t) as we suggest later.R/S analysis is a statistical estimate of H, namely,(3)E[R(τ)S(τ)]=CnH,
where R(τ) is the amplitude range over a time window, τ, scaled to the standard deviation, S(τ), of the range. That is,(4)R(τ)=max(X(t,τ))-min(X(t,τ))for1≤t≤τ,S(τ)=1τ∑t=1τ{ξ(t)-〈ξ〉τ}2,
where(5)X(t,τ)=∑u=1tξ(u)-〈ξ〉τ,〈ξ〉τ=1τ∑t=1τξ(t).Thus, theR/S for any given τ  is(6)R/S(τ)=R(τ)S(τ).The classic approach to choosingτ used by Selfis is a divide and conquer method. That is, ξ must be 2n in length and τ={2n-1,2n-2,…,2m}. H is regression slope of logτ versus   logR/S(τ) with n-m observations of (6) on the regression line, where m=2 is the Selfis default.


## 5. Model:ℵ

Let the virtual world,W, be a finite state space in Euclidean Rn. We assume without loss of generality that n=2. For instance, if the game is a 3D first-person shooter, n=2 implies that the view for analysis purposes is from above, namely, looking down the Y-axis toward the X-Z plane.LetW:x, z→v for 0≤x<w,  0≤z<h, where w and h are width and length features, respectively, of W, and v is a state, namely, t∈{0,1,2}. W contains a set of obstacles,  {Bj}, namely, Bj=W:Bj·x, Bj·z→2.  Also  W contains, A, a “free flying” rigid-body (i.e., the NPC), which has configurations or steps such that A[t]=W:A[t]·x, A[t]·z, where t is the time step. These steps define a path object, P, for t=0⋯Lfrom Astart (start = 0) to Agoal (goal = L-1), where At+1=W:A[t]·x+Δx, A[t]·z+Δz→2 and Δx,Δz∈{-1,0,1}. All other states of W are “open” or unoccupied, namely, W:x, z→0. For the worlds we generate, A “tracks” an obstacle if W:A[t]·x±k, A[t]·z±k→1, where k=1.We say operationallyP1 has more beauty than P0 if ℵ(P1∣P0)>0 such that(7)ℵ(P1∣P0)=H(P1)-H(P0),
where H(P) is the R/S statistic of a path P, after it has been transformed to a stationary process, ξ, using Θ which we describe in the next section. We note that (7) is meaningful under the following constraints.C1:
P1 and P0 have identical start configurations in W.C2:
P1 and P0 have identical goal configurations in W.C3:
W in each case has the same obstacles, {Bj}.The intuition of (7) is that if P1 exhibits behaviors that enhance its aesthetic appeal compared to P0, then ξ1 compared  to ξ0 has a greater tendency to trend along straighter and smoother configurations without tracking.


## 6. Aesthetic Optimizations and Corrections

The model,ℵ, does not specify how to generate P. The details of how P objects are generated are covered in detail in [15]. In summary, we use the A* algorithm from Bourg and Seemann [10] for controls. It is a “standard” A* algorithm which minimizes distance to the goal without regard for aesthetic considerations.Paths which receive beautifying treatment also minimize distance to the goal. In fact, aesthetic and control heuristics are identical in this respect. The aesthetic optimization, however, minimizes distance as a second-order effect. That is, after the distance for each possible next step has been calculated, weighted values for the second derivative and wall tracking are linearly combined with the distance as a cost penalty. It  is important to note that the calculation of the cost penalty is independent of the distance calculation (see Figure1).Figure 1
Control versus aesthetic optimizations.The general idea of aesthetic optimization is due to Rabin [11] but we implement it as a first pass. Following the first pass, after the main aesthetic path has been calculated from start to goal configurations, we use “aesthetic corrections,” an idea from Higgins [1]. This second pass examines the entire path in a global analysis and removes residual zigzagging which got through the first pass.


## 7. Transform Operator:Θ

The operator transforms a path object,P, into a stationary time series, ξ. Ideally Θ will meet the following criteria and/or have the following desirable properties.(1)
Independence of the treatment parameters. That is, Θ cannot use path curvature or obstacle tracking as inputs since these are precisely the parameters that drive aesthetic and control searches. We can know that this criterion has been met by inspection of Θ.(2)
Stationarity. This is not a “nice to have” but in fact a requirement forR/S analysis. Nearly all research reports in   literature assume stationarity without necessarily establishing it. In our view, the novel application of R/S analysis to pathfinding obliges us to confirm its validity consistent with making as few assumptions as possible. We can test this criterion through stationarity analysis tools such as the Kolomgorov-Smirnov test [30], the application of which we describe later.(3)
No reversals. In this case,H(ΘP) will indicate that aesthetic paths which are smoother and straighter also have more long memory. Conversely, for controls which have no aesthetic treatments, H(ΘP)  will indicate that they are either antipersistent or Gaussian (i.e., a random walk). We can know that this criterion has been met by direct analysis of statistical results.(4)
Simplicity. We mean to suggest that Θ has a closed form, relatively few terms, a formulation that is straightforward to implement in a conventional programming language, and so forth. Ultimately, however, these are only guidelines, and whether they (and possibly others) have  been met will be left for the reader to decide.


### 7.1. Formulation

Given these criteria, we arrived at the following general formulation:(8)Θ:ξ(t)=δ(t-ti)·∇(P,t).That is, Θ is a convolution of theDirac delta function, δ [31], and ∇·δ(t-ti) is one at t=ti for i=0,1,2,…,L-1 and vanishes elsewhere. ∇ is a function that converts P to time-dependent scalar values. For the purposes of this paper, ∇ has the following form:(9)∇(P,t)=r2d-r1.The variable,r1, is a uniform random deviate with dynamic range (-c1,c1).  The variable, r2, is a random Gaussian deviate with σ=1 and μ=c2, where c2>0. In other words, r2 is biased in the positive direction. The variable, d, is a distance metric which we describe below.The physics metaphor isr1which  acts as a spring with a damper, (r2d). That is, (r2d) is a positive offset for r1. The damper causes ∇ to have more or less long memory depending on the magnitude of d. Properly “tuned” given the constants, c1 and c2, ∇ will tend to have a smaller dynamic range for aesthetic paths compared to controls, reflecting the greater long memory in aesthetic paths.The variable,d, is distance from the current configuration, (Ai·x, Ai·y), to some target location, (W·x, W·y). If the target is a fixed location independent of the virtual world layout, for example, the center of the world, d̅ for a given world will tend to vary randomly since the worlds are randomly generated. Sometimes the control path will be on the “inside track”; at other times the aesthetic path will be on the “inside track.” (By “inside track” we mean shorter distance to the goal.)  In other words, there will be no discernable pattern for discriminating control versus aesthetic paths. If, however, the target is the goal configuration, then d̅ will not vary randomly. In fact, empirical data we show later confirms(10)d̅control≤d̅aesthetic
since control paths tend to be on the “inside track.” This suggests that the dampening of r1 will tend to be greater for aesthetic paths, and ∇ will tend toward greater stochastic memory.


### 7.2. Discussion

We ask if (9) meets the criteria given above. At this point we can answer positively regarding criterion 1: Yes.The reason for this conclusion we gave earlier is the following:    while distance is an objective of the heuristic search, it is not a treatment parameter. In fact, the identical distance function is applied in both control and aesthetic searches. The only difference, as we mentioned earlier, is the beautifying treatment which is independent of the distance function. Namely, the beauty regime asks if  (a) the path has a nonzero second derivative and/or (b) the path is tracking. If either one or both are true, the cost is updated regardless of its distance component.This may lead to a step which is further from the goal as is often the case for aesthetic paths; however, from a statistical point of view the mean difference between the control and aesthetic path length is not statistically significant [15]. The implication, then, is that the difference in distance to the goal at any given step is not statistically significant. We test this assertion and report in the “Results” section that in fact this claim is supported by the data.If there is no significant difference, why then should this work? We posit that since (9) is nonlinear with respect to d, ∇ is sensitive to initial conditions. In other words, a small difference makes a difference.


### 7.3. Parameter Selection

We learned through manual trial and error that (9) is sensitive to initial conditions, that is, c1 and c2. We similarly learned that the Manhattan or taxicab metric works best for d [17], namely,(11)d=|Δx|+|Δz|,
where Δx=Ai·x-Agoal·x, and Δz=Ai·z-Agoal·z. That is, compared for instance to the Euclidean and checkers metrics which we also examined but will not refer to further,   when d is the Manhattan metric with c1=4 and c2=0.125, ℵ is statistically significant with a large effect size. Furthermore, except in a few cases, ξ is stationary (criteria 2), and generally there are no reversals (criteria 3).While it is possible that other combinations of the parameters in∇ will yield equally good or even better results, we run tests on out-of-sample trials to verify that (9) is not overfit with the selected parameters.


### 7.4. Augmentingξ

We generally cannot useξ(t) directly as given in (8). Recall that R/S analysis uses “divide and conquer.” This means that Selfis truncates the data to the nearest 2n floor if P is not exactly 2n length. Since our P rarely meet this criterion, Selfis arbitrarily throws away potentially meaningful sample points. To control this problem, we randomly sample P(x, z, t) and extend ξ(t) to the nearest 2n ceiling if the length is not 2n.For instance, in Trial 56 the   control has length 103, and the aesthetic has length 108. At 23 randomly selected configurations in the control, we reinvoke (8) which makes |ξ′(t)|=128. We carry out a similar process on the aesthetic path. The process  flow is  shown in the Figure 2.Figure 2
Generatingξ′(t).


## 7.1. Formulation

Given these criteria, we arrived at the following general formulation:(8)Θ:ξ(t)=δ(t-ti)·∇(P,t).That is, Θ is a convolution of theDirac delta function, δ [31], and ∇·δ(t-ti) is one at t=ti for i=0,1,2,…,L-1 and vanishes elsewhere. ∇ is a function that converts P to time-dependent scalar values. For the purposes of this paper, ∇ has the following form:(9)∇(P,t)=r2d-r1.The variable,r1, is a uniform random deviate with dynamic range (-c1,c1).  The variable, r2, is a random Gaussian deviate with σ=1 and μ=c2, where c2>0. In other words, r2 is biased in the positive direction. The variable, d, is a distance metric which we describe below.The physics metaphor isr1which  acts as a spring with a damper, (r2d). That is, (r2d) is a positive offset for r1. The damper causes ∇ to have more or less long memory depending on the magnitude of d. Properly “tuned” given the constants, c1 and c2, ∇ will tend to have a smaller dynamic range for aesthetic paths compared to controls, reflecting the greater long memory in aesthetic paths.The variable,d, is distance from the current configuration, (Ai·x, Ai·y), to some target location, (W·x, W·y). If the target is a fixed location independent of the virtual world layout, for example, the center of the world, d̅ for a given world will tend to vary randomly since the worlds are randomly generated. Sometimes the control path will be on the “inside track”; at other times the aesthetic path will be on the “inside track.” (By “inside track” we mean shorter distance to the goal.)  In other words, there will be no discernable pattern for discriminating control versus aesthetic paths. If, however, the target is the goal configuration, then d̅ will not vary randomly. In fact, empirical data we show later confirms(10)d̅control≤d̅aesthetic
since control paths tend to be on the “inside track.” This suggests that the dampening of r1 will tend to be greater for aesthetic paths, and ∇ will tend toward greater stochastic memory.


## 7.2. Discussion

We ask if (9) meets the criteria given above. At this point we can answer positively regarding criterion 1: Yes.The reason for this conclusion we gave earlier is the following:    while distance is an objective of the heuristic search, it is not a treatment parameter. In fact, the identical distance function is applied in both control and aesthetic searches. The only difference, as we mentioned earlier, is the beautifying treatment which is independent of the distance function. Namely, the beauty regime asks if  (a) the path has a nonzero second derivative and/or (b) the path is tracking. If either one or both are true, the cost is updated regardless of its distance component.This may lead to a step which is further from the goal as is often the case for aesthetic paths; however, from a statistical point of view the mean difference between the control and aesthetic path length is not statistically significant [15]. The implication, then, is that the difference in distance to the goal at any given step is not statistically significant. We test this assertion and report in the “Results” section that in fact this claim is supported by the data.If there is no significant difference, why then should this work? We posit that since (9) is nonlinear with respect to d, ∇ is sensitive to initial conditions. In other words, a small difference makes a difference.


## 7.3. Parameter Selection

We learned through manual trial and error that (9) is sensitive to initial conditions, that is, c1 and c2. We similarly learned that the Manhattan or taxicab metric works best for d [17], namely,(11)d=|Δx|+|Δz|,
where Δx=Ai·x-Agoal·x, and Δz=Ai·z-Agoal·z. That is, compared for instance to the Euclidean and checkers metrics which we also examined but will not refer to further,   when d is the Manhattan metric with c1=4 and c2=0.125, ℵ is statistically significant with a large effect size. Furthermore, except in a few cases, ξ is stationary (criteria 2), and generally there are no reversals (criteria 3).While it is possible that other combinations of the parameters in∇ will yield equally good or even better results, we run tests on out-of-sample trials to verify that (9) is not overfit with the selected parameters.


## 7.4. Augmentingξ

We generally cannot useξ(t) directly as given in (8). Recall that R/S analysis uses “divide and conquer.” This means that Selfis truncates the data to the nearest 2n floor if P is not exactly 2n length. Since our P rarely meet this criterion, Selfis arbitrarily throws away potentially meaningful sample points. To control this problem, we randomly sample P(x, z, t) and extend ξ(t) to the nearest 2n ceiling if the length is not 2n.For instance, in Trial 56 the   control has length 103, and the aesthetic has length 108. At 23 randomly selected configurations in the control, we reinvoke (8) which makes |ξ′(t)|=128. We carry out a similar process on the aesthetic path. The process  flow is  shown in the Figure 2.Figure 2
Generatingξ′(t).


## 8. Experimental Design

Under experimental conditions, (7) may be regarded as a “black box.” Namely, we input to objects, P0 and P1, and observe the output statistic, ℵ. The experimental design does not ask what type of regression is employed, whether it is statistically significant, how many input points we use, and so forth. It is blind to these questions. Our only interest is whether there are systematic deviations in ℵ which cannot be explained by chance.We use the multiroom virtual worlds from Coleman [5] which are generated with the Wells random level generator [32]. It takes an integer seed and returns a randomized world, W, which contains Astart, Agoal, and {Bj}. This is one trial; in fact, the seed is the trial number.  Figure 3 shows a sample, Trial 56.Figure 3
Trial 56 random, multiroom level.LetP1 be the path subjected to beautifying treatment, and let P0 be the reference or control—just as we mentioned earlier. A preliminary analysis using the Kolmogorov-Smirnov (K-S) test [30] indicates that H(P0) and H(P1) are not consistent with the normal distribution. For this reason and in the interests of conservatism, we invoke the one-tailed Binomial test which is nonparametric [30] to assess the statistical significance of difference between H(P0) and H(P1). In this case, each experimental trial is a Bernoulli trial which is a “success” if the null hypothesis, H(P1i)≤H(P0i), is true and a “failure” otherwise for i=1,2,…,N. If the number of successes is s,  and the number of failures is f, then the null hypothesis is s≤f, where N=s+f. The complete set of trials in opinion survey form can be found on the author’s website [28].To determine whether a path is persistent (or a random walk), the null hypothesis isN/2≤s, where H(Pi)≥0.5 is a failure if testing for antipersistence and H(Pi)≤0.5 is a failure if testing for persistence.To estimate the effect size robustly, we use the Hedges-Olkin index [19]:(12)γ1*=Φ-1(q*),
where q*  is the fraction of H scores in one population greater than the median of the other,  and Φ-1    is the inverse normal distribution. We use Cohen’s interpretation of effect sizes [20].To test for stationarity, we use the K-S test as follows. We divideξ′(t) of a given trial for the control and the aesthetic path exactly in half. Then we run the K-S test on each half. If P>.05 for both control and aesthetic paths, we conclude that the ξ′(t) is stationary. Otherwise, ξ′(t) is nonstationary for either control, aesthetic, or both, and we remove that trial from further statistical analysis.


## 9. Example

To make these ideas clearer, we go through an example, trial 30 from the study. The control and aesthetic paths are shown in their multiroom virtual worlds in   Figure4.Trial 56 pathfinding.
(a)(b)In general, one can see that the aesthetic path is straighter and smoother than the control path. Indeed, players rated it as more realistic, beautiful, and intelligent compared to the control  [5, 28].The charts in   Figure5 shows ξ′(t) for Trial 56 using the dot product transformation function.ξ′(t)  for Trial 56.
(a)(b)H indicates that the control tends to revert to its mean (P=.040), and the aesthetic tends to trend  (P<10-6). The dynamic range is -9.26 to 7.75 (total: 17.01) for the control and  -10.01 to 5.43 (total: 15.44) for the aesthetic path.


## 10. Results

In this section we give a summary of the experimental results. The full datasets, including charts as well as the opinion survey, are available for download from the author’s website [28, 33].Figure6  show the distributions of H(P0) and H(P1).H(control)  and H(aesthetic) histograms.
(a)(b)The distribution forℵ is in   Figure 7.Figure 7
ℵ histogram.The K-S test indicates that these data are not consistent with a Gaussian distribution(P<.01). For these reasons, all results, except where noted otherwise, are reported based on nonparametric methods beginning with   Table 1   for trials 1–100. (Recall that these trials are the ones in the opinion survey [5, 28] as well as the ones used to assess G, the “benchmark” model.)Table 1
Descriptive statistics of model results on trials 1–100.
Trials  1–100H(P0)H(P1)ℵMedian0.4640.5150.050Max0.5700.5700.264Min0.2270.347-0.071Mediand̅26.23527.326N/AWe observe that aesthetic paths clearly exhibit more memory than controls, and the median mean distance is greater by slightly more than about one step. However, an analysis ofd̅ (using the Student’s t-test [30], since the data is normal) indicates that control and aesthetic paths are not statistically significantly different with P=.24.Table2 gives results for the out-of-sample trials (101–200) and clearly (8) represents a generalization since the statistics are approximately the same.Table 2
Descriptive statistics of out-of-sample trials 101–200.
Trials 101–200H(P0)H(P1)ℵMedian0.4640.5150.040Max0.5430.5830.167Min0.2830.284-0.125Mediand̅26.20427.192Tables3 and 4 give the null hypotheses, P values, and effect sizes for trials 1–100 and trials 101–200, respectively. Again, these data suggest that (8) is not overfit.Table 3
Hypothesis tests wheres  and  f are the number of success and failures for trials 1–100.
#Null hypothesissfPγ1*Effect size(1)H(P1)≤H(P0)1387<10-151.48large(2)H(P1)≤0.52872<10-50.58medium/large(3)H(P0)≥0.58416<10-120.99largeTable 4
Hypothesis tests wheres and f are the number of success and failures for trials 101–200.
#Null hypothesissfPγ1*Effect size(1)H(P1)≤H(P0)2377<10-81.55large(2)H(P1)≤0.53466.00040.41medium(3)H(P0)≥0.58416<10-120.74largeAn analysis using the K-S test indicates that all trials (1–100) have stationary statistics except trials 69 and 88 of the control paths and trial 63 of the aesthetic paths. If, however, we remove these three trials, the statistics for the remaining 97 trials do not change appreciably as    Table5 suggests.Table 5
Hypothesis tests wheres  and  f are the number of success and failures for trials 1–100 without nonstationary trials 63, 68, and 88.
#Null hypothesissfPγ1*Effect size(1)H(P1)≤H(P0)1384<10-151.47large(2)H(P1)≤0.52671<10-50.62medium/large(3)H(P0)≥0.58413<10-121.07large


## 11. Conclusions

The data suggests clearly that the model discriminates between control and aesthetic paths. Specifically, the hypothesis tests in Tables3 and 4 indicate that (1) aesthetic paths have statistically significant more memory than controls with a large effect size; (2) aesthetic paths are statistically significantly persistent with a medium-to-large effect size;   (3) control paths are statistically significantly antipersistent with a large effect size. Removing even those trials which are nonstationary (Table 5) does not appreciably affect the statistical significance or effect sizes. We conclude that  these results tend to strongly confirm the model as being a robust and effective discriminator of aesthetic versus control pathfinding.Furthermore, the model is not reversed; that is, aesthetic paths have more memory, and controls have less memory. The model furthermore is general (i.e., it is not overfit) and has features of simplicity we suggested as guidelines. By these criteria,ℵ is a distinct improvement over the “snapshot” method of G.Since we carried out tuning of  (9) manually, we believe that automated methods using, for instance, genetic programs, might be a fruitful avenue for future research.  Since furthermore aesthetic search   has also been manually tuned (see [15]), there is also the possibility to use automated means for aesthetic optimizations and corrections as additional opportunities for further study.Finally, we suggested at the outset some motivations for this research that include, in general, assessing dynamic aesthetic values for nonshortest path motion planning. The model may well facilitate the study of these ideas and concepts as future work.



---

*Source: 318505-2009-09-06.xml*