Icehawk78 / FrozenCookies

An automated Cookie Clicker tool.
120 stars 168 forks source link

Possible Improvement to the Autobuy #179

Open bookwyrm314 opened 8 years ago

bookwyrm314 commented 8 years ago

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.