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: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Mon, 14 Apr 2003 19:50:34 +0200

On Mon, Apr 14, 2003 at 11:11:55AM -0500, Jason Dorje Short wrote:
> Per I. Mathisen wrote:
> >On Sun, 13 Apr 2003, Mike Kaufman wrote:
> >
> >>On Sun, Apr 13, 2003 at 08:59:17PM +0100, Gregory Berkolaiko wrote:
> >>
> >>>Now I finally got to citymap and I don't like the concept.First of all,
> >>>it means that AI players work in coordination: they do not try to make
> >>>cities on others' spots.Secondly, I don't like mixing server and AI and
> >>>here you have server creating a city and putting it on AIs map.I feel
> >>>that citymap should be maintained on per-player basis by players
> >>>themselves.This will lead to more CPU usage, but I think this is the
> >>
> >>Amen. This is exactly what I'm talking about Per. Please do not continue
> >>down the path of more tightly integrating AI into the server.
> >
> >
> >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.
> 
> 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.

SMA uses a list of structs as values in a hash which is keyed by the
position. Actually the hash as the attribute hash. It is known that
you get slower lookups this way.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  The trick is to keep breathing.



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