glob2-devel
[Top][All Lists]
Advanced

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

Re: [glob2-devel] gradient improvement


From: Nuage
Subject: Re: [glob2-devel] gradient improvement
Date: Tue, 04 Apr 2006 01:43:25 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051102

Currently, the method caller can put anything it want into listedAddr. AICastor
actually use it for building placement, and I guess AINicowar too. Check who is
creating it for further debugging and info.

If we want to rely on the fact that listedAddr is ordered for further
optimization, we have to fork the cases. One who can call the optimized one, and
one who can only call the less-optimized one. This would be smart actually.

Nuage

Kai Antweiler wrote:
>>I don't know about all the places which initialize a gradient, but if
>>gradients are really initiallized with different values, I think this
>>is a bug. (listedAddr would no more be guaranteed to be big enough
>>because fields could be listed more than once)
> 
> 
> Ok.  I now I'm sure.
> I have changed Map.cpp to print out errors when former and present g
> differ two much.
> 
> in updateGlobalGradientVersionSimple:
> 
> Uint8 oldg=0;
> while ( ... )
> {
> ...
> Uint8 g = gradient[(y << wDec) | x] - 1; 
> if ( (oldg != 0) && (oldg != g) && (oldg != g+1)) 
>         std::cerr << "oldg: " << (int) oldg << "g: " << (int) g << std::endl; 
> oldg = g; 
> ...
> }
> 
> Then I started A Big Pond with one AI in my team and one in the other,
> saved the game and started glob2 again with -nox and this saved game.
> After a minute or so I got a lot of output like:
> 
> ...
> oldg: 137g: 138
> oldg: 138g: 136
> oldg: 136g: 137
> ...
> 
> I attach this change as a patch and copy this mail to the bug tracker.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> glob2-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/glob2-devel





reply via email to

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