[freeciv-ai] Re: (PR#9021) AI data gets obsolete
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=9021 >
Gregory Berkolaiko wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=9021 >
>
> 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).
jason
- [freeciv-ai] Re: (PR#9021) AI data gets obsolete,
Jason Short <=
|
|