Complete.Org: Mailing Lists: Archives: freeciv-ai: April 2002:
[freeciv-ai] Re: README.AI
Home

[freeciv-ai] Re: README.AI

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx>
Cc: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: README.AI
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 26 Apr 2002 11:56:42 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Fri, Apr 26, 2002 at 11:36:03AM +0200, Per I. Mathisen wrote:
> * AI doesn't understand how to favor trade when it needs luxury.

The CMA may help here.

Mike: should be publish our thoughts about the AI and code movement?

> * City tile values are not cached; wastes CPU time.

While looking at performance I implemented such thing. Result: very
small speedup. You just need to flush the cache too often:
 - everything which changes the happy state of the city (change of the
 citizen assigments, new trade routes, ...)
 - if government changes
 - if tiles on the city map changes
 - if city grows

So in short you have to invalidate the cache at least every turn and
maybe even multiple times a turn.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "SIGDANGER - The System is likely to crash soon"


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