Worker moves

Was this useful to you?

  • Knew it already. I'm bored now and will go and read something else

    Votes: 8 42.1%
  • WOW! I never knew that

    Votes: 10 52.6%
  • Sorry, I don't understand a word of it

    Votes: 1 5.3%

  • Total voters
    19

KayEss

Gone to the dogs
Joined
Feb 1, 2004
Messages
227
Location
Bangkok
The first post of this article completely failed to take into account the differences between single player games and multi-player games. This was entirely my own fault as I only do Play by Email games these days. My thanks to Thot for pointing out the error of my ways (even though I wasn’t thanking him when I first found out :blush: ).

For those that can’t make head or sense of the thread I’ve tried to put all of the information into one more coherent document. This is available from my web site.

Also thanks to smiggins, Sir Bugsy, Pang & Tai for reading through it before posting.

Worker moves

There are important differences between how worker orders are executed between single player games and multi-player games. This analysis contrasts the differences between single player and Play by Email games – it should hold equally for other types of turn based multi-player games, but this has not been tested. For turn-less games all bets are off.

The key point is a contrast between how worker jobs are executed. The game dynamics are very different between the two types of game and anybody switching from one type of game to the other should be aware of these differences.

This is shown by the following premise:
If you are going to make a road that is going to take three turns to complete then you should either assign one worker or three workers to the task. If you assign two workers then you will waste one worker turn (it will still take them two turns to complete the road).​

Although true for a single player game, this is false for a multi-player game! Hopefully the analysis contained here will help players increase the flexibility of their worker gangs by shedding some light on the worker model use in Civilization III.

Please note that anybody who wants to get into this should already be familiar with Cracker’s analysis of worker orders. There’s no point in utilising this information without already understanding that.

I have been using Conquests to do these tests, but I’ve seen the same behaviour in Play the World and don’t expect that it will be any different in the vanilla version.

Important points

The analysis is a bit long in places so I wanted to get the important conclusions into the open at the start for those who just want to know the facts. For more detail continue to read the article.

The single most important point

In a single player game the dynamics are such that all workers in a stack will finish at exactly the same time even if this involves wasting worker effort.

In a multi-player game the dynamics are such that when enough worker effort has been put into a task then extra workers can be immediately re-assigned to other tasks.

Single and multi-player rules
  • The Industrious trait adds 50% to the amount of work that is done per worker turn. In Civilization III vanilla and Play the World this figure was 100%.
  • Do not stack workers making roads unless the turns saved to make the road is more important to you than wasted worker moves.
  • If you want a road from A to B in a hurry on flat land then you should use six non-industrious workers or four industrious workers in a stack.
  • There is a maximum worker stack size above which you will have workers who never get a chance to do any work. This depends on the terrain and the tasks, but is in any case very high. This maximum is never less than six workers and would normally be higher (four workers for an industrious tribe).
  • There are ways to stack workers and slaves that provides a good compromise for wasted moves and earlier completion of worker jobs.

Multi-player rules
  • Don’t be afraid to stack your workers in any number and feel free to have workers join other workers late.
  • Do stack workers doing any task other than making a road so long as they can start working on the same turn they move onto the square.

Single player rules
  • If you are going to add a worker late to a stack of workers (or just add the second worker) then you must calculate whether you will be better off or not. Think very carefully before doing this.
  • If you change your mind about what workers in a stack should be doing you ought not to re-assign one or more of them unless you are totally desperate. You will complete the project much later and waste even more worker turns than if you let them complete the first project.

Further experiments
Note that as the thread continues and theories are tested we will be trying to work out in a bit more detail how these things are calculated. I will therefore be editing this and posting either confirmed messages or further explanations as they become available.

Is the amount of work to be done on a tile always based on the BWT or, is the tribe base turn cost calculated and this then used? What’s the difference?

Basically this amounts to a question of when the rounding is done. This may affect your choices of what to team up and how many to team up. This is also likely to affect workers when they are in Anarchy. It will also affect how the bucket is filled when switching governments.

Contents

 
This was the main initial point that I wanted to make and had noticed in many PbEM games. It turns out that this isn't the full storey.

Play by Email Worker Moves - The simple Ancient era case

If we start in the ancient era with a non-industrious tribe then we can see that to build a road will take a base of 3 worker turns. That means of course that a single worker will take 3 turns to complete it, but how exactly does this work (the numbers are the turns that things happen on)?

  • Move the worker on to the tile
  • Start road – the first worker turn goes into the bucket.
  • The second worker turn goes into the road.
  • The third worker turn goes into the bucket and the road completes.

This means that the road will certainly be complete by the beginning of the next turn (turn 5), but would appear at some time during turn 4. What happens if we add a second worker?

  • Move two workers on the tile.
  • Start road – the first worker turn goes into the bucket. Command the second worker to build a road and the bucket now contains two worker turns.
  • The first worker adds a third move to the bucket and the road is complete. When the computer gets to check the second worker the road is already complete so this worker gets a turn.

The road is now complete a turn earlier, but also notice that the second worker is free on turn three to be moved to the next tile that needs a road or start a mine or irrigation project.

When you try this you will also see that the road is always complete by the time that the second worker arrives in your unit instruction cycle.

Forest clearing example

Here is an illustrated example to drive the point in further.

Note that the worker below will finish clearing the forest in four turns – this means that for a worker of this efficiency the work bucket is 4 turns deep. I have a nearby worker who will join the first worker next turn.


How many turns will it take to clear the forest and what will we be able to do with the workers when we complete it? Popular wisdom is that we will waste a worker turn when we add the second worker to do this. We will still clear the forest faster, but at the cost of wasting a worker turn where we could be doing something else. Let’s see if this is true.

Here is the next turn. The second worker has been moved across and as you can see the tree chopping will complete in 2 turns. Let’s add the second worker and see how it pans out.


On the next turn we see that the forest is gone, our temple is a lot closer to completion and, most importantly, that only one worker turn was needed! The other worker is now free to start irrigating.


So, was there an advantage? Clearly there was. The work was finished earlier and we were able to start the irrigation earlier. Critically we also didn’t waste any worker turns. A total of 4 worker turns were used to chop down the forest (1 + 2 + 1). The turn sequence is laid out below.

  • Move first worker to forest tile (note that there is already a road here). Instruct to chop down forest. The bucket (which is size four) now contains one worker turn.
  • The first worker adds his move to the bucket. The bucket contains two worker turns. Move the second worker to the forest and instruct him to chop it down. There are now three worker turns in the bucket.
  • The first worker adds his move to the bucket. The bucket is now full and we harvest the shield. The second worker is now free to do something else as his move was not needed to clear the forest.
 
How fast is too fast?

The following analysis uses the dynamics of the mulit-player games to work out worker wastage because in this mode there is the least wastage. For single player games you are likely to waste even more worker moves and the conclusions of the analysis still hold, although the wastage numbers are higher.

Is there a limit to the number of workers we can utilise on a project? Yes there is. If our goal is to build a road from point A to point B then there is an upper limit to the number of workers that can be usefully put to this task. Here’s how to work it out:
  • We take a stack of 2 workers and move them on to the next tile we want to road.
  • Tell both to start the road. They get their shovels and commence work.
  • One worker finishes the job, the other is now free and we move him on a tile.
  • The next worker is now free so we move him on a tile. We instruct the first worker to start a road on the new tile.
  • We instruct the second worker to start a road.
  • Both workers are finished and we’re back at step 1. We can move them on a tile.
If we add one worker then this happens:
  • We take a stack of 3 workers and move them on to the next tile we want to road.
  • We instruct them all to start building a road. The road is done.
  • We move them all to the next tile. This is the same as step 1 above.

This is pretty good, but can it be improved on? Let’s see about 4 workers:
  • We take our 4 workers and move them to the first tile.
  • We instruct the first 3 to build a road and it’s done. The final worker moves on a tile.
  • The worker on the second tile is told to road. We move the other three onto that tile.
  • We instruct the first two of the new workers to build a road and it is done. The other two move on.
  • The two workers on the new tile are told to road. The other two workers join them.
  • One of the workers will complete the road. The other three workers move on a tile.
  • We now make sure that we utilise the three workers in a stack on the new tile first. Tell them all to build a road and it completes. The fourth worker on the older tile can move through their tile on to a new tile. This is exactly the same position as we had in step 2 above.

We can carry this on to any number of workers we want. At six workers we get this:
  • We move the six workers to their new tile.
  • The first three build a road, the next three move on.
  • The three on the new tile build a road and the three who have just finished move through to a new tile.

You are now back in the same position as turn 2. Nice and easy again. But critically what happens when you add a seventh worker?
  • The first three workers complete the road. The other four workers move on.
  • The first three workers on the new tile complete that road. The three on the previous tile move through to a new tile. The fourth unit on the just completed tile moves on.

From here we have the same sequence as the six worker example except that we have an extra unit who always moves onto a new tile. We don’t get any work out of one worker every turn as he’s always moving to a new tile. This is clearly a waste of a perfectly good worker who should be doing something else.

If we were irrigating whilst we were going along then the number of workers we would need before we started to waste worker turns would be increased, but in any case there is an upper limit.

Are there any circumstances that change this? Indeed there are. If you look at a stack of workers adding rails where there is already roads then you can go through the above exercise and see that you always use as many workers as you have available. This is because the completed rail road has zero move cost and the workers will have the opportunity to work after they move onto a tile with roads on it.

So we can see how stacks work, but how efficient are they?

A single worker to road a tile takes 4 turns to do so (one to move there and three to build the road). The stack of two workers took a total of 5 worker turns to do the same task (move one worker, move the second worker and it still takes three ‘moves’ to complete the road). This means that if you move a stack of 2 workers you waste one worker move. Similarly if you move a stack of three workers then the same road takes a total of six worker moves.

This means that you should only stack workers making roads where the saved turns to get the road completed earlier are more important than the wasted worker moves!

Don’t forget though that stacking workers irrigating or mining (or any other task) is just as efficient as a single worker so long as the worker is able to start working as soon as they enter the tile. Normally this means that there must already be a road or rails on the tile.

There is another small point to consider here too. If you look at our example of more than three workers stacked to build a road you will see that the road completes even fast, but we never waste more than three worker moves per tile of road (this is on flat terrain anyway). If you really need a road quickly then you should have a stack of six workers doing it.

Factors on worker speed
Governments have an effect on the speed of workers as do some technologies. These are the normal factors in Conquests:
  • Anarchy – work half speed.
  • Democracy – work at 1½ times speed.
  • Fascism – work at double speed.
  • Replaceable parts – doubles worker speed.
  • Slaves work at half speed.
  • Clearly we can’t ignore the Industrious trait in this analysis. It turns out that this allows workers to get a 50% bonus on their speed in Conquests, but a 100% improvement in speed for vanilla Civilization and Play the World.

The Calculations

The editor makes it clear that each worker job has a bucket made up of units of worker turns. We’ll call these base worker turns (BWT). On the standard rule set an ancient era worker for a non-industrious tribe will do two BWT per actual game turn (GT). For an industrious trait this changes to three.

The following table shows the worker jobs and their BWT:
Code:
Job                 BWT
Build road            6
Irrigate              8
Mine                 12
Fortress             16
Barricade            16 (N/A for Vanilla & PtW)
Railroad             12
Plant forest         18
Clear forest          4 (Vanilla & PtW are 5)
Clear wetlands       16
Clear damage         24
The above number won’t give you the full amount of work that needs to be done. In order to calculate the size of ‘bucket’ that must be filled the base BWT is multiplied up by the movement penalty on the tile.

So, building a road on grassland requires 6 BWT (1 x 6), for hills 12 BWT (2 x 6) and for a mountain 18 BWT (3 x 6). Normally these will take 3, 6 and 9 turns respectively for a non-industrious tribe (ignoring other government & technology factors above) and 2, 4 and 6 turns for an industrious tribe.

Ganging together a worker and a slave

From this we can predict what will happen when we team a worker with a slave to make a road.


The prediction is that a worker and a slave (from a non-industrious tribe) ganged up above should be able to build a road on this flood land tile in 2 turns ([2 + 1] + [2 + 1] = 6 BWT). Below is what happened (this is actually the next turn as both the worker and slave completed their task during the inter-turn).


Exactly as predicted the road is complete and we’ve used the turns of both the worker and slave.
 
@KayEss: You are to be commended for putting a lot of time and effort into this. In my opinion, this has the potential to help a lot of players. There are several handy little "worker move charts" floating around. The first time someone sees one they usually say something like "...what does that mean?" Your article shows the potential to connect those dots. If I may pick one nit:
KayEss said:
I have been using Conquests to do these tests, but I’ve seen the same behaviour in Play the World and don’t expect that it will be any different in the vanilla version.
You will find differences when it comes to the industrious civs. I believe it was in C3C that the industrious trait was "nerfed up" as Ision puts it. You may find that the conversion between industious and non-industrious worker will require slightly different math. Keep an eye on this as you continue your work - this is offered as a caveat, not a criticism. This looks really good.

:thumbsup: :goodjob:
 
Thanks Scoutsout. As I'm sure you realise the whole reason for me putting this up here was reading the GK2 forum which I have gotten a lot out of.

I deliberately left most of the industrial (edit - industrial? industrious of course -edit) analysis out of it - the needs to be properly researched and will come out of the follow on questions. The main thing in my mind is how is the rounding done and where is it done? This means reverse engineering the internal formulas to get a result that will work not only with the normal game but also for mods that alter worker strengths.
 
Good Article and thanks for all the work that flowed into it. :) I especially like that you stress out the need not to use worker gangs for building roads. But (and I am sorry to say that this is a huge but :p) your analysis only applies to MP-Games (certainly PBEM and hotseat, I am not sure about other MP-Games). In SP-Games this premise is still true:


KayEss said:
If you are going to make a road that is going to take three turns to complete then you should either assign one worker or three workers to the task. If you assign two workers then you will waste one worker turn (it will still take them two turns to complete the road).

So in my opinion it is still neccessary in SP-Games to use worker gangs in such a way, that you have to divide the needed worker turns for a certain task by the number of workers you want to use for that task. For example mining grassland in C3C in the Ancient Era with a non-industrious Civ needs 6 worker turns. You should either use 1, 2, 3 or 6 workers for that task (all starting in the same year). Using 4 or 5 workers is a waste of worker turns. And I believe that in your example above (forest chopping with a second worker starting one round later that the first) your screenshots show a MP-Game and that in a SP-Game you would waste one worker turn in this example.
 
Thot said:
But (and I am sorry to say that this is a huge but :p) your analysis only applies to MP-Games (certainly PBEM and hotseat, I am not sure about other MP-Games). In SP-Games this premise is still true

I will have to load up a single player game and check it out to see what happens. It would be strange for the game engine to work so differently, but I have to admit it is feasible.
 
Here is an illustration of what Thot was talking about. I'm clearly going to have to put a lot more work into explaining this and seperating out different game types. And there was me thinking it was just the difference between industrious and non-industrious rounding that was going to be complex... :blush:

Worker moves in a Single Player game

The game dynamics are different for single player games. This is what happens when we chop down a forest and bring a worker in a turn late to help us.
  • The first worker starts work. His move is put in the bucket.
  • The second worker joins him. His move is put in the bucket. The first workers turn will be put in the bucket later.
  • Both workers work on it. Here both worker turns are to be put in the bucket after our turn sequence.
  • The forest is clear and we can re-assign the workers.

So what happened? If we add up the number of worker turns of effort that were used we can see that this time it is 1 + 2 + 2 = 5! How does this happen? It seems that the game works out when to do things in a completely different way.

In a Play by Email game the workers put their work into the bucket either when they are first assigned to do a task, or at the end of the next turn. In a Play by Email game the next unit of work is put in the bucket during the inter-turn.

Here are some screen shots of the above scenario. It is played in Conquests with a non-industrious tribe.

Turn 1


In the above picture we are just about to assign the worker to start chopping down the forest. We can see that there are four worker turns. There is a second worker ready to join in next turn.

Turn 2


The second worker joins in and we are told that there are 2 worker turns left. So far it is exactly the same as the multi-player version.

Turn 3


In our next turn we do not see the forest cleared. Why? Well, the two workers haven’t had their go yet. In the Play by Email version the next worker turns were done during the inter-turn. In a single player game the worker turns are now done later.

This difference is critical. Because the workers go last and not first the game cannot hand us the worker turn that would get wasted.

Turn 4


Here at the beginning of the next turn the forest is clear, but the extra worker turn we put into it is clearly gone and wasted. We can’t carry it over.
 
Let's stay with the forest example: What you can do is use a third worker in turn 3. Then the other 2 workers are free and movable to do another job. Always when you assign a worker to a task it's done immediately in this turn. But in the following turns it will only be done in the end of the turn just before the AI is on the move.

I also don't know why it's different in MP-Games compared to SP-Games.
 
This is a really great piece of work, and it simplifys the analysis of worker turns. The only wasted worker turn is a turn where the worker uses its whole turn moving.
 
Thot said:
I also don't know why it's different in MP-Games compared to SP-Games.
I've long suspected that there are two phases in the inter-turn in SP games. First the player, and then each civ, gets some processing time when end-of-turn events are calculated. I'm pretty hazy on how this works, but this phase seems to be when roads are completed and shields, food and gold are added. Then the software seems to cycle through the civs again. This appears to be when you get building completions, victory calculations and other stuff. [There's also another phase when go-to orders are processed, but that's during the human turn].

In a multiplayer game the software clearly can't split the inter-turn activities into two phases and cycle through all the civs twice for each turn, so the two processing phases must be compressed into one. I'm guessing this is the reason for the change in behaviour.
 
AlanH said:
I've long suspected that there are two phases in the inter-turn in SP games. First the player, and then each civ, gets some processing time when end-of-turn events are calculated. I'm pretty hazy on how this works, but this phase seems to be when roads are completed and shields, food and gold are added. Then the software seems to cycle through the civs again. This appears to be when you get building completions, victory calculations and other stuff. [There's also another phase when go-to orders are processed, but that's during the human turn].

In a multiplayer game the software clearly can't split the inter-turn activities into two phases and cycle through all the civs twice for each turn, so the two processing phases must be compressed into one. I'm guessing this is the reason for the change in behaviour.

Not entirely sure about that...

The difference here is indeed one of timing, but from what I've seen on PbEM games something like the following occurs:
  • Human players take their turns in the order that they are listed.
  • Computer players take their turns also in the order listed.
  • The turn cycles over to the next turn
  • Human goto orders are executed. This includes worker actions for the next cycle.
  • The first player's build cycle is started followed by their unit cycle.
  • The next player's build cycle is started followed by their unit cycle.

In practice this means that even if you set the game up human, AI, human, AI then the two humans will move before the AI players. The AI moves are always executed on the computer of the player who goes last.

I don't know enough about the cycle on a single player game to know exactly how this works out. But from the test I've been doing on worker orders then it seems that in a PbEM game if you cancel an order then you must wait until your next turn until you can re-order that worker as the worker turn was already done at the beginning.

On a single player game it seems that the player goto cycle (and worker orders) is executed before the turn cycles over so that when you cancel a worker order you can re-instruct that worker immediatly.

I don't know about unit goto orders in single player games, but I do know that in PbEM games there's both benefits and dangers.

It does seem to me that you could account for the difference in timing by just swapping where the turn cycle occurs and where the human goto orders are done.

This won't account for the difference in accounting that the game uses for calculating how much worker effort has been expended and how much is still required.
 
I think it is important to stress in this article that the entire concept of avoiding wasted worker turns only applies to tiles which already have roads. (You do note that ganging should not be done to build roads, which comes to the same thing, but the point perhaps needs more emphasis and an explanation as below as to why this is.)

If a tile does not have a road then ganging more than one worker to perform an action on it wastes at least one worker turn per additional worker. (More may be wasted in single player mode if there's a worker production overrun on the last turn.)

For example, suppose that three workers are beside three grassland tiles which are to be roaded. If the workers each move to a separate tile and then road, it will take 4 turns to road all three tiles. If the workers move together to each tile and then road each, it will take 6 turns to road all three tiles.

Another important thing to note is that workers can perform a full turn of work even after using up some of their movement allowance. E.g. a worker can move two tiles along roads and then make a full turn of contribution toward irrigating or mining the tile they're on.

One final comment: I think the forest clearing example you use in the article is perhaps an example to be avoided for new players in Conquests. In Conquests I think it is generally a bad idea to road a forest before clearing it. (There are exceptions but generally bad.) The forest clearing operation is so fast in Conquests that as a result, clearing then roading requires 7 turns, vs. roading then clearing (as in your example) taking 6 turns just for the first step of building the road. If the road is built before there's a town to receive the shields then roading first can make sense but the increased total cost is so large that it is often worthwhile trying to find an alternate sequence to defer the task till later.
 
What I'm speculating, and expressing badly, is that for the single play human player there are two processing cycles between turns. If we look at it as 5 steps in a cycle:

1 Human plays
2 Human hits next turn
3 Human worker actions complete and some other end of turn processing is done
4 Each AI plays and end of turn calculations are done for each
5 Computer cycles through all players again to determine new build orders.
1 Human player gets control and plays again

For multi-user, step 5 has to be done on the computer of the player so that the player can select new build orders. So step 5 has to be merged with step 3, or maybe done at the start of step 1. Otherwise the game would have to pass around all the human players twice for each turn - once to play and see worker turns end, and once to see buildings finish and research projects complete, and decide what to build next. This changes the processing squence, retains a human player's control for longer at one time, and might give an opportunity for the human player to reuse workers in a stack on the turn when their work is not needed.

As I say, this is all speculation on my part, and I don't even know what multi-player looks like :D But your article has given me lots of food for thought for which I thank you, and I'll watch more carefully next time I'm ordering worker stacks around. :thumbsup:
 
One interesting comment on the roading gangs,

1 man - 1 road in 4 turns
2 men - 2 roads in 5 turns for the gang, 1 in 5 per worker
3 men - 3 roads in 6 turns for the gang, 1 in 6 per worker
4 men - 4 roads in 7 turns for the gang, 1 in 7 per worker
5 men - 5 roads in 8 turns for the gang, 1 in 8 per worker
6 men - 6 roads in 9 turns for the gang, 1 in 9 per worker

So although the road get built quicker the more workers you have in it, they are actually less efficient.
 
RFHolloway said:
So although the road get built quicker the more workers you have in it, they are actually less efficient.
:thumbsup: Absolutely right, because of the moves. Which is why KayEss says in the first post:
KayEss said:
his means that you should only stack workers making roads where the saved turns to get the road completed earlier are more important than the wasted worker moves!
 
@SirPleb - I think in light of what I have found out about single player games the whole article is getting a reshape. I will put more emphasis on this wastage that also RFHolloway brings up.

@AlanH - I think we are saying exactly the same, but in slightly different ways :) The thing that has me confused is that on a single player game the end of turn seems to be between your steps 4 and 5 and on a multi-player game although it seems to be in the same place your step 3 occurs before your step 1!
 
What would happen if on turn 3 you woke one of the workers, would you be able to use that worker and the forrest chop still complete?

Turn 1 one worker works
turn 2 2 workers works
turn 3 wake 1to move onto a new project, leaving 1 to complete the chop.

Of course that would not be easy to keep track of to say the least, but you could cancel one, look to cancel the other, and see if it still had 1 turn to go, and if it didn't reassign the first one. Time for some experiments I feel....

Edit :- as an alternative, just use an irrigation since as Sirpleb suggests roading then chopping is normally bad.
 
KayEss said:
@AlanH - I think we are saying exactly the same, but in slightly different ways :) The thing that has me confused is that on a single player game the end of turn seems to be between your steps 4 and 5 and on a multi-player game although it seems to be in the same place your step 3 occurs before your step 1!

Ahah! So where I was thinking step 5 would have been moved into step 1 or into step 3 fo r multiplayer, you are suggesting it's step 3 that's moved? Either way, all the processing of the multi-play human move finishes up being done in one hit, either before end of turn or at the start of new turn, whereas the single-play human processing is split, with some being done at the end of turn and the rest at the start of turn.

I recall SirPleb and I having a similar debate about this phasing before, in connection with 20K cuture calculators. Maybe someone needs to check if culture calculations are also affected by single- vs multi-play? Though I guess culture victories are a bit thin on the ground in multi-play :D
 
Top Bottom