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: Tue, 18 Jan 2005 19:15:09 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041024

The bug got tracked. I'm currently testing a new experimental system.
I'll commit it when it will be a bit more tested. OK, now it's a bit
tested, please send comments. Wait about 2 min from old games for the
system to stabilize....

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

Algorithm:

A) The unit start the process. When an unit is free (not hungry, and
not too much damaged), it will look for all buildings needing workpower.
Some priority are involved:
1st) finished food buildings (Inns) needing food
2nd) unit will try to find a place to upgrade itself
3rd) clearing flags
4rd) buildings to build, swarms to fill, towers to fill
5th) if not totaly healed, find a healing place.
This is a strict priority list.  An unit will only try to find something
in a lower priority if there is nothing to do in the higher one.
In the same priority level, the best building is choosen. This choice
is well tuned, and involve exacts distance to the building, all
distance to ressources, and the possibly already carried ressource.

B) When the building is choosed, the unit "subscribe" to the building.
Any amount of unit can subscribe to the same building. For instance,
if you have an map with 100 free units, and there is only one job, then
they will all subscribe.

C) After a given amount of time (this amount of time is the question),
the building will make up a choice. It will choose along all subscribed
unit the most suitable one(s), and free the others.
If there is not enough units to fill all requested units, it will
continue requesting for new units.





reply via email to

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