2021年3月30日星期二

python equation for finding turning point of derivative, while also using cost most efficiently

im attempting to make a program to optimise unit purchasing in a game, and i've hit a wall. so what i have so far, is i collect all the info price info of the 4 units (e.g 1 is 0.05, 1 is 0.154, 1 is 100, etc), the number of each unit you currently have (they can be sold/swapped) and the amount of money you have to spend, and use it to find the total money pool A.

now, assuming the unit types are A, B, C, D, the equation for your power is power = (A + (B * 100)) * e^(log10((C * 5) * D))

is there a way of solving this equation for the highest power you can buy with your pool of money (you can buy fractional units, it does not need to be whole numbers)?

https://stackoverflow.com/questions/66880304/python-equation-for-finding-turning-point-of-derivative-while-also-using-cost-m March 31, 2021 at 09:04AM

没有评论:

发表评论