I'm working on a complex engineering problem that I've essentially reduced to this problem:
I have a set of natural numbers $1,N$ and a grid (square or hexagonal) of exactly $N$ cells. I have to map each number to each cell so that the distribution (in a geometric sense) is as flat as possible. I'm still working on the definition of flat, but so far
The average of the numbers of a cell and its nearest neighbours must be as close to $N/2$ as possible, for every cell.
The average of the distance between a cell and each neighbour must be as large as possible.
If a cell has a number $n$ and its neighbour $m$ the distance between these neighbours is $min(|n-m|,N-|n-m|)$. It's essentially cyclical.
If $.$ represents a small number and # a large number I'm looking chessboard-like configurations like
.#.#.#.# #.#.#.#. .#.#.#.#
I need to find the best configuration (or a very good one) without using brute force.
Can you point me to some good algorithms that may be useful for this problem? I could only get above-average results on my own.
In my problem $N\approx~500$ and there is no runtime constraint.