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

[freeciv-ai] Re: New settler code

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Jason Dorje Short <vze49r5w@xxxxxxxxxxx>
Cc: Freeciv AI development <freeciv-ai@xxxxxxxxxxx>
Subject: [freeciv-ai] Re: New settler code
From: Mike Kaufman <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 14 Apr 2003 10:21:54 -0500

On Mon, Apr 14, 2003 at 11:11:55AM -0500, Jason Dorje Short wrote:
> Per I. Mathisen wrote:
> > 
> > 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.
> 
> But each player just needs one bit of information for each tile, right? 
>   So 97% of this 3mb is empty, and could be eliminated if you used a 
> bitfield.
> 
> Moreover, for systems where std_bool uses a char values as boolean, the 
> 3mb is reduced to 750k anyway.

after glancing at the code, no, Per wants to be able to put a city or unit
id on the tile, which requires a full int. I'm not familiar enough with the
code or the problem, but it does seem to be an unoptimal solution with
regard to memory considerations.

-mike


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