glob2-devel
[Top][All Lists]
Advanced

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

Re: [glob2-devel] Workers not getting assigned to tasks


From: Nuage
Subject: Re: [glob2-devel] Workers not getting assigned to tasks
Date: Wed, 19 Jan 2005 00:47:39 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041024

Gabriel Walt wrote:
If you want to help, try to understand the algorithm, and then report
suggestions, based on your experiments.


Wow this explaination is great - exactly what we needed. So it is potentially possible that a unit waits during 15sec for the building to confirm it's job assignation?

Not exactly. Well, it where possible.
Before the fix, the time where 16[ticks] since the _last_ unit did subscribe.
But if a new unit subscribe, the building will wait aggain. This could make
the overall time for a building to wait to choose an unit quite long.
After the fix, the time is 32[ticks] since the _first_ unit subscribed. (This
allows exactly the slowest units at speed 8 to be sure to subscribe. Because
an units only look for a building at the end of a move. The time of a move
is equal to 256/speed, which is then 32[ticks] for those slowest units.)

Still, an unit can take long to find out a job, because if it get refused
at each building (because the building found a better unit).

Notice that an unit will only work at a place the feeding level is high
enough to at least bring one ressource.


Could you also explain what happens if a unit is very damaged. Does the unit refuse to work or simply give priority to free hospital in it's priority list? And under which level of health does this different behavior happen?

Yes, when an unit is too much damaged (red), or too much hungry (red), then
it will refuse to work.
This constraint is the very first priority. A damaged unit will only wait
for a free health building (hospital).
The only flexible thing is when an unit has nothing to do, and there is
a free hospital, and it has lost at least 1hp, then it go to heal (instead
of doing nothing).

Same for hungry units... How does this precisely work? Does a unit start seeking for food as soon as it's energy level reached zero, or does it start seeking for food before (and if before - at what level)? And if the energy level dropped to zero, health starts decreasing, right? And what happens if a unit is hungry but there is no place in any inn - does it continue working?

Same than for health. There is a trigger, below wich the unit will refuse to
work.
But, there is a (small) flexible margin allowing an unit to finish to bring
a ressource back. For this reason, you can sometime see an unit to stop working
just after it droped a ressource.
A hungry unit will not work to anything, even if there is no food building,
and even if it could bring food to a building.
"hungry worker"+"empty Inn"+"avaliable wheat" == death


Also about unit conversion - is there any proximity effect for the available inns? If an ennemy's inn has the same amount of fruit than the friendly inns but is nearer, where will the unit go?

A) The unit looks for the best available (food amount+fruits+available slot
in the Inn), at every ennemy Inn. This is the happyness level it want to have.
B) The unit looks for the same happiness level in it own colony. The available
Inns with a lower happyness level will be ignored. If one friendly Inn is found,
therefor with the same happyness level of the ennemy, the friendly one will be
choosen.
C) If no friendly Inns with the same leve is found, the unit will get converted
to the closest aviable ennemy Inn, with at least the choosen happyness level.

Then:
-There is some proximity effect, if you are 2 colonies who want to steal
the units of a 3rd colony. But the furthest units of your colonies are no more
in danger the the other closest ones.
-The ennmy need to have strictly *one* fruit more to have a chance to convert
one unit.
Notice that most of the time, the randomness of the game make that the Inns
are often no filled with all available fruits. This is why, if both colonies has
access to the same number of fruits, the one who make the best access to them
will sometimes steal units.

Thanks a lot.

you welcome :)
just ask if this is not clear enough




reply via email to

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