Best Villager Count To Spend On Building Bank

User avatar
Taiwan JiaHoJian
Crossbow
Posts: 32
Joined: Oct 12, 2017
ESO: Canyougiant
Location: Taiwan

Best Villager Count To Spend On Building Bank

  • Quote

Post by JiaHoJian »

Hi,
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:
Image
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=0:0.1:9;
y=1:0.1:8;
[X,Y] = meshgrid(x,y);
z = (30-10*log(Y)).*Y+X.*Y-2.75*10*log(Y)/0.69;
levels = -10:2:60;
[C,h] =contour(X,Y,z,levels);
clabel(C,h,'FontSize',20, 'labelspacing', 500)
xlabel('average walking time (second)')
ylabel('villager count')
title('net villager seconds spent on building bank')
set(findall(gcf,'-property','FontSize'),'FontSize',25)
User avatar
Italy Garja
Retired Contributor
Donator 02
Posts: 9752
Joined: Feb 11, 2015
ESO: Garja

Re: Best Villager Count To Spend On Building Bank

  • Quote

Post by Garja »

Let me guess, you are a math guy? :hmm:
Seriously tho, this kinda explain why I always use about 4 vills to build banks.
Image Image Image
France Kaiserklein
Pro Player
Posts: 10287
Joined: Jun 6, 2015
Location: Paris
GameRanger ID: 5529322

Re: Best Villager Count To Spend On Building Bank

Post by Kaiserklein »

Very nice analysis. Btw, a good player usually won't have too much walking time to build a bank. 4 seconds seem way too much I think, I'd say the average walking time is usually around 1-3 seconds. So according to your results, it's definitely efficient to have more vils on a bank. And as Garja mentioned, I also usually set 4 vils on it, but it's nice to have a mathematical confirmation.

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.
Image
Image
Image
LoOk_tOm wrote:I have something in particular against Kaisar (GERMANY NOOB mercenary LAMME FOREVER) And the other people (noobs) like suck kaiser ... just this ..
User avatar
United States of America _H2O
ESOC Business Team
Donator 06
Posts: 3411
Joined: Aug 20, 2016
ESO: _H2O

Re: Best Villager Count To Spend On Building Bank

Post by _H2O »

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.
User avatar
No Flag Jaeger
Jaeger
Posts: 4492
Joined: Feb 28, 2015

Re: Best Villager Count To Spend On Building Bank

Post by Jaeger »

_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
User avatar
Italy Garja
Retired Contributor
Donator 02
Posts: 9752
Joined: Feb 11, 2015
ESO: Garja

Re: Best Villager Count To Spend On Building Bank

Post by Garja »

The thing is walking time it's not a constant but increases with the number of vills because of the foundation pathing. That is unless you micro 1 vill separately to build it.
Image Image Image
User avatar
Singapore Thrar
Retired Contributor
Posts: 286
Joined: Sep 22, 2017
ESO: Thrar

Re: Best Villager Count To Spend On Building Bank

Post by Thrar »

Since the walking time is a variable, I think we can interpret as "time taken by the villager while neither gathering nor building", i.e. walking to the build site, arranging themselves around the foundation, and walking back to gather.
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.
User avatar
Isle of Man UpMySleeves
Dragoon
Posts: 238
Joined: Apr 5, 2017
GameRanger ID: 7309280

Re: Best Villager Count To Spend On Building Bank

Post by UpMySleeves »

^ I think another thing to consider is maybe having the bank up faster, before enemy units come into your base and start idling you. Usually I put 4 villagers on the first bank, since I always start it so late, then 1-2 vills for the rest.
Never trust a man in a blue trench coat, never drive a car when you're dead
User avatar
Taiwan JiaHoJian
Crossbow
Posts: 32
Joined: Oct 12, 2017
ESO: Canyougiant
Location: Taiwan

Re: Best Villager Count To Spend On Building Bank

  • Quote

Post by JiaHoJian »

Hello everyone,
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:








villager countnet villager second cost
133
226.3945711
325.81448033 (the best)
428.19566734 (the second best)
530.61841914
634.49703675
737.91101996
842.82818039

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.
Attachments
bank building villager second cost.xlsx
(13.37 KiB) Downloaded 13 times
User avatar
India Challenger_Marco
ESOC Media Team
Posts: 2689
Joined: Nov 23, 2015
ESO: challenger_marco

Re: Best Villager Count To Spend On Building Bank

  • Quote

Post by Challenger_Marco »

Wow nice stats you got there ! I really appreciate you doing these stuffs ,keep going!
:nwc:
User avatar
United States of America _H2O
ESOC Business Team
Donator 06
Posts: 3411
Joined: Aug 20, 2016
ESO: _H2O

Re: Best Villager Count To Spend On Building Bank

Post by _H2O »

Four is the right number for sure if it’s feasible. Really cool that you took the time to factor in the necessary elements.
No Flag purplesquid
Dragoon
Donator 03
Posts: 486
Joined: Feb 16, 2015

Re: Best Villager Count To Spend On Building Bank

Post by purplesquid »

I used to just build with 1 vill with Dutch as I assumed it did not matter. Will certainly change my play going forward. . .

Really like the thought process behind this analysis
User avatar
India TNT333
Lancer
Posts: 530
Joined: Sep 13, 2018
ESO: TNT333

Re: Best Villager Count To Spend On Building Bank

Post by TNT333 »

Nowadays in this forum i see lots of bank related strats
"We are kings or pawns" Napoleon Bonaparte

Who is online

Users browsing this forum: No registered users and 1 guest

Which top 10 players do you wish to see listed?

All-time

Active last two weeks

Active last month

Supremacy

Treaty

Official

ESOC Patch

Treaty Patch

1v1 Elo

2v2 Elo

3v3 Elo

Power Rating

Which streams do you wish to see listed?

Twitch

Age of Empires III

Age of Empires IV