Auto farm sortation

TravibotUser
Posts: 13
Joined: 20 Feb 2016, 16:31

Auto farm sortation

Post by TravibotUser »

Hi Vlad,

I am quite satisfied how the TraviBot is working, although I think there is some room for improvement to optimize autofarm.
Can you explain a few things?

1. When starting the raids, how are the farms sorted?
2. If there are not enough troops for all farms, how will they be sorted the next time?
3. How is average farm per hour calculated?

Thank you
TravibotUser
Posts: 13
Joined: 20 Feb 2016, 16:31

Re: Auto farm sortation

Post by TravibotUser »

I have been thinking of a way to evaluate the average farm per hour, and I think currently its not right. Im not sure how exactly it is calculated currently, but it gives way too high numbers.
My idea is:
Total farm / ((Time of 1 attack(both ways, i.e. including return) * attack count) / 60min)

For example, if my total is 10000, attack count is 10, it means 1000 per attack. If an attack takes 20 minutes one way + 20 minutes to come back, it means i get 1000 per 40 minutes. 1000 / (40 / 60) is 1500, which makes sense.
User avatar
Vlad
Разработчик
Posts: 4303
Joined: 16 Aug 2010, 21:21

Re: Auto farm sortation

Post by Vlad »

1 Sorted by farm per hour, exclude farms where interval from last sending not gone
2 Sorted in the same way
3 Total bounty/(troops movement in hours*2*raid count)
TravibotUser
Posts: 13
Joined: 20 Feb 2016, 16:31

Re: Auto farm sortation

Post by TravibotUser »

The formula in 3rd is not how the bot calculates it.
Example:
Image
I am Gaul and as you can see I am raiding with 4 TT's, distance is 3, one way it takes 9 minutes and 28 seconds, or 0.158 hours.
So the average farm per hour would be 17742 / (0.158 * 2 * 120) = 467.87
However, the bots says 21736 :)

Also, when there are not enough troops, dont you think the bot should firstly sort by last raid time? Because otherwise some of the farms might be never reached.
User avatar
Vlad
Разработчик
Posts: 4303
Joined: 16 Aug 2010, 21:21

Re: Auto farm sortation

Post by Vlad »

May be time calculated without return time, I do not remember, but bot analyze last 20 (if I remember right) of reports to calculate this value, not all of them
Order more troops, and all will be reached
No sense in reaching farm with bad bounty, if we can send troops into farms with good bounty
TravibotUser
Posts: 13
Joined: 20 Feb 2016, 16:31

Re: Auto farm sortation

Post by TravibotUser »

But Vlad, even if it calculates without return time, this number of 21736 does not make sense. Could you have a look at the calculation?
User avatar
Vlad
Разработчик
Posts: 4303
Joined: 16 Aug 2010, 21:21

Re: Auto farm sortation

Post by Vlad »

What I should to see?
Formula from sources
((Bounty - Lost) / AttCount) / WayHours;
Where
Bounty: bounty from last 20 reports
Lost: Cost of dead troops from last 20 reports
AttCount: Attack count
WayHours: hours in one side
TravibotUser
Posts: 13
Joined: 20 Feb 2016, 16:31

Re: Auto farm sortation

Post by TravibotUser »

You should see a mistake in the source code. Maybe the travel time is calculated wrong? I dont know
Example from the same farm that I added yesterday:
Image
These are the last 20 reports. The bounty is 2709. Loss = 0. The attack count is 20.
So according to the formula from your sources:
((2709 - 0) / 20) / 0.158 = 857.27
Not anything near 20603.
Also, could you multiply the hours by 2 to include the return as well?
User avatar
Vlad
Разработчик
Posts: 4303
Joined: 16 Aug 2010, 21:21

Re: Auto farm sortation

Post by Vlad »

Send me your Logs.mdb file, I will check
No any sense in multiply
TravibotUser
Posts: 13
Joined: 20 Feb 2016, 16:31

Re: Auto farm sortation

Post by TravibotUser »

I have sent you a PM with url to download the logs file.

I think it makes sense to include the total time of troop travel, not only one way.
Post Reply