glob2-devel
[Top][All Lists]
Advanced

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

Re: [glob2-devel] Nicowar changed to gradients, requesting tips on updat


From: Nuage
Subject: Re: [glob2-devel] Nicowar changed to gradients, requesting tips on update algorithm
Date: Sun, 29 Jan 2006 23:38:24 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051107

Andrew Sayers wrote:
> On Sat, Jan 14, 2006 at 06:36:39 +0100, Nuage wrote:
> 
>>Maybe using gradients that goes up instead of down may confuse coding newbies,
>>which I don't care. Same thing for the special values "0" and "1" which are
>>differents than the other gradient system. Note that using gradients which 
>>goes
>>down allows you to compute gradients with smaller range, it's only faster.
> 
> 
> Could you expand on this please?  How does this affect speed?

Just a simple trick. Well, you can actually do it with the other system too now
that I think about it. Still here is the trick:

When the gradient system (the going down one) propagation reach 2, nothing more
can be achieved and there is no more propagation. When you know you don't want
to measure a further distance than a given constant, you just start at it. For
instance AICastor want to know where resources can growth, and how much. So it
creates a gradient starting at "8" at every place with water, and propagate it
to see the most favored places for resources growing. (this is still an
approximation).

And as I just realized you can use it in 16 bits gradients by starting at
2^16-8. So there is no more point.



About speed: From what I have measured on my computer, I *believe* that the
gradients of size 128x128 are still limited by cpu, but 256x256 is limited by
memory bandwidth from ram to CPU. If this is indeed true, computing gradients on
16bits will be two times slower at 256x256. For this reason I think we should
not use 16 bits gradients now.

So the best way to try 16 bits gradients would be... put them in some AI to try
them! So it's a great idea to try it.

Good night... I am tired now...




reply via email to

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