[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Sequences

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 54
Thread images: 9

File: Sequence.jpg (42KB, 165x400px) Image search: [Google]
Sequence.jpg
42KB, 165x400px
The column on the left is the original sequence. The column on the right is a sequence for the differences in-between numbers. How can I find the constant in-between the numbers? Both columns should have the same result.

I know something simple like
2, 4, 6, 8 would be +2.
and that
3, 5, 9, 17, 33, would be *2-1.

However this is beyond me, other than I know it is *2-x and that x seems to double each time as well.
>>
>>8582518
What generated the sequence? Or what is the sequence supposed to be?
>>
what was the original question?
>>
you can always try to fit a polynomial and see what happens
>>
>>8582662
>>8582663
It's the experience points needed to level up in a game. Each entry in the left column is the number of total points needed for the next level. The column on the right in the number of points needed within that level to get to the next.

Just a personal project as I deconstruct the game.
>>
oh i see, it's a recurrence. never mind about the polynomial. it would help to see the original question though
>>
>>8582672
No real original question. This is just data I've complied from various level up screens as I've hacked into the code to allow instant leveling up in order to see how much experience is needed for future levels.
>>
Each next lvl seems to require about 92% more experience than the last one is the only pattern i see so far
>>
>>8582684
Looking at it yes the pattern seems to be 1.92x increaments in exp for next lvl always rounding down (rounding down on perfect whole numbers too it seems).
>>
>>8582684
That's pretty much what I'm looking for. 91.9197% is what I have so far for that first level. I'm trying to get it as accurate as possible as if you round with this sort of equation your result becomes further off further down the sequence.

So far the only other thing I can think to try is for the first example is.

3000*2=6000-5759=241 First example is *2+241.
Then
5759*2=11518-11057=461 so *2+461
etc.

I figured there was a fixed percentage. Could you show how you arrived at 92%? I know it's not exactly 92% and would like to narrow that down.
>>
>>8582704

it might help to make a table of all [math]\frac{x_i}{x_{i-1}}[/math]
>>
>>8582697

if this doesn't work just try normal rounding
>>
File: Sequence 2.jpg (60KB, 225x400px) Image search: [Google]
Sequence 2.jpg
60KB, 225x400px
>>8582717
The new column is *2-x with x being the cell to the left.
>>
>>8582518
Compute the differences of the differences until you get all 0s, if you do, it's a polynomial.
>>
>>8582732
It's a recurrence.
>>
>>8582732

it seems to be pretty close to 92%, not sure if we need finite differences, but good idea anyway.
>>
>>8582732
Between each term, there's essentially a floor() function, which rounds things down so you'll never get a perfect ratio since there is no infinite sample.
>>
>>8582731

that's not what i meant.

the person who got 1.92 did so by taking 5759/3000, so if you take that for every pair of values, you might get a better idea of what your coefficient is, or if it's even a linear function at all
>>
>>8582744
OP here, I am attempting to find the finite differences. It doesn't appear that is a simple as 92% rounded down to the nearest integer as the second number would be 5760 instead of 5759. While other numbers are exactly the number (not including the decimal), some further in the sequence are not.

Attempting the final number in the sequence gets me:

377082133*1.92=723997695.36 instead of 723999079.xx

Is there a better way the find this than reverse-rounding?
>>
>>8582763

first please do this: >>8582717
>>
File: discount excell.png (10KB, 171x351px) Image search: [Google]
discount excell.png
10KB, 171x351px
>>8582749
>>
>>8582769
meaning for the right column in your first picture, compute 5759/3000, 11057/5759, etc.
>>
>>8582771

sorry, i meant for the right column in your first picture
>>
File: discount excell 2.png (12KB, 252x350px) Image search: [Google]
discount excell 2.png
12KB, 252x350px
>>8582774
>>
File: Sequence 3.jpg (103KB, 347x403px) Image search: [Google]
Sequence 3.jpg
103KB, 347x403px
>>8582749
I understand now. I didn't take calculus so I didn't recognize your formula.
>>
>>8582782

so it's 1.92

are those all the samples you have? if you want to calculate it more accurately, only round it after you've calculated up to the level you need. (or do just the opposite, and round it every recurrence, to see whether this is what the game does)
>>
>>8582782
It might be helpful to note that in the game you rank down as you level up. You start at rank 12 and go down until you hit rank 1. You can continue to level up, but you cannot do better then rank 1. I believe that the developers were not expecting for players to go past row 12 in this table.
>>
File: Sequence Overleveling.jpg (52KB, 368x160px) Image search: [Google]
Sequence Overleveling.jpg
52KB, 368x160px
>>8582790
After row 20 in the table, when you level up to 21 the experience counter raps around to the negative range. Eventually it gets back positive. This is the data from that range, but it doesn't fit with the sequence due to the wrap around.
>>
File: 1459874386848.png (93KB, 1272x953px) Image search: [Google]
1459874386848.png
93KB, 1272x953px
>>8582518
>>8582782
You can approximate a working function by taking the ratios between the differences and using a bisection method in which you multiply each difference by a fraction of the next one to the current one.

Naturally, just by looking at the problem, you can come up with the iterative function:

f(x+1) = floor( f(x) + ( f(x)-f(x-1) )^( 723999079/377082133 ) )

Where f(0) is 0 and f(1) is 3000.

When I brute-forced a method through a bisection method for the ratios, it yielded the same function but with the exponent being 754974703/393216000, or 1.9199999567667643.

I'd just assume that the exponent is 1.92 but that there are floating points in the background that create noise in the calculation. It's fairly common to use floats in game design, especially when they're used to calculate other things and when the game engine is built to accommodate large projects.
>>
>>8582790
I prefer not to round up to 1.92 as that throws the numbers off a bit more than I would like once we get into the hundred-millions. The only consistent thing is about 1.9199 except in the first where it is about 1.9196 and the last where it is about 1.92. However, the exact multiplier is not a hard percentage for every single level as you can see, there are slight variations in the multiplier per level.
>>
>>8582809

what in the fuck....

so the game de-levels you? i'm not sure what you're saying.
>>
>>8582820
>exponentiating by the fraction instead of just multiplying by it
Eh, close enough.

Disregard the mention of the exponentiation and use multiplication instead.
>>
>>8582820
>I'd just assume that the exponent is 1.92 but that there are floating points in the background that create noise in the calculation.

agreed. this does bring up an interesting question: how would you model noise from floating point inaccuracies? is it gaussian? uniform? i'm sure some engineer can chime in.
>>
>>8582825
No, the games EXP wraps around. The far left column is the total experience needed to level up. I think there is a hard limit once you hit 3 billion EXP. It wraps around to negative something billion. You can continue to gain positive EXP via normal means, however it is VERY unlikely a player will legitimately come close to level 21. If you got 1 million EXP per day, (which is very tough to do) it would take 4 years and 4.5 months playing every single day.

I'm working on editing one of the EXP scripts that give you 250 EXP into a MUCH higher amount in order to see where that wrap around point is. I've already seen that it isn't 2 billion, so my guess is that it is 3 billion and then it wraps around into the negative range. Level 21 requires -1393943319 EXP, once you hit the wrap around point, you will be at an EXP amount that is lower than the required negative EXP amount to level up. It's still all forward progress, other than the wrap around point at (I'm guessing) 3 billion.
>>
>>8582846

they probably exceeded the maximum value for whatever variable type they use to store your total exp.

this is a bug in the game, or rather they did not account for your cheating
>>
File: floats.gif (2KB, 400x180px) Image search: [Google]
floats.gif
2KB, 400x180px
>>8582841
I'm not good with explaining floating points, but a computer engineer should be able to using pic related.

>>8582846
The wrap-around limit for your common 32-bit int value is 2^31-1, or about 2.1 billion (2147483647). The last bit is reserved for the number 0, so when it wraps down, it goes to -2147483648.
>>
>>8582862

kind of makes you wonder why they'd use a signed variable for your level.
>>
op if the game is open source just change the variable type and recompile, or let the devs know or whatever
>>
>>8582857
No doubt that it's a bug. The same result would happen if you actually spent long enough to get up to that point. It's not a result of me going into the files. It's somewhat like how with many games from the 80s had a level limit of 255 and when you rolled over into 256 it caused wrap around bugs like this, which in most cases were game breaking.

>>8582862
Very nicely explained. I'll modify the first gain EXP file so that I will hit 249 EXP below 2147483647 and then trigger an event which will get me 250 EXP to confirm.
>>
>>8582875
The game is from the year 2000. Nobody really cares anymore. I'm just messing around. The original point of this was to create an EXP chart for myself and find out how long it would take to max out all of your skills Once you hit level 27 you will have the maximum of 9 in all 9 skills at 3 skill points awarded per level up. I was not expecting to encounter this wrap around bug though. Although, if it wasn't for the wrap around bug it would take 240 years to max out your skill points. The wrap around going into the negative range and then the lower positive million range makes leveling up for levels 25 and 26 take only 1 year each at 1 million EXP per day as opposed to being humanly impossible if it wasn't for the wrap around bug.
>>
>>8582895

i wonder if there's any way to change the variable type after compilation? if you can locate where it is in the binary, you could widen that space, but I don't really know what else you'd need to do so that it behaves properly. i hardly ever program in c, much less edit binary files.
>>
disregard my ramblings, it might not be a static variable
>>
>>8582862
I ended up going with a slightly different method then I was originally going to do. I made it so that I had 2147483647 EXP exactly and then modified a gain EXP script so that I gained 1 EXP. It did exactly as you said and wrapped down to -2147483648. Thank you for that information, it would've taken me much longer to find without your help. I can now use this information to calculate the rest of the sequence in EXP needed for each level from levels 21 to 27. I'll post back with results. Although I'm sure that after level 20 the EXP will not be going with the sequence on the left chart, the EXP needed per level still might match up with the 1.92.
>>
>>8582925
I was just about to respond to said ramblings to if you're talking about >>8582913.

Are you referring to the 1.92 (1.9199) variable which is slightly off the further down the decimal range you get? Based on the variation I don't think it is a static variable, although it could be and if there are floating points, they very well could be creating noise. I'm not sure what a floating points are exactly, I'll have to look it up later. With floating points interfering, would the EXP amount be match up perfectly on every load of the game? Because when I change the level to get to these EXP amounts, they are always the same for the same level. If I load up the game with setting myself to level 20 or even 21 (or any other level for that matter) the EXP that I have and the EXP needed to level up will always be the same. (If I load the PC at level 20 on five different occasions, the PC will always be at 786950786 EXP.
>>
>>8582941

it looks like your total experience wraps around because the variable can't hold such a large value. if you had the source, this would be as easy as changing the variable type.

what i was wondering is whether it would be possible to change a variable type after compilation by modifying the binary file directly. i don't do much low-level programming, or work on compilers, so this is beyond my knowledge.
>>
>>8582862

weren't you a mechanical engineer? you're not supposed to know things about computers
>>
>>8582518

why do you need to calculate this? what event triggers a level-up?
>>
File: Level Up Time.jpg (172KB, 493x541px) Image search: [Google]
Level Up Time.jpg
172KB, 493x541px
>>8582949
I'm just starting out as you might've guessed. I've been using a mix of the dev released in-game editor along with some player made external tools for most things. There are a few things I can hardcode in notepad like dialog nodes and I'm just starting to understand action scripting. (Although that requires a tool to decrypt it.)

The point of this thread was so that I could eventually estimate out how long each level would take to level up when using legitimate means. I was originally attempting to find this by figuring out the percentage of increase which was as we found out was roughly a multiplier of 1.92.

I never suspected >>8582862 and figured I would have to brute force the EXP gain script until I stumbled across where the wrap around point was. >>8582862 saved me so much time. Thanks again!

The result of knowing that, granted me the ability to calculate the attached pic. The times given are rounded estimates once you get outside of the day range.

At 1 million EXP per day (difficult to do, but possible with a few hours of constant grinding.) you can make it to level 10 in the first day. level 11 would take 2 days, level 12 would take 3. It roughly doubles from there due to the 1.92 multiplier, until the wrap-around point. The 1.92 multiplier stays in effect when back in the positive range but thanks to the wrap-around limit. It takes less time for those higher levels, as shown. All that's left to do now is come up with the total time in a separate column and this project will be complete.

I'd still be interested on the background of the 1.919 (1.92) multiplier and why there are variations once you get a few decimal places in, if anyone can figure that out.
>>
>>8582981
To answer your first question, see
>>8582981

The event which triggers a level up is surpassing the required EXP amount at which point you will be told by the game what the next EXP amount you need to reach.

The game gives you 3 skill points per level. There are 9 skills in total which max out at 9 skill points. You need to make it to level 27 in order to max out all skills. I was attempting to find out how long that would take. The answer is roughly 27 years and 4.5 months, if the player obtained 1 million EXP per day every day. This is actually possible, but not easy and would require some serious dedication every day, but would still allow time for work and sleep.
>>
>>8582994
>I'd still be interested on the background of the 1.919 (1.92) multiplier and why there are variations once you get a few decimal places in, if anyone can figure that out.

when you multiply something by 1.92 you may get a real number that exceeds the precision limits of your cpu, or cannot be stored in whatever variable that it holds the result. you should read up on this though, both of your issues are related.
https://en.wikipedia.org/wiki/Integer_(computer_science)
https://en.wikipedia.org/wiki/Floating_point
>>
>>8583003
As for this 27 years and 4.5 months at 1 million EXP every day, this is much better than my previous estimate of 240 years to go from level 26 to level 27 if it wasn't for the wrap-around bug.

>>8583006
Wow, thanks for the links. I'm not sure if I'm quite to that level of understanding. It seems like enrolling in a calculus class would be a good idea.
>>
>>8583020

it doesn't have much to do with calculus, although knowing more calc is always good.

pick up a book on C and read the first couple of chapters, you'll understand. whoever wrote the game did kind of a sloppy job desu.
>>
>>8583021
Bethesda Softworks
>>
>>8582994
You're welcome, my brother.

To get some quick understanding of the floating point problem, try looking for explanations on YouTube. A quick search gave me this:

www.youtube.com/watch?v=PZRI1IfStY0
Thread posts: 54
Thread images: 9


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.