There is a
loss function
that this use case seeks to define.
Let "distance" measure the shortest path through the graph
connecting a pair of nodes.
Let "distance ratio distribution" describe what that looks
like across all node pairs, normalized by
crow flies
distance (L2 norm Euclidean distance).
It is a measure of how inefficient the shortest graph path is,
relative to the shortest flight of a crow.
No node is more important than any other,
since we choose them uniformly at random.
this leads to quite densely connected maps; there are convenient routes literally everywhere to everywhere.
Put another way, the distance ratio distribution is
too compact. Its min, median, average, and max are all
just slightly above unity. We have constructed a very
small world
planar graph.
I'd like some places to be "harder" to get to, ... I'd like less "connection density".
In a "large" Delaunay triangulation, essentially all nodes
are interior nodes. Such nodes have degree >= 5.
We will consider nodes of lesser degree to be peripheral nodes.
Controlling the degree of interior nodes
impresses me as your central issue.
build a graph
Mark nodes in your Delaunay triangulation as "peripheral" or "interior".
Choose a max_degree threshold parameter of degree 3.
The degree of most nodes will not exceed the threshold.
Initialize a new graph with no edges.
Produce a set of connected components.
We will stop adding edges when there's a single connected component.
Keep track of number of nodes in each component.
Iterate over all peripheral nodes, assigning each one a single new edge.
Merge connected components as you go.
Now loop until we have just one component.
Choose a candidate (empty) edge at random, and examine its two nodes to see if we should add it.
Perform several rejection tests, looping back if any test fails:
- both nodes are in same component? --> reject
- compare the sizes of each node's component
-
- equal sizes, and both nodes have degree >= max_degree? --> reject
-
- node in smaller component has degree >= max_degree? --> reject
The idea is there will be one growing giant "rich get richer"
component that peripheral components will need to attach to.
So as an escape valve, a few of its nodes may need a slightly
elevated degree. We might limit them to max_degree + 1.
Also, using probabilistic comparisons, against max_degree + random,
would offer a further tuning knob.
Having connected all nodes in that way,
you can now compute the distance ratio distribution
to see if you're happy with it, choosing to
start over if not.
Pick a geographically central node.
Then you can compute average distance to peripheral nodes.
You can also compute standard measures like
graph diameter.
Both of these will matter to your players if they
have resource constraints like a fixed-size vehicle gas tank.