The-International-Screeps-Bot / The-International-Open-Source

An automated bot for the coding game Screeps.com
MIT License
104 stars 33 forks source link

Funnel system to work as intended #773

Closed CarsonBurke closed 3 months ago

CarsonBurke commented 7 months ago

psuedocode

if (the first target wants independent funnel) then set it so and continue to next target(s) to potentially create a contiguous set of wanters if (any independent funnel wanter) then set first funnel target to override funnel want

calculate the difference between how much the room could upgrade purely based on energy in storing structures. Subtract the actual limit (capped by link throughput, etc.) and add that to the total amount that can be funneled.

Say this adds up to 200, then there is 200e/tick to distribute to funnel targets. Give it from most preferred funnel targets until they are full, or until the amount to distribute runs out.

CarsonBurke commented 7 months ago

If anyone has ideas on how to do this system well, ideas are much welcome. Thanks.