TownyAdvanced/TownyProvinces

Investigate why provinces sometimes always run NW

Opened this issue · 0 comments

DESCRIPTION

  • With certain region defs, this happens:
    image

  • What you are seeing here is regions being generated in a NorthWest direction.

  • This seems to happen when the brush size is very small

  • I'm thinking that maybe this is the FILL-UNCLAIMED-CHUNKS function

  • It is not a randomized function. Therefore if it is effectively left to itself, it could well do something predictable each time like this,

    • Issue A: It gets the list of unclaimed coords to process by simply reading the data hasmap one value at a time. This is not a randomized process, which is important, because the function processes the coords one by one, and once a coord is processed and claimed, it can often lock out some of its neighbor coords from being claimed
    • Issue B: The function then processes each unclaimed coord, which it claims if there is one province nearby. It looks in a non-randomized.........but actually I don't think this is the problem, because process B can only ever return one result. There is no room for randomization. Therefore I suspect the problem lies with issue A.

SOLUTION:

  • Shuffle the unclaimed coords list before processing ?