JonathanSafer / screeps

Screeps AI
MIT License
25 stars 8 forks source link

power runner summon time determined during flag placement #105

Closed JonathanSafer closed 4 years ago

JonathanSafer commented 4 years ago

Rather than simply summon runners when the bank is below an arbitrary number of hits (600k atm), power mining flag memory should include number of hits at which to summon runners for that bank.

Ex: bank is ~200 steps from spawn, and has enough power for 4 runners. It is determined that runners should start spawning 500+ ticks before the bank breaks (runners will need 2 waves + 200 ticks to walk). Use normal mining rate (2 miners => 1.2k/t) to determine that miner should request runners when bank is below 600k. Extra check: if the first batch of runners will be getting home with less than 100ttl, don't place the mining flag.

JonathanSafer commented 4 years ago

if saving the info is too problematic. pminers can recalculate as needed using map.findRoute (negligible cpu)

jordansafer commented 4 years ago

saving info in the flag should be no problem