# Need starter-help on reverse-engineering a game algorithm

I've got a dataset of about 1700 attacks in this game. A subset of the data is provided here. It consists of 9 columns:

The modifier is in a range of 1 to 3 depending on the ratio between the attackers-stats (`Astr`, `Aspd`, `Adex`, `Adef`) and the defenders stats.

This sounds like a simple regression, but there is a layer of obscurenment where the player's stats are reduced depending on how balanced they are.

So we have a "score" which is less than the sum if the stats are unbalanced - like having wayy more strength than defense.

I've tried countless different ways to make this adjustment in Excel, but I'm unable to find a good match. Secondly, the values are bound to be rounded, sometimes up and sometimes down. We don't know. The rounding can be on the sum, the score, the resulting ratio and so on.

This is the best result from messing around in Excel: `Score = SUM - STDEV`. This provides a decent fit, but it kinda breaks down in the most extreme cases (1 stat that is multiple orders of magnitude greater or smaller than the rest.

I'm looking for any ideas or pointers in which direction I can look to solve this? In my head, this is something to throw through a neural network, but I've got no experience with that. I prefer to work with Python if this is a direction I should look.

• Are those values generated on client-side? Jan 31, 2021 at 20:46
• Provide all the data. And more if you can get it. For the columns, are there bounds on the values? What is the game written in? Jan 31, 2021 at 22:57
• @morsisko: No these are generated server-side pythonpython: Full dataset provided here - What do you mean bounds on the values? They are stats for each player and range from 1 to multiple billions in the game. Theres a new effect on the modifier around 1.5B which is why I've filtered out any value > 500M in the dataset. Unfortunately I don't know the language which is used.
– Mixy
Feb 1, 2021 at 7:54
• Are you able to create characters in the game? What happens when an attacker has a constant value for their attributes? 1 or 0 for example? Can you generate data by speccing players? Feb 1, 2021 at 15:43
• Yes if you can adjust the stats 1 by 1 slowly you can narrow down the equation by sight alone. Jul 3, 2021 at 3:44

So here's a step toward the answer. First, look for things which have the same modifier but have different values. Then look for things which have as few different values as possible. That will help simplify the problem:

• Thanks for the tip. To answer the questions you posed in a comment under the OP: Full dataset provided here - What do you mean bounds on the values? They are stats for each player and range from 1 to multiple billions in the game. Theres a new effect on the modifier around 1.5B which is why I've filtered out any value > 500M in the dataset. Unfortunately I don't know the language which is used.
– Mixy
Feb 1, 2021 at 8:00
• The bounds on the value would be the highest and lowest for each column. Feb 1, 2021 at 12:26
• 1 is lowest. There is no upper bounds. Stats are whole integers. No I'm not able to create new characters as I'm limited to the account I have. In reality the dataset I have has been generated by "spectating" others users. It's hard getting data this way
– Mixy
Feb 1, 2021 at 16:20
• What is your goal? Given some stats to predict the modifier? Feb 1, 2021 at 18:46
• This dataset contains both the attacker and defender - which is rare. In the "wild" I would only have access to the modifier and the attackers stats. I want to use that information to estimate the defenders stat. I realize I wont be able to discern between defenders strength and speed, but to estimate their total. The currecnt best-fit regression provides decent result, but getting the exact formula would open up a whole different ray of possibilities too
– Mixy
Feb 1, 2021 at 19:22