Search code examples
polygonmetricsevaluationprocedural-generation

Calculating Fitness function for Polygonal Map Generation


I'm currently working on a thesis regarding procedural map generation and using fitness functions to calculate the capability of the algorithms used and their resultant procedural maps.

I'm basing my work off of Amitp's Polygonal Map Generation, found a Unity version I could use from his sources, updated it to a recent version, corrected some missing sections and stripped away some eye candy which goes beyond the scope of my thesis. The problem now is to run fitness functions on it.

enter image description here

Some notes on the map:

  • The map isn't intended to have any practical resources or bases (which is one of my major problems in regards to calculating fitness functions, since the ones I found assume the presences of such elements)
  • The focus is to evaluate at least a couple of algorithms (perlin is one of them, second one I'm not sure yet - could be the radial process included, however I have yet to find a paper discussing this algorithm to validate its use) for how "fit and healthy" the maps that result from these algorithms are.

As for the fitness functions, sourced from the following paper: Toward multiobjective procedural map generation (Julian Togelius). These focus around fairness, interestingness and playability - not necessarily the most applicable components for my line of work, but it's the only metric evaluation I've been able to locate thus far.

  • Base Distance (Average weighted distance between bases). Considering a map without any bases (or discrete resources for that matter), this is a tough one to use.
  • Base on Ground (Average elevation per base from ground). Same as above.
  • Map Asymmetry (Average elevation difference between strategically chosen cells and their counterparts opposite on x and y axis). This is weird to use due to the nature of Polygonals' map generation by Amitp - elevation increases inland, and the map is polygonal, therefore there are no direct opposites on x, y or any other midway axis.
  • Resource Distance (1- [max dist - min dist]). As above, no discrete resources to speak of. The entire map could be considered a wide variety of resources in this case.
  • Resource Clustering (How abundant / scarce resources are) as per above.

So i'm really just stuck at this point... I am attempting to evaluate somehow, the potential fitness and health of a map, but the only functions I could find clearly do not relate to the kind of polygonal map generation present that I'm able to work with, and my attempts at transferring this approach to a gridded system, while not fruitless were nowhere near the expected outcome.

My Question

How can I adapt these above fitness functions to fit a polygonal map, shown below, or alternatively locate some alternative fitness functions (which are scholarly valid) to utilize instead for calculating such results.

Coming up with my own functions may not be valid, if there is no background study somehow validating the use of such metrics, even though I can't entirely rule out the possibility as a backup.


Solution

  • The Togelius paper is specifically looking at maps for RTS type games. Amit's guide is making game agnostic maps. If you want to examine them through an RTS lens, you'll need to convert them RTS maps. (This is generally true of procedural content generation - you typically need to modify a general technique for use in a specific genre/game/context.)

    Alternatively, you could attempt to evaluate the maps just as generic maps, but you'll still need something to compare them to. For instance, you could take a couple of different PCG island map generators & compare the output to real islands.

    Either way, without some additional context coming up with a quantitative measure of a map's 'goodness' is likely to be arbitrary. I can see ways you might adapt the Togelius metric for other genres, but I don't think they would generalize in a meaningful way to measuring generic maps.