I ran new test to get complete logs. I did separate the stats depending on the GradientType. I remove the line without occurences.
// this is GT_UNDEFINED ie, AICastor: listCountSizeStatsOver[0]=0 listCountSizeStats[0]: [ 0-> 255]: 282 [ 256-> 511]: 47 [ 512-> 767]: 3 [ 768-> 1023]: 105 [ 1024-> 1279]: 305 // this is GT_RESOURCE: listCountSizeStatsOver[1]=0 listCountSizeStats[1]: [ 0-> 255]: 8623 [ 256-> 511]: 3152 [ 512-> 767]: 6174 [ 768-> 1023]: 1543 [ 1024-> 1279]: 1496 // this is GT_BUILDING listCountSizeStatsOver[2]=0 listCountSizeStats[2]: [ 0-> 255]: 701 [ 256-> 511]: 1045 // this is GT_FORBIDDEN listCountSizeStatsOver[3]=0 listCountSizeStats[3]: [ 0-> 255]: 160 [ 256-> 511]: 0 [ 512-> 767]: 0 [ 768-> 1023]: 0 [ 1024-> 1279]: 1 [ 1280-> 1535]: 0 [ 1536-> 1791]: 2 [ 1792-> 2047]: 3 [ 2048-> 2303]: 0 [ 2304-> 2559]: 0 [ 2560-> 2815]: 1 [ 2816-> 3071]: 1 [ 3072-> 3327]: 2 [ 3328-> 3583]: 0 [ 3584-> 3839]: 0 [ 3840-> 4095]: 0 [ 4096-> 4351]: 0 [ 4352-> 4607]: 0 [ 4608-> 4863]: 13 [ 4864-> 5119]: 0 [ 5120-> 5375]: 3 [ 5376-> 5631]: 2 [ 5632-> 5887]: 1 [ 5888-> 6143]: 3 [ 6144-> 6399]: 15 [ 6400-> 6655]: 2 [ 6656-> 6911]: 1 [ 6912-> 7167]: 4 [ 7168-> 7423]: 0 [ 7424-> 7679]: 1 [ 7680-> 7935]: 0 [ 7936-> 8191]: 13 [ 8192-> 8447]: 0 [ 8448-> 8703]: 3 [ 8704-> 8959]: 2 [ 8960-> 9215]: 1 [ 9216-> 9471]: 1 [ 9472-> 9727]: 0 [ 9728-> 9983]: 14 [ 9984->10239]: 5 [10240->10495]: 0 [10496->10751]: 1 [10752->11007]: 1 [11008->11263]: 3 [11264->11519]: 1 [11520->11775]: 0 [11776->12031]: 0 [12032->12287]: 0 [12288->12543]: 0 [12544->12799]: 0 [12800->13055]: 0 [13056->13311]: 0 [13312->13567]: 0 [13568->13823]: 0 [13824->14079]: 0 [14080->14335]: 0 [14336->14591]: 0 [14592->14847]: 0 [14848->15103]: 0 [15104->15359]: 0 [15360->15615]: 0 [15616->15871]: 0 [15872->16127]: 0 [16128->16383]: 0 // this is GT_GUARD_AREA listCountSizeStatsOver[4]=0 listCountSizeStats[4]: [ 0-> 255]: 140 As you can see, this is more than unlikely anything to happen here. The "worst" gradient computation is GT_FORBIDDEN. But as all values are 255, it's fine. This reach big numbers because the forbidden gradiens starts with all places but the not-forbidden as sources, minus the place one can't go to, like stone, and water for non-swimming gradients. So, first, I think you agree, but this really don't worth to worry about this. We should put a comment into the code anyway. If you need ordered listedAddr[] for furthe optimisation, just don't process the GradientType==GT_UNDEFINED. Let the simple gradient computation handle it. Is that ok with you Kai and Simon ? _______________________________________________ glob2-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/glob2-devel
