-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto build tunnels? #683
Comments
I read about tunnels, never used them. Would be nice to have something in the code. |
The thing about tunnels is, that they are insanely costly to maintain. Building 8 tunnels for one source isn't worth it at all. Edit: I did the math earlier. And it appears to be cheaper than what Marvin exagerrated it as. If you repair 100 hitpoints for 1 energy per work part. And the conversion rate isn't different (I never paid attention to it). You have to repair 15000 hitpoints every 1000 ticks for a road inside a wall. You can harvest 9000 energy from one source inside a reserved or claimed room in 1000 ticks. So if that math is correct. You earn 9000 energy in the time it takes for you to burn through 5 * 150 (= 750) energy for the roads inside the wall alone. That still is a large profit margin. |
K, thx for the insights. I guess there could be use cases where it make sense. If someone is interested in figuring these out, I think it would be a nice addition, but not mission critical :-) |
Will see if I can code that in. What would be the best way to determine the path? What factors do we want the decision to influence? Purely energy-wise, we shouldn't built a tunnel if there would be less than 150 roads (per tunnel) to maintain otherwise. But tunnels can save us time it takes for energy to travel back to the base! So shouldn't we have to focus on the math or rather cost of more haulers it would need to keep a remote container consistently not full? Those are the complex solutions/formulas/algorithms logistics require. Thats what makes bots efficient. And having to solve these problems is what is fun about this game. |
So, from https://docs.screeps.com/api/#StructureRoad, building costs 45k, it looses 15k per 1000 ticks, so 15 per tick - That is a lot. On plain it costs 300 to build, and 0.1 per tick. Looking at the numbers, I can't come up with many scenarios where it make sense. Another tricky part to include it into the routing system. Right now the paths in each room are pre calculated an used by creeps when moving. So, when calculating the initial path it needs to be calculated if any tunnel would make sense. I'm not sure if it is important that the energy arrives earlier. |
For room like this, build a tunnel is a better way to save carry creeps.
The text was updated successfully, but these errors were encountered: