Complete.Org: Mailing Lists: Archives: freeciv-ai: April 2003:
[freeciv-ai] Re: New settler code

[freeciv-ai] Re: New settler code

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <per@xxxxxxxxxxx>
Cc: Freeciv AI development <freeciv-ai@xxxxxxxxxxx>
Subject: [freeciv-ai] Re: New settler code
From: Mike Kaufman <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 13 Apr 2003 16:25:25 -0500

On Sun, Apr 13, 2003 at 08:32:20PM +0000, Per I. Mathisen wrote:
> Apparently you don't appreciate the genius of this code ;)
> Duplicating the map for each player will not consume more CPU, but more
> memory. The current implementation uses 61kb. Multiply by 32 players, and
> you spend 3mb.

If you were to actually have a game with 32 AI players, 3mb would be the
least of your worries.
> That is totally meaningless, since each player will generate almost
> exactly the same map. You do not want to try to settle on top of another
> player's city. This "try to make cities on others' spots" almost never
> happens in real games (and in the in rare cases where it does happens,
> because of danger, it is usually for allied players, where you'd want to
> coordinate anyway).
> To explain more carefully what this code does: This is a map of the world
> containing only a single int value. If this int is zero, the tile is
> unassigned. If it is positive, then this tile is within city radius of one
> or more cities - it is increased by one for each such city. This way you
> know the "crowdedness" of a tile. If it is negative, it is reserved by a
> settler or a city worker with given unit/city abs(id).

Also (though I know you abhor it) this should definitely take into account
unknown tiles (which is why I suspect you get such good results: the AI
sees all the great positions regardless of whether he should) For this you
need separate maps.

> Yes, it unashamedly uses omniscience and does a bit of coordination
> between AIs in a few rare situations that almost never arise, but it is
> very good at catching errors, uses little memory and works very well. I
> do not want to change it.

well, it should be ashamed. And why shouldn't AIs fight over good
positions? In this case I think that correctness in concert with foresight 
should give cause for reconsideration of your positon.


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