On 20.09.2012 12:36, Michael T. Pope wrote: > On Thu, 20 Sep 2012 08:28:17 AM Michael Vehrs wrote: > >> This looks like a rather hairy problem, since we are basically doing >> everything right already. Except that in the case of starvation, we need >> to look into the future. >> > The higher level fix (starve.diff) is still an option if you think the > production code is doing the Right Thing, however ISTM that the problem is > that the decision to build is too simplistic. Rather than just `>= 200 food', > it should be `>= 200 + one-unit-consumption if net food production is -ve'. > Not elegant I admit. > > >> Also, I don't understand why >> ServerTestHelper.newTurn() doesn't update my test game properly. >> > No idea. Last time I looked (the teaching tests, ugh) it worked for me. > > Cheers, > Mike Pope >
Finally, I have found the root cause of the starvation bug: the ProductionTree code does not allow for negative values. At the moment, I am not sure whether this problem can be fixed without any serious fallout. Regards Michael ------------------------------------------------------------------------------ How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ Freecol-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freecol-developers
