Coder Social home page Coder Social logo

Wrinklers stats fix about cookie-monster HOT 16 OPEN

anahkiasen avatar anahkiasen commented on July 21, 2024
Wrinklers stats fix

from cookie-monster.

Comments (16)

Anahkiasen avatar Anahkiasen commented on July 21, 2024

Well I don't think so, the "Cookies sucked" calls CookieMonster.getWrinklersSucked() which just returns the plain number of cookies sucked, without any modifier.

Then the value of the rewards are calculated as I see them in the original code which is the 1.1 modifier is applied to each wrinkler separately and not to the total. Or am I not getting you ?

from cookie-monster.

lucabondi avatar lucabondi commented on July 21, 2024

I don't pretend to be right against the code. XD

I'll explain how i get there... of course i might be wrong somewhere.

First, as the first wrinkler was approaching, i cheated 0 cookies to bank. So the the cookie in bank and the cookie sucked both start from 0.

Then i let the game run for 52 minutes (i wanted to make an hour, but i had to leave. XD) without clicking golden cookies or reindeer.

cookie sucked

As you can see from the screenshot, i'm running at 3.942 T CpS. So after 52 min, or 3120 sec, WITH NO WRINKLERS i should have 12.299 Qa in bank.

But i have 6.588 Qa... so the cookies actually sucked by the wrinklers are 5.711 QA... while CM says that the cookie sucked by the wrinklers are 54.989 Qa.

And since the Reward of popping stat is correct... something is wrong.

from cookie-monster.

SyDr avatar SyDr commented on July 21, 2024

From Wiki:

The number of cookies sucked away by a Wrinkler is equal to the total amount your CpS is Withered. If multiple Wrinklers are present, the Wither rate is increased from 5% to 10%, 15%, etc, up to a maximum of 50%. Each wrinkler considers the full Wither rate to be the rate that it sucks at, not just its individual 5%, for the purposes of calculating how many cookies you receive when popped.

See: http://cookieclicker.wikia.com/wiki/Wrinkler

from cookie-monster.

lucabondi avatar lucabondi commented on July 21, 2024

"The number of cookies sucked away by a Wrinkler is equal to the total amount your CpS is Withered. If multiple Wrinklers are present, the Wither rate is increased from 5% to 10%, 15%, etc, up to a maximum of 50%."

This proves my point.

"Each wrinkler considers the full Wither rate to be the rate that it sucks at, not just its individual 5%, for the purposes of calculating how many cookies you receive when popped."

This proves Anahkiasen's point.

I guess there's nothing he can do about that. Case closed. ;)

from cookie-monster.

Anahkiasen avatar Anahkiasen commented on July 21, 2024

More importantly – I don't compute anything regarding how many cookies a Wrinkler sucked : I get the statistic directly from the wrinklers themselves because it's stored on them, and that's the statistic used when popping them in the original code. Which is why I'm so confused as to why that number would be wrong.

from cookie-monster.

lucabondi avatar lucabondi commented on July 21, 2024

The number is wrong because it's not the real number of cookies sucked.

You can try my experiment in the previous post... or you can do another one even more simpler... load the same game in 2 browsers, then enter an auto-pop-wrinkler code in one of them. Wait awhile and you'll see that the difference between the 2 games it's not what the cookie sucked stat tells you.

But in the end, from a gameplay standpoint the stat that matters is Reward of popping... Cookie sucked is just an info. Nobody is asking you to compute formulas, so don't lose your mind over this. :D

from cookie-monster.

BenByington avatar BenByington commented on July 21, 2024

I'm not here to hound you. If you no longer care about this issue, then just ignore this post:)

What exactly is meant by "cookies sucked", "reward of popping" and "benefit of popping"? (I'm going to call them C, R and B below)

-There are two ways you can interpret the name behind C -- it is either the amount of cookies lost, i.e. not directly entering your bank while at least one wrinkler is feeding, or it is the number of cookies that are currently being stored by the wrinklers, which includes the odd multipliers that occur when there are multiple wrinklers. I'd argue that the first is more intuitive, but I do understand that Orteil uses the second in his code. However, I think that it is the fact that Orteil does not use the intuitive interpretation that causes the confusion here.

-R is fairly self-explanatory, being the number of cookies added to your bank if you pop all current wrinklers.

-B almost sounds like a synonym to the last metric. I assume this is meant to be a true measure of profit, where you are including the opportunity cost of your decreased cps while you are withered.

So, on to the crux of the matter. If B is meant to be "cookies gained from popping" minus the "cost of having kept wrinklers around", then it should NOT be B = R - C because that is not how you currently have C defined. If you redefine C to actually measure the amount of cookies wrinklers prevent from directly entering your bank rather than the number of cookies stored by the wrinklers, then it would be correct.

If B is not meant to be a measure of profit considering opportunity costs, then I really have no clue what these stats are supposed to indicate.

from cookie-monster.

lucabondi avatar lucabondi commented on July 21, 2024

C is the number of cookie stored by the wrinklers... Orteil fooled us with his code. XD
R is C x 1.1 which is the benefit of a single wrinkler.
So in the end B is R - C.

from cookie-monster.

BenByington avatar BenByington commented on July 21, 2024

Sorry, I might not have been clear. I know what formulas you used -- I dug those out of the code before coming here -- I wanted to know what these quantities are supposed to mean for you. Lucabondi started this thread because this trinity of variables makes no sense. Either C should be defined instead as the cookies you lose, not the cookies stored by the wrinklers, or B should be something other than R-C, or B is not a measure of the profit in which case it is completely unclear what the number you are calculating there is.

Edit: I just realized I was conversing with lucabondi instead of Anahkiasen. My points stand, but apologies for the confusing delivery!

from cookie-monster.

davidgro avatar davidgro commented on July 21, 2024

I have a proposal. Let's call the amount that doesn't make it into my bank the "Cookies withered" to match the CPS stat. Cookies withered and sucked are widely different when there is more than one wrinkler because they don't obey Conservation of Cookies.

Anahkiasen, is it possible to track cookies withered as the number of wrinklers changes? it would be a more useful stat than sucked (which is just reward/1.1) and could make the Benefits of popping stat show the actual difference between having them and not. (for comparsion to to say Pledging)

from cookie-monster.

Anahkiasen avatar Anahkiasen commented on July 21, 2024

Whatever you guys think is better than this I mean, I just put this as a starting point but if we all agree there is more interesting stats to display I'm all for it. Would you be willing to make a PR for this or ?

from cookie-monster.

davidgro avatar davidgro commented on July 21, 2024

If you are asking me specifically, I am kinda new to Github and don't know what that means, sorry.

from cookie-monster.

SyDr avatar SyDr commented on July 21, 2024

@davidgro, it seem there is no good way to count withered cookies (i.e. no way to count withered cookies by number of sucked cookies).

One possible variant is to add counter especially for this stat. But if you load Cookie Monster after first appearing wrinkler - stat will be incorrect. Do you accept this?

Anyway, i think, in current version "Cookies sucked" and "Benefits of popping" are useless stats.

from cookie-monster.

davidgro avatar davidgro commented on July 21, 2024

@SyDr I figured it might be like that.
Such a counter should work fine if on load when CM detects a wrinkler already present, in the stats for withered cookies it says something to the effect of 'pop all wrinklers to start counting'

While we are at it, would a small tooltip for each wrinkler showing cookies if popped be feasible?

Thanks!

from cookie-monster.

SyDr avatar SyDr commented on July 21, 2024

I made this. But it's doesn't looking good (code). Can someone give any tips? 80e6673 (+ forgot about cookie-monster.js 6a51b59)

2014-02-18 20 32 31
2014-02-18 20 33 29

from cookie-monster.

davidgro avatar davidgro commented on July 21, 2024

Looks good to me, I'll admit I was expecting to see the 6x factor appear, but that's of the base CPS not the withered part, both ways of counting that seem equally valid to me.

from cookie-monster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.