News for hackers. Stuff that matters.
Re:Spaceplan by christiangenco on Sunday August 14, 2016 @01:53AM (#12284429)
Ahh of course! I had the thought to take this into account but couldn't wrap my head around the math last night.

cA/p is just the time it would take to earn the money to buy A at the current production level - seems much simpler now.

I think the last term should be `cA/(p+pB)`. When I solve from there[1] I get `cB * pB < cA * pA`, which means that the most optimal item A will have the largest product `cA * pA`.

This would translate to:

    res.score = res.cost*res.powerGain
    ...
    }).sort(function(a,b){return b.score - a.score})   
Does that check out? It seems too simple, and now that I'm thinking more about it I think this would be functionally equal to what I already have. Did I do my inequality[1] wrong?

1. http://i.imgur.com/pyMY3zr.jpg

There are no comments on this comment yet.