• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Math nerds: how to develop formula from results?

Status
Not open for further replies.

lozina

Lifer
I have a list of numbers that are the product of some function/formula:

60 45 38 35 32 30 28 27 26 25 25 24 23 23 22
How can I develop a formula which results in these numbers?

I plugged them into excel and created a chart, added trend line and played with the different types - I guess the log function looked the closest, and also had it show me the resulting formula:
y = 12.88ln(x) + 5.1763

I guess it works but I cant imagine the game engine (this is for a game BTW) using such a formula for this....

I am guessing more it is like 60 is the base number, and then it is modified with a malus/subtraction each iteration, which is strong at first but gets weaker (like a log function).

So I am imaging something like
y = 60 - f(x)

where f(x) is some sort of log function.

I wish I was good at math...

[edit] also I think the same function would need to result in the following values as well:
40 28 23 20 17 16 15 14 13 12 12 11 11 10 10
25 17 14 12 11 10 9 8 8 7 7 7 6 6 6

where I believe their base numbers would be 40 and 25 (the first numbers)

and of course the number is most definitely the result of rounding
 
Last edited:
Yeah thats a good question, if there is any randomness then it would be pretty much impossible to figure out the formula - but I dont think it is because when I graph the results they all look smooth, with random results I would expect to see jaggedness or inconsistencies
 
Plot the differences between consecutive numbers, they go down by about 1/2 each time, til it gets to 2 or 3. The first difference is about 1/3 of the original number.
 
Is the independent variable being incremented by a constant amount? Are you putting in 0,1,2,3... and getting the number you list?

I see some of the number repeat so it's not just an equation like you listed, unless maybe if it's just rounding.
 
I have a list of numbers that are the product of some function/formula:

60 45 38 35 32 30 28 27 26 25 25 24 23 23 22
How can I develop a formula which results in these numbers?

I plugged them into excel and created a chart, added trend line and played with the different types - I guess the log function looked the closest, and also had it show me the resulting formula:
y = 12.88ln(x) + 5.1763

I guess it works but I cant imagine the game engine (this is for a game BTW) using such a formula for this....

I am guessing more it is like 60 is the base number, and then it is modified with a malus/subtraction each iteration, which is strong at first but gets weaker (like a log function).

So I am imaging something like
y = 60 - f(x)

where f(x) is some sort of log function.

I wish I was good at math...

[edit] also I think the same function would need to result in the following values as well:
40 28 23 20 17 16 15 14 13 12 12 11 11 10 10
25 17 14 12 11 10 9 8 8 7 7 7 6 6 6

where I believe their base numbers would be 40 and 25 (the first numbers)

and of course the number is most definitely the result of rounding

It's called polynomial interpolation.

http://en.wikipedia.org/wiki/Polynomial_interpolation
 
Status
Not open for further replies.
Back
Top