Optimization problem

Framaaw

New member
Joined
Dec 19, 2021
Messages
3
Hello! Can someone help me with this maths problem please?
This is not for school, I'm trying to maximize the damages my character can do in a videogame, for this there are 3 variables i can change.
I did some research and I think it's called an optimization problem with a cost function, but I never did something like this before.

The Problem:
How can I get the biggest output value with these 3 variables x, y and z ?
(2177.89 + 0.0895*(23442+15552*((x)/100)))
*(1 + (216.8+y)/100)
*(1 + (25/9 * (387.3+z) / (1787.3+z)))

There are some constraints :
  • At first x, y and z are all equal to 0, but I can increase their value a total of 40 times, the increase is not the same for x, y and z
  • For x it's +4.955
  • For y it's +6.605
  • For z it's +19.815
Example:
I can increase x 15times, increase y 20times and increase z 5times, so my 40increases are used:
(2177.89 + 0.0895*(23442+15552*((15*4.955)/100)))
*(1 + (216.8+20*6.605)/100)
*(1 + (25/9 * (387.3+5*19.815) / (1787.3+5*19.815)))
 
Last edited:
0 * N = 0
Oh sorry if it wasn't clear, english is not my first language.
I think the example I used makes it clearer.

I don't multiply something by 0.
The increase I talked about is something like 0 + a*b
 
Last edited:
If your total number of increases is within a hundred or two then a simple brute force Python script takes less than a second. For example, in your case my script returned 11,26 and 3 for x,y and z increases respectively, and the output is approximately 41123 -- unless I've made an error or two in there.
 
Oh sorry if it wasn't clear, english is not my first language.
I think the example I used makes it clearer.

I don't multiply something by 0.
The increase I talked about is something like 0 + a*b
Still not clear. What are a and b? What is the max increase? Please inequalities, i.e. something is less than or equal 40.
 
If your total number of increases is within a hundred or two then a simple brute force Python script takes less than a second. For example, in your case my script returned 11,26 and 3 for x,y and z increases respectively, and the output is approximately 41123 -- unless I've made an error or two in there.
Oh actually a brute force python script seems to be a way better option for me, I will do that

Thank you very much everyone
 
Top