Mtarnuhal / FrozenCookies

An automated Cookie Clicker tool.
27 stars 22 forks source link

Heavenly potential upgrades are ignored? #43

Open chrisheib opened 3 years ago

chrisheib commented 3 years ago

Unlocking the heavenly potential upgrades should be heavily prioritised imo. FC seems to buy it really late into an ascension, if at all. Maybe the logic for them should just be set to 'Is an updgrade availabe and affordable? Then buy it.'

Mtarnuhal commented 3 years ago

I think this is due to the efficiency of other upgrades being better. Frozen Cookies build a efficiency list and follows that to make the next purchase.

I've looked at the calculations of the list but I can't make a cookie out of it. I have the feeling something is off in this list concidering that the CPS isn't jumping up to what it says you are gaining.

Maybe @adavidw or @piels have a better understanding of the code.

chrisheib commented 3 years ago

I debugged the main code and found that the list in itself could be okey, but the heavenly upgrades dont get included.

Upgrades get read from the game in fc_main.js:1410 in upgradeStats. It seems that Game.UpgradesById doesn't include the heavenly upgrades...

adavidw commented 3 years ago

I definitely see heavenly upgrades in Game.UpgradesById unless we're talking about something else. I assume you mean "Heavenly Chip Secret", "Heavenly Cookie Stand", "Heavenly Bakery", etc., right?

On a new ascension, they definitely show up in the store list (under "Internal Information"). In my runthrough, just now, they were definitely getting bought. The first two were somewhere in the first ten purchases, and then the rest were scattered in at what seemed like appropriate places.

So I think it's operating correctly.

(There's a whole separate issue that the delta CPS doesn't match what you get when you purchase something, but that seems to be off equally for everything, and I haven't looked at that part of the code to see what's up.)

Can you give any specific examples of what it's doing on a particular upgrade, like what it shows for delta CPS, what your current CPS is, stuff like that?

chrisheib commented 3 years ago

Just went to reproduce it, and this time the upgrades indeed got correctly bought. I definitely had the issue tho in at least the last 4 runs and did have to manually buy it, even after getting to a few million cps. I wonder if I had some kind of blacklist going?

Mtarnuhal commented 3 years ago

I think this is what @chrisheib encountered. image