Skip to content
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

Possible Improvement to the Autobuy #179

Open
bookwyrm314 opened this issue Mar 18, 2016 · 0 comments
Open

Possible Improvement to the Autobuy #179

bookwyrm314 opened this issue Mar 18, 2016 · 0 comments

Comments

@bookwyrm314
Copy link

Basically, I think that the Golden Cookie bank value used in the calculation of the auto-buyer could be changed to improve efficiency.

Currently it is just the bank that maximizes GCvalue and then adds the purchase price, but if you take into account the time between golden cookies you could improve the efficiency (I do not know by how much, but I guestimate at least 5%)

Symbol Key
Golden Cookie Bank (as currently caluclated) - GCBold
Min Time To Next Golden Cookie =TminC
Min Time Between Golden Cookies = Tmin
Cookie Production rate (Current at x1, including autoclick but not including Golden Cookie clicks, withered cookies subtracted out) =CPR
Time left in clot = Tclot
Time left in frenzy = Tfrenzy
Better number to use in Golden Cookie bank calculation for the purposes of purchasing-GCBnew

If under Frenzy
if Tfrenzy>TminC
GCBnew = GCBold - CPR x 7 x TminC

if Tfrenzy <TminC
GCnew = GCBold - CPR x 7 x (Tfrenzy+TminC)-CPR x (TminC-Tfrenzy)=GCBold-CPR x (6 x Tfrenzy+8 x TminC)

If not under frenzy or clot
GCnew = GCBold - CPR x 7 x Tmin-CPR x TminC

If under clot
GCnew = GCBold - CPR x 7 x Tmin-CPR/2*TminC

Note: if GCNew<0, set GCNew=0

If you wanted to further improve the efficiency you could replace CPR with CPRnew, which is the CPR rate after purchase.

This is just an idea to amend the algorithm, and it seemed interesting to me, and I wanted to share. It would improve the speed of the autobuy without decreasing the revenue from Golden Cookie Clicks, and just overall improve the speed of cookie production. You would want to create a new variable, so you do not have to visually display a continually updating cookie bank number. I do not know enough java-script to program it, or to know if it would use too many computational resources, but I thought it may be fun to put out there. You would probably be able to get away with using the new cookie bank calculation right after each item is bought, or each time a GC is clicked, so that may conserve resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant