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

new way of find the most profit-making building #28

Closed
Crashfr opened this issue Oct 1, 2014 · 13 comments
Closed

new way of find the most profit-making building #28

Crashfr opened this issue Oct 1, 2014 · 13 comments
Assignees

Comments

@Crashfr
Copy link

Crashfr commented Oct 1, 2014

Hi, i used to play cookies clicker, and i found recently your add-on cookie monster.
I think it's a very good addon but i disagree a bit with the way of searching what building is the most worth.The fact is that in your formula price/cps doesn't take the time to buy the item into consideration.
what I did is pretty simple : i take 2 graphs : One with the actual cps * t
one another with the actual cps * t = Y1(t) but when we reach the price of the building we are testing,
we buy it and we have (cps + G) * t (G is the profit in cookies per second).
So the actual formula of the second graph id (cps + G) * t - ( 1 + G/cps ) _P = Y2(t) because with this when we reach the price of the building ie. t= P/cps we have Y2=0
Then i search T the time when these two graphs are crossing each other, ie the time that the building refund his price + the time loss at waiting the building ,
so Y1(T) = Y2(T)
cps_T = (cps + G) * T - ( 1 + G/cps ) _P
G * T = ( 1 +G/cps ) *P
T = P/(G_cps) * ( Cps + G)
T = P/G + P/cps

then we use this formula for each building and less T is faster the building refund himself

Hope you read all this , Thank you , Bye

@Aktanusa
Copy link
Collaborator

Aktanusa commented Oct 1, 2014

This is actually discussed in Issue #3 already. There is also a flaw with comparing only 2 items at a time. The even more efficient way is to compare all combinations of buying. This is of course very costly and similar to the traveling salesman problem in programming (aka O(n!) in complexity). I've been developing a way to at least shortcut it to be slight more efficient. Yea, I need to get off my lazy butt and just implement it.

@lucmans
Copy link

lucmans commented Mar 5, 2016

Since the calculations don't involve many elements, isn't the n relatively small (so n! isn't to detrimental)?
Especially given the current speed at which computers can calculate, this shouldn't take to long.

@Aktanusa
Copy link
Collaborator

Aktanusa commented Mar 5, 2016

Yes yes, I know. I've been thinking on how to implement it for a while now. I was planning to add it today or tomorrow after I did my checklist of what I wanted to work since version 2 of CC came out. Since that's done now and release in version 2.3 of CM, I'm finally free to add this.

@Aktanusa
Copy link
Collaborator

Aktanusa commented Mar 5, 2016

Actually I forgot this was suggesting to do cost/cps + cost/Δ cps. I was more planning on doing the optimization of considering purchases that is affordable now to help decrease the time needed for the best BCI as mention in Issue #52.

Edit: The main problem of changing to cost/cps + cost/Δ cps (despite being pretty simple to do actually) is figuring out what to rename the BCI label to. It isn't BCI anymore once you change it to cost/cps + cost/Δ cps.

@svschouw
Copy link

svschouw commented Mar 5, 2016

Return On Investment? Break Even Point? It is the time to wait for the necessary funds (cost/cps) plus the time to get the investment back (cost/Δcps).

@Aktanusa
Copy link
Collaborator

Aktanusa commented Mar 5, 2016

So I guess ROI?

Aktanusa added a commit that referenced this issue Mar 7, 2016
… (Issue #3 (partly), #28, #52) with the formula from @svschouw and minor README edit
@Aktanusa
Copy link
Collaborator

Aktanusa commented Mar 7, 2016

Added in Version 2.4

@Aktanusa Aktanusa closed this as completed Mar 7, 2016
@Appleguysnake
Copy link

I just updated and saw this because I came looking for an explanation of why it was called ROI now, which was confusing me. A higher ROI is usually better, because it's describing how much you'll get in return. The number is still showing the cost, which is better if it's lower. So that's still something like BCI, which I think is still much closer to an accurate description.

@Aktanusa
Copy link
Collaborator

I know what you mean, but I think it's closer to inverse ROI. Writing inverse ROI didn't look good, so I shorten it to ROI. It's only BCI when you have enough cookies in the bank to buy.

@Appleguysnake
Copy link

Well the inverse of Return is Cost lol, that's why I was saying it. I don't think there's any good short name that can clearly explain what it does, but calling it Return on Investment for a measure where lower is better is very counter-intuitive. I think a name like "Modified Cost" or "Adjusted Cost" or "Return-Adjusted Cost" would make it clear that it's a measure of cost where lower is better for those who aren't going to come read the GitHub issues page.

Sorry if this seems like a nitpick, but I can't help much with the maths, so I might as well try to help with the words :p

@Aktanusa
Copy link
Collaborator

I think that is a good suggestion. Mind creating a new issue for me?

@Appleguysnake
Copy link

Sure, happy to help!

@Aktanusa
Copy link
Collaborator

Thanks!

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

No branches or pull requests

5 participants