Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2004:
[Freeciv-Dev] Re: RFD: Savegames and autogames
Home

[Freeciv-Dev] Re: RFD: Savegames and autogames

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: RFD: Savegames and autogames
From: Jason Dorje Short <jdorje@xxxxxxxxxxxx>
Date: Fri, 24 Dec 2004 13:54:41 -0500

Christian Knoke wrote:
On Fri, Dec 24, 2004 at 04:17:39PM +0000, Per Inge Mathisen wrote:

Opinions?

- Test mode for savegames w/ AI data

Hmm.

- Recalculate the AI every turn from the data that is saved in savegames
  anyway, so you don't need to save it.

The problem is more complicated than that (or than PR#436 indicates). If you calculate settler want every 10 turns then if there's a saved game in between, the only way to get the same results is to save the entire cached settler map. This is possible but it may make the savegame large. The problem is there's no real limit to how much cached data the AI may build. And even if it's only used on the turn it's created on (if it's recalculated each turn) you still have to save it because savegames happen mid-turn (actually if you calculate the data during the end-turn you can be assured it will still be valid for the next begin-turn - but this doesn't help if your cache remains around or multiple turns).

This problem becomes worse if we have a multithreaded or asynchronous AI that continues running during the human players' turn. Then a save can happen even in the middle of some AI calculations so even data that is cached and used on the same turn cannot be counted on.

In summary this may not be solvable. But then PR#436 was only a pipe dream anyway. Yet I do wonder how other games seem to manage this so easily.

jason



[Prev in Thread] Current Thread [Next in Thread]