The bucket level you want your AI to stablize at (Optional: defaults to 8000)
What you want to recognize as the max limit for your code to use (Optional: defaults to 495)
Your current static limit (Optional: defaults to Game.cpu.limit)
Your current bucket (Optional: defaults to Game.cpu.bucket)
An alternative value for Game.cpu.limit helping to maintain a target bucket level.
semperrabbit 20180302
Generated using TypeDoc
Adjust your CPU limit per tick based on current and target bucket levels. It will never dip below a fifth of your bucket, to help out 20 CPU users.
This uses sine functions to adjust a limit multiplier from 0 at 0 bucket, to 1 at the target bucket, to 2 at full bucket. If you are a 20 CPU user, after the multiplier hits 1.5, it will add 1 to the multiplier, so you can burn through more of the available bucket. This is to assist in taking full advantage of the free 1k bucket during reset storms.
https://imgur.com/a/9PN5z the curve of the multiplier where the target bucket is 8k (default)