stefan2200 / TWB

Python based bot for Tribal Wars

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What does "Max_lookahead" mean?

MAHardo opened this issue · comments

Hi,
I don't understand, what Max_lookahead actually means. When I have Max_queued_items at 5, what value should I use for Max_lookahead?

Thanks!

Hi, you can find all the definitions in the configuration documentation ConfigReadme.md.

Max Look-ahead: The max amount of buildings in the queue that get checked if the ones before fail (like not enough resources or requirements not met yet). I suggest you keep this number below 5 because otherwise it will most likely queue the cheapest buildings first.

Alright, thanks a lot!

I have another question: When there are some buildings in the queue and enough resources available, the bot does not fill the remaining free queue slots (until Max_queued_items is reached) but instead it outputs: Building queue out of sync, waiting until 3 manual actions are finished!. Should it be like this, or am I doing something wrong?

The Building queue out of sync message should only appear when you have manually queued buildings when the bot was active (or at least what I expect). After the buildings finish it should resume its regular queue.
EDIT; I've just checked and that is indeed the case. The bot acts this way so no unnecessary requests are being sent since it knows what buildings it queued and when the next action should finish. You can ignore the message and the bot should resume after the amount of queued items matches the amount it added.

Okay, thanks mate!