Author Topic: [fixed] r4429: CPU units dying of hunger, + observations  (Read 633 times)

filux

  • MegaGlest Team
  • Draco Rider
  • ********
  • Posts: 310
  • was OpenSuse x64, is Debian testing x64
    • View Profile
Sometimes it happens that the CPU units dying of hunger and I decided to look into the issue closer and noticed a couple of reasons for this.
I describe them illustratively as I see it from the point of view of the observer.
Problem occurs when the CPU produces combat units faster (e.g. in multiple buildings and/or which consume more than one resource) than food production units.

1. "too large sleep time between controls/checks how much "food" is now".
I suggest a significant reduction of this time, so on eye 10x.

2. "always command to produce one animal"
(even if cpu has a few farms, "only one building produce only one animal at one time").
If the time between checks will accordingly shortened, then it might be as is now, otherwise I suggest to give commands to the production of several animals "in one check".

3. "CPU unnecessary builds buildings for food" .
(e.g. more than one farm, more than one main building, more than one other building {for example romans' temple})
There is many different buildings producing food in different factions and will be probably more in the future.
Here I suggested some additional variable being placed directly in the "units.xml" for example:

into farm.xml
<CPU-produce-resource enabled="false"/>

and into cow.xml
<CPU-produce-resource enabled="true"/>


...and cpu of course produces only units with "true".

All the examples described observations about food but the case is similar to other resources (eg energy, housing) so improvements should be universal.
« Last Edit: 15 June 2013, 18:59:19 by filux »

filux

  • MegaGlest Team
  • Draco Rider
  • ********
  • Posts: 310
  • was OpenSuse x64, is Debian testing x64
    • View Profile
Re: r4429: CPU units dying of hunger, + observations
« Reply #1 on: 15 June 2013, 18:58:02 »
r.4458
Tests have shown that the point number 1 and 2 together can be considered as fixed :).
Now the "sleep time" is short enough that you can see sometimes situation when animals are produced almost one after the other.

... and a little of research data taken from summary of the battle.
CPU as only one player on the map and I as a observer.
Quote
Game duration: 44:29
Total units at game end:1000
Deaths: 0
Units produced: 935
(Here you can see a minor bug, but will be created a separate topic for it.)

... and now completely impossible in the real battle the growth/expansion.
Quote
Game duration: 02:37:43
Total units at game end:2958
Deaths: 438
Units produced: 3303

Now point number 3 no longer fit to this topic so for it also will be a separate topic.

By the way. Informatively to point 3:
I did the tests with set limit to one for these buildings, and it does not affect in any way to the starving deaths.
« Last Edit: 15 June 2013, 19:34:08 by filux »

 

anything