glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [glob2-devel] Re: Full Nicowar behaviour assessment


From: Stéphane Magnenat
Subject: Re: [glob2-devel] Re: Full Nicowar behaviour assessment
Date: Fri, 10 Feb 2006 21:00:59 +0100
User-agent: KMail/1.9.1

> Yes, i've been thinking about that too, but how? How could i
> guestimate avaialble resources? Maybe if i kept track of chunks of
> ressources, but then how do i decide which are mine and which are my
> enemies?

Here is an idea, it's an approximation and I don't know if it works well in 
practice. If you divide the maps in swaure of, let say 16x16. You consider a 
square "belonging to you" if there is a building in it. You then compute the 
density of food in all the square belonging to you. This is not very precise, 
perhaps the algorithm should be more intelligent, by taking into account 
ressources blobs connected to those squares or by taking into account every 
ressource that is up to a certain distance to a building. You can compute a 
mask of position to take into account and update the mask only on building 
creation/destruction. Furthermore, updating this information is not very 
frequent as globally ressources do not disappear in one tick.

Have a nice day,

Steph




reply via email to

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