Follow-up Comment #2, patch #6518 (project freeciv):

> I probably were worried about potential timestamp/age related issues [...]
> merging to existing information would no longer be of tile granularity

Hm, good point.

It feels like we could go a long way by using the knowledge that the donor is
an authority on their own borders to resolve merges.

Before transfer, I think there are two possible cases of a player A map tile
with divergent information ages:
0 A tile currently owned but not seen by player A.
0 A tile lost by player A since they last saw it. (Probably has recent owner=B
information where B is conqueror, per comment #0.)

Let's assume we just track tile contents age per-tile as currently, and ignore
border age (because per-tile per-player tracking would eat lots of memory);
then on transfer to player C with newer tile contents than A, the risk is that
C will fail to take advantage of A's newer border knowledge (and that mistake
can then propagate on).

We can often override the merging algorithm:
* For case 1 above: for a simple transfer from A to C, C knows A is an
authority on their own borders, so if they say they own a tile, believe them.
** For case 2 above: if A says they *don't* own a tile, and C thinks they do,
and C has newer tile knowledge, C could take A's owner even though it might be
out of date, since C can infer that C's border knowledge is clearly older than
A's in this case.
* For shared vision known-not-seen updates, it looks practical to track that
knowledge on to third parties, so that player maps for players X receiving A's
tile knowledge via C are updated in the knowledge that the information about
A's border came from A and is authoritative.

For case 1, that just leaves a tile with divergent data from A copied to a
player D who had older tile knowledge, that is then propagated on to players X
with newer tile knowledge than D; they would believe the border knowledge to
be old and ignore it. (Rumours 

Using the negative border inference mitigates case 2, even though the
information that the border knowledge in A's map is new is lost immediately.
Consider:
* Imagine B's borders have encroached on A, through unseen territory into
territory seen by A. A has an accurate picture of A's border, and hence B's
too, because A saw itself losing ownership of every tile.
* On a map transfer from A to C who saw A's unseen territory since A, if C
doesn't use negative knowledge, C will end up with an outer ring of
supposedly-A's territory (really B's) surrounding an area of B's territory
(the part A can see). However, if C infers that the outer ring is no longer
A's, they can believe A's owner info and end up with the same map as A.

In many cases, I think players will be receiving knowledge about a tile from a
player whose territory is near it, and will be able to use one or other
inference to help them.

...it's complicated, and won't give results quite as good as per-tile
tracking, but may be worth it? I'm inclined to try it.

I also considered tracking in player X's map the turn when the last time a
full map transfer was contributed from each of players A, B, C, ... and
propagating those dates via further map transfers. That would be sufficient
information for whole-map transfers, which are the most common kind. It
doesn't help with the new partial map transfers. I'm also not sure how it
interacts with case 2 above. Probably not worth bothering with.

(Other unrelated stuff I considered while thinking about this:
* foggedborders=ALL border knowledge transfer is simple, because it can't get
out of sync with tile knowledge. IIRC we don't do this properly currently; I
think we should implement this.
* Extra ownership: I think this should propagate with tile knowledge in all
cases, in the same way city ownership does, and not with border knowledge.
That could lead to some obviously contradictory situations on recipient maps,
but that's true today as well.)

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?6518>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to