Complete.Org: Mailing Lists: Archives: freeciv-ai: June 2004:
[freeciv-ai] Re: (PR#9021) AI data gets obsolete

[freeciv-ai] Re: (PR#9021) AI data gets obsolete

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory.Berkolaiko@xxxxxxxxxxxxx
Subject: [freeciv-ai] Re: (PR#9021) AI data gets obsolete
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 18 Jun 2004 08:25:31 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: >

Gregory Berkolaiko wrote:
> <URL: >
> AI data is initialized every turn before anyone does anything.  This is
> necessary because the diplomacy phase, which comes first, needs fresh data.
> However, by the time an AI player gets to manage_units, the data is
> already obsolete as other players could have taken our cities and killed
> our units.
> Should we do anything about it?

Re-initialize it?

Under an alternating-movement system (which we should eventually use for 
single-player) this should not be a problem since players should go in turn.

With an asynchronous or multi-threaded AI it would be possible to 
(re)calculate this data during the turn.  Say someone conquers our 
city...we can spend some time recalculating the AI data.  This won't 
slow things down since we're waiting on the human player anyway (as long 
as it is a human player doing the moving).


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