I am going to analyse what the best villager count to spend on building bank is.
Here is the building time formula that I came up with after testing a lot of times, it's very accurate:
If a building takes y seconds for 1 villager to build, and it takes t seconds for x villagers to build, then we have the following formula:
t = y - (y/3)*ln(x), where ln(x) is the natural logarithm.
A bank takes 30 seconds for 1 villager to build, so t = 30-10*ln(x).
Assume that, in average, a villager has to spend z seconds in total walking toward the foundation of the bank and then walking back to gather resources.
If we drag x villagers to build the bank, then the total villager second cost would be: (30-10*ln(x))*x+z*x
However, when we drag more villagers to build the bank, the bank will start producing gold earlier, we can convert the amount of gold we gain from starting the bank earlier into villager seconds, so the net villager second cost would be: T = (30-10*ln(x))*x+z*x-2.75*10*ln(x)/0.69
Here is the graph of the function T, "average walking time" is our z here, and "villager count" is our x here:
We can immediately see that building bank with only 1 villager is very bad because it takes 30 seconds and the net villager second cost is no less than 30, if we build the bank with 2 villagers, the average walking time of these two villagers has to be longer than 5.8 seconds so that the net villager second cost is also 30 in this case.
If the average walking time is less than 4 seconds, then more villagers means more efficient in terms of net villager second cost.
If the average walking time is more than 4.5 seconds, then more villagers does not always mean more efficient.
The graph also tells us that if the average walking time is smaller than 2 second or so, then we definitely pull all these villagers to build the bank. So in practice, if there are 5 villagers collecting food together, then it's more efficient to pull all these villagers to build a bank near them.
The result is based on the mathematical model that I proposed here, in practice, there should be other factors that I haven't factored in here, like raiding, villager path finding issue, etc.
By the way, here is my Matlab code that I used to output the figure, the variable names that I used in this code don't correspond to the ones that I used in this post:
[X,Y] = meshgrid(x,y);
z = (30-10*log(Y)).*Y+X.*Y-2.75*10*log(Y)/0.69;
levels = -10:2:60;
clabel(C,h,'FontSize',20, 'labelspacing', 500)
xlabel('average walking time (second)')
title('net villager seconds spent on building bank')
Seriously tho, this kinda explain why I always use about 4 vills to build banks.
Another thing to take into account is the fact that dutch is the defending civ in most match ups, and dropping a bank faster is always safer since you're likely to get aggressed. So another reason to set more vils on it.
If you put more than 4 vils though, I think they'll most likely have a shit pathing around the bank when trying to start building it, which effectively results in more walking time, so less efficient.
LoOk_tOm: I have something in particular against Kaisar (GERMANY NOOB mercenary LAMME FOREVER) And the other people (noobs) like suck kaiser ... just this ..
_H2O wrote:Cool! Does this also have math to factor in the walk around the foundation? This is a bit different than walking from the hunt and might bend the graph a bit more. Seems very close to the right result and also highlights the debate is over a few villager seconds.
I didn't read it, but imo the most resonable thing to be "average walking time" is time to bank and back, so I think it is probably factored in.
last time i cryed was because i stood on Lego
In practice, as Garja suggested walking time should itself be partially a function of vil count, since more vils will on average take longer to arrive, bump into each other, and position themselves. It may be difficult to model this mathematically though.
Intuitively, I'd say you can get ~1 second walking time back and forth with a single vil, and maybe still with 2 vils if they're very close (e.g. on the same tree). Beyond 2 vils, I'd expect walking time to be closer to 2 or 3 seconds since at least some of them will come from slightly further and need to get in position to build, and more chance bumping into each other on the way back later.
Interestingly, 2 vils with 1 second walk is almost the same as 4 vils walking 2.5 seconds, confirming the conventional wisdom where 4 vils that are reasonably close are a good rule of thumb.
It's also interesting to see how little difference most of this makes - a bank costs around 1,100 VS in resources, so we're talking about savings less than 1% of its cost most of the time.
After testing for a while in the game, I came up with a formula that was able to roughly evaluates the time that a villager has to spend on walking around the building and bumping into each other, the result is amazing. I am going to assume that the villagers are roughly in the same spot when they are about to build the bank, for example, these villagers are hunting together or chopping trees together. If we don't split the villagers manually before they reach the foundation of the bank, the game's path finding system will help us do so when the "leading villager" has reached the foundation and starts building. Leading villager is referred to the first villager that reaches the foundation and starts building.
When the leading villager has reached the foundation, the path finding system will split the other villagers into several groups, each group contains two villagers. If the number of villagers is even (including the leading villager), then the last group only contains one villager. The group that is the closest to the foundation will reach the foundation roughly 1 second after the leading villager, and the two villagers in that group will start building roughly about the same time. The second closest group will reach the foundation roughly 1 second after the first group, The third closest group will reach the foundation roughly 1 second after the second group, and so on and so forth. When they finish building the bank, we then send them back the original spot. They will bump into each other again when they get closer to each other, the path finding system will help us split the villagers again with the same method, but because they had already been split while they were building the bank, when they go back to the original spot,the time they spend on walking around and bumping into each other is little bit lesser this time, the latter group roughly takes 0.5 more seconds than the former group to reach the original spot.
In my original post, I also neglected the fact that villagers wouldn't start building at the same time because some villagers would bump into each other and try to find a spot to build the bank.
So I fixed my formula and recalculated the net villager second cost in each case using Excel.
Assume that the latter group spends d more seconds in total bumping into each other and walking around than the former group.
And assume that the leading villager spends e seconds in total walking back and forth.
Based on my experience and the data I collected from game, I let d = 1.5, e = 3.
*Edit: After checking my work, I found that I made some mistakes. I had fixed them and updated the result I showed here.
Here is the result:
The best case scenario is 3 villagers based on the model I used here.
I also tried other combinations like d = 3, e = 2 or d = 2, e = 2, 3 villagers is better for the most part. The value of e depends on how close the foundation is to the villagers, and the value of d depends on how good we split the villagers manually. If we don't split the villagers and the foundation takes the leading villager less than 1.5 seconds to go to (e = 3), then 3 villagers is the best in terms of VS cost efficiency for the most part. As Garja had pointed out, we can micro each villager separately to build the bank so that they won't spend too much time walking around the foundation, this will lower the value the d, then 3 villagers will be even better.
I have attached my excel file beneath, go check it out if you are interested.
- bank building villager second cost.xlsx
- (13.37 KiB) Downloaded 1 time
Really like the thought process behind this analysis