Reverse Engineering the Points System, with Math!

By Stinger07, in X-Wing

Okay, one major topic of discussion here is balancing, and determining how point values are calculated, whether or not things are balanced, etc.

Well, I decided to take on the task of reverse engineering the balancing of the ships using known variables (Attack, evade, defense, attributes, etc.) and then using some advanced algorithms to find a best match .

So, first, the input data:

InputData_zps988dda1d.png

I used direct values for anything you see on the card, pilot skill, attack, defense, etc. Then, if they had a special ability, such as 360 firing for the YT-1300 or Alternating archs like the Firespray, I gave them a value of 1, otherwise 0. For speed, I rated the craft on a scale of 0-3, with 0s being the shuttle and the hwk and 3s being interceptors and a-wings. Lastly, for each feature they had, such as target lock, boost, barrel roll, etc, I added a 1 or 0.

As you can see, I used data from the generic squadrons from waves 1-3. I didn't want any name pilots because their abilities would enter in a variable I couldn't really account for.

From here, I create a random multiplier and 1 random constant to multiply each of these values by and then add them all together to see if they get close to the appropriate values. I then use a genetic algorithm to keep the good values, and throw away any poor performers.

The end result is a set of multipliers that theoretically can predict point value.

Then, I would run this algorithm 500 times and find the best of them.

This was my result:

.852*PS+3.156*ATK-.7533*EVD+.921*HULL+.9857*SHLD+2.0929*SPD+2.999*SPECIAL+2.64 *TL-.3227*BR+2.04*BOOST-.826*EVADE-.329= Point Value.

Now, this particular algorithm, as you can see, puts a lot of emphasis on speed and negates emphasis on Evasion, so those two cancel each other out.

As for performance, it predicted the proper point value within an average of 1.2 points.

Take a look at my results:

Results_zps3f7541bd.png

As you can see, it undervalued the X-wing, firespray, HWK, and TIE advanced, while over valuing the TIE Fighters and Y-wings.

I could in theory run this program several more times, and we would see a similar error, but with emphasis on different craft.

What do you think?

Should I try and run it a few more times to see what happens?

Okay, one major topic of discussion here is balancing, and determining how point values are calculated, whether or not things are balanced, etc.

Well, I decided to take on the task of reverse engineering the balancing of the ships using known variables (Attack, evade, defense, attributes, etc.) and then using some advanced algorithms to find a best match .

So, first, the input data:

InputData_zps988dda1d.png

I used direct values for anything you see on the card, pilot skill, attack, defense, etc. Then, if they had a special ability, such as 360 firing for the YT-1300 or Alternating archs like the Firespray, I gave them a value of 1, otherwise 0. For speed, I rated the craft on a scale of 0-3, with 0s being the shuttle and the hwk and 3s being interceptors and a-wings. Lastly, for each feature they had, such as target lock, boost, barrel roll, etc, I added a 1 or 0.

As you can see, I used data from the generic squadrons from waves 1-3. I didn't want any name pilots because their abilities would enter in a variable I couldn't really account for.

From here, I create a random multiplier and 1 random constant to multiply each of these values by and then add them all together to see if they get close to the appropriate values. I then use a genetic algorithm to keep the good values, and throw away any poor performers.

The end result is a set of multipliers that theoretically can predict point value.

Then, I would run this algorithm 500 times and find the best of them.

This was my result:

.852*PS+3.156*ATK-.7533*EVD+.921*HULL+.9857*SHLD+2.0929*SPD+2.999*SPECIAL+2.64 *TL-.3227*BR+2.04*BOOST-.826*EVADE-.329= Point Value.

Now, this particular algorithm, as you can see, puts a lot of emphasis on speed and negates emphasis on Evasion, so those two cancel each other out.

As for performance, it predicted the proper point value within an average of 1.2 points.

Take a look at my results:

Results_zps3f7541bd.png

As you can see, it undervalued the X-wing, firespray, HWK, and TIE advanced, while over valuing the TIE Fighters and Y-wings.

I could in theory run this program several more times, and we would see a similar error, but with emphasis on different craft.

What do you think?

Should I try and run it a few more times to see what happens?

What do you think?

I think such a thing is inherently flawed, because it's pretty clear that FFG tweaks the point values to achieve a given result in a 100 point list.

It's pretty clear for example that they set the X-Wing at 21 points for no other reason then to avoid a 5 X-Wing list.

Seeing how they do that, a formula will never be completely accurate.

What do you think?

Should I try and run it a few more times to see what happens?

While interesting I think without countng in dials it is never going to accurately predict things. How well does it work for the Defender, E-Wing, and Z-95.(It can't do the Phantom because of cloak.)

Z-95 Bandit- 17 points (should be 12)

E-Wing Knave - 20 (Should be 27)

Defender Delta - 22 (Should be 30)

It looks like I have some work to do.

What do you think?

I think such a thing is inherently flawed, because it's pretty clear that FFG tweaks the point values to achieve a given result in a 100 point list.

It's pretty clear for example that they set the X-Wing at 21 points for no other reason then to avoid a 5 X-Wing list.

Seeing how they do that, a formula will never be completely accurate.

That I understand, and my goal would be to predict the value, for us in the community to then tweak, but I figured I would try it :)

What do you think?

Should I try and run it a few more times to see what happens?

While interesting I think without countng in dials it is never going to accurately predict things. How well does it work for the Defender, E-Wing, and Z-95.(It can't do the Phantom because of cloak.)

Z-95 Bandit- 17 points (should be 12)

E-Wing Knave - 20 (Should be 27)

Defender Delta - 22 (Should be 30)

It looks like I have some work to do.

What do you think?

I think such a thing is inherently flawed, because it's pretty clear that FFG tweaks the point values to achieve a given result in a 100 point list.

It's pretty clear for example that they set the X-Wing at 21 points for no other reason then to avoid a 5 X-Wing list.

Seeing how they do that, a formula will never be completely accurate.

That I understand, and my goal would be to predict the value, for us in the community to then tweak, but I figured I would try it :)

That said, Wow, those were pretty far off. Surprisingly so. I can't believe it would get the X-wing right and yet ay the E-wing would be cheaper...

Edited by Aminar

What do you think?

If I understand the formula correctly, increases in agility decrease the points cost. If that is indeed how the formula works, you can throw it straight out the airlock.

Surprise! Genetic algorithm fitted to known points doesn't fit well with out of sample points! Read all about it!

Obligatory post....

It looks like I have some work to do.

I appluad your effort, but yes you have a lot of work to do. :) Do you know Linear Algebra? You need to understand Linear Algebra before you really understand what it is you are trying to do here. You need to be able to set up the system of equations by hand , and then solve for the coefficients by matrix inversion (on computer). This assumes that the matrix has a determinant and is invertable.

The answer, by the way, even if it even possible to get one, is not particularly meaningful, for technical reasons related to the above, and also because...

What do you think?


I think such a thing is inherently flawed, because it's pretty clear that FFG tweaks the point values to achieve a given result in a 100 point list.

It's pretty clear for example that they set the X-Wing at 21 points for no other reason then to avoid a 5 X-Wing list.

Seeing how they do that, a formula will never be completely accurate.

<--- This. Trying to predict FFG's costs is fundamentally impossible by formulas.

I have taken a different approach and instead have attempted to derive what a ship's value is based on its stat line and abilities. It has limitations. See here:

http://community.fantasyflightgames.com/index.php?/topic/100360-using-lanchesters-square-law-to-predict-ships-jousting-values-and-fair-point-values-work-in-progress/#entry1000109

You should take base size into consideration as well.

Obligatory post....

It looks like I have some work to do.

I appluad your effort, but yes you have a lot of work to do. :) Do you know Linear Algebra? You need to understand Linear Algebra before you really understand what it is you are trying to do here. You need to be able to set up the system of equations by hand , and then solve for the coefficients by matrix inversion (on computer). This assumes that the matrix has a determinant and is invertable.

The answer, by the way, even if it even possible to get one, is not particularly meaningful, for technical reasons related to the above, and also because...

What do you think?

I think such a thing is inherently flawed, because it's pretty clear that FFG tweaks the point values to achieve a given result in a 100 point list.

It's pretty clear for example that they set the X-Wing at 21 points for no other reason then to avoid a 5 X-Wing list.

Seeing how they do that, a formula will never be completely accurate.

<--- This. Trying to predict FFG's costs is fundamentally impossible by formulas.

I have taken a different approach and instead have attempted to derive what a ship's value is based on its stat line and abilities. It has limitations. See here:

http://community.fantasyflightgames.com/index.php?/topic/100360-using-lanchesters-square-law-to-predict-ships-jousting-values-and-fair-point-values-work-in-progress/#entry1000109

But Juggler is right, in that finding an appropriate formula will likely be very very difficult. But I firmly believe there is a formula they use. I just don't have a **** clue what it is, or how dials are involved.

Your approach here has some serious problems. Your bottom-line equation appears to offer a discount for additional Agility, as well as the barrel roll and evade actions, which means (with all due respect for what you're attempting) means it's nonsense.

If there's a way to force the coefficients to non-negative values, you might try this approach again with that constraint--but the fact that the initial approach produced negative coefficients probably says it's the wrong approach.

Another Flaw is that the "speed" category is something you came up with and arbitrarily assigned a coefficient too.

Personally I think your numbers are also off a bit. My own crude and intuitive guesses at the formula can be based on the following

Lets compare the Defender Interceptor and TIE

30 pts - 1 3 3 3 3 Target Lock

18 pts - 1 3 3 3 0 Boost

12 pts - 1 2 3 3 0

The difference between the Defender and the Interceptor? 12pts 3 shields and trading boost for Target Locks, using "shield upgrades" (not perfect because they are "ala carte") that makes up the 12 pt difference but the interceptor still then is 2 pts "cheaper" than the Defender because of the cost of a "targeting computer" vs "engine upgrade" so FFG thinks that the difference between the Defender's and interceptor's dials is worth 2 pts (a white k-turn probably)[or using fluff to justify the free boost, saying the defender is a medium fighter VS and interceptor is an interceptor and thus needs to be faster]

The TIE vs Interceptor cost is 6 pts, for 1 attack and boost, the "engine upgrade" is 4 pts so that would leave room to assume the remaining 2 pt difference is for the extra attack.

Various sources seem to indicate 2 PS is worth 1 pt, (obsidian VS academy, bandit vs tala, Veteran Instincts, though it seems ships with higher attacks/hull/agility pay more for PS)

and a cost of agility can be compared X-wing vs Defender and E-wings

D30 1 3 3 3 3

X21 2 3 2 3 2

E 27 1 3 3 2 3

Add using the "ala carte" upgrades to equalize them, the X-wing would be 25 with a "shield upgrade" and a defender would be 31 at PS 2 so that leaves a 6 point gap for a static extra agility (plus barrel roll and dial advantage), the E-wing would be 31 ("hull upgrade" and PS2) again a 6 point gap for 1 agility(and barrel roll and dial advantage) and after equalizing the hull is the same cost as a Defender

Once again I would like to emphasize these are crude and intuitive guess I am making based on comparing ships that are easy to compare and ignoring the cost of actions and dials. And I acknowledge that "built in" features will be cheaper (much like a value meal VS ala carte, at a fast food restraunt) and that probably allows for some of the wiggle room for dial and action differences, but I feel the modification cards provide a rough baseline that can be used to speculate on what FFG values some stats at

You should take base size into consideration as well.

We all know it's not the size that counts, it's how you use it. Lessons learned from the Sherrif of Rottingham.

Also, the equations fail to take into account the color of the ships. Red ships are always inherently faster.

Your approach here has some serious problems. Your bottom-line equation appears to offer a discount for additional Agility, as well as the barrel roll and evade actions, which means (with all due respect for what you're attempting) means it's nonsense.

If there's a way to force the coefficients to non-negative values, you might try this approach again with that constraint--but the fact that the initial approach produced negative coefficients probably says it's the wrong approach.

I understand that the values are non-sense. My approach was not to create something that was accurate, but rather, something that modeled the point values. If you notice, though it discounts agility values, it has a high value on the speed of the craft.

With that, I did actually try this with only non-negative values, but I was able to reduce the average number of points it was off by (from 1.75 to 1.4) by introducing negative values. The constant at the end was also an attempt to reduce the error, and that brought it down another .2.

Like I said, I realize that this is a flawed process, but it was a fun little exercise and did get some accurate values in the middle. It also proved the TIE Advanced is undervalued.

As for linear algebra comments, I did take a crack at doing it with a lower number of inputs using straight up row-reduced echelon form, but it proved only to create the exact values and could not extrapolate to the other ones.

Also, I tried it again using the Defender, Z-95, and E-Wing values and I could not get the error to go below 2.5, meaning they do not match previous values at all. The Z-95 is under valued and the E-Wing/Defender are overvalued, according to this equation.

What are you doing? Just picking random numbers for each co-eff and testing for accuracy? And iterating until you get good matches?

If so, that is certainly not an "advanced algorithm"

Sorry x

I actually used non-random numbers at first, but that actually produced worse results. The advantage of a genetic algorithm is that is picks the values that are most accurate, and discounts those that don't work well. They rely on random combination of input values, so much so that initial inputs can be thrown away completely after a few generations. By creating random values, it saves time and create a wider variety of possible outputs, each with a different likelyhood of creating an accurate model.

I am using shear computing force to model this, not exactly values. Give me enough time on a fast enough computer, and I would eventually have a perfect model.

As for linear algebra comments, I did take a crack at doing it with a lower number of inputs using straight up row-reduced echelon form, but it proved only to create the exact values and could not extrapolate to the other ones.

That's a big clue. Keep pulling on that thread.

I am using shear computing force to model this, not exactly values. Give me enough time on a fast enough computer, and I would eventually have a perfect model.

Are you really sure of that, given what you just stated above? It is not an issue of computing power. As long as you have at least as many ships as different coefficients, the mathematical solution requires only one matrix inversion. If you have more coefficients to solve for than ships, then you can mathematically just ignore some of the coefficients. I.e. ship cost does not depend at all on X.

This doesn't guarantee that the matrix will be invertible. And even if it is, it is extremely unlikely that the formula will be meaningful.

If you insist on avoiding Linear Algebra, with a genetic algorithm you run the risk of getting stuck in a local maxima. In an N-dimensional problem where N is fairly large like this, you will probably never get to the optimal solution. The alternative is to brute force it with N nested loops and a range of possible values for each coefficient.

That all being said, this is an entertaining mathematical exercise but will have roughly zero predictive value for future ships.

Can anyone name a generic pilot who's cost is a factor of 100?

Edited by Lagomorphia

Can anyone name a generic pilot who's cost is a factor of 100?

The Roman numeral X is ten, so every X-Wing is naturally a factor of 100. :D

That all being said, this is an entertaining mathematical exercise but will have roughly zero predictive value for future ships.

And isn't this a fun discussion?

Honestly, I completely realize the futility of it all, and I didn't intend on devoting much time to it.

I think that is we spent a few hour adjusting numbers by hand, we could possibly have a solution created, but as we see withe the Wave 4 ships, it isn't a very accurate model. Fun making, but not very good.

Can anyone name a generic pilot who's cost is a factor of 100?

Avenger Squadron Pilot PS3 Interceptor 20pts

Can anyone name a generic pilot who's cost is a factor of 100?

Prototype with hull upgrade. Oh...and no refit!

Your approach here has some serious problems. Your bottom-line equation appears to offer a discount for additional Agility, as well as the barrel roll and evade actions, which means (with all due respect for what you're attempting) means it's nonsense.

If there's a way to force the coefficients to non-negative values, you might try this approach again with that constraint--but the fact that the initial approach produced negative coefficients probably says it's the wrong approach.

I understand that the values are non-sense. My approach was not to create something that was accurate, but rather, something that modeled the point values. If you notice, though it discounts agility values, it has a high value on the speed of the craft.

With that, I did actually try this with only non-negative values, but I was able to reduce the average number of points it was off by (from 1.75 to 1.4) by introducing negative values. The constant at the end was also an attempt to reduce the error, and that brought it down another .2.

Like I said, I realize that this is a flawed process, but it was a fun little exercise and did get some accurate values in the middle. It also proved the TIE Advanced is undervalued.

As for linear algebra comments, I did take a crack at doing it with a lower number of inputs using straight up row-reduced echelon form, but it proved only to create the exact values and could not extrapolate to the other ones.

Also, I tried it again using the Defender, Z-95, and E-Wing values and I could not get the error to go below 2.5, meaning they do not match previous values at all. The Z-95 is under valued and the E-Wing/Defender are overvalued, according to this equation.

Again, not meaning to take away from the attempt. I think the real problem with any regression approach (which is what your genetic algorithm ought to approximate) is that it's too easy to overfit the model and/or end up with multicollinearity problems. In this case, for instance, the model "sees" that high-Agility ships typically have inexpensive base costs, and because Agility is entered in the model as a predictor, it merrily translates that correlation into causation. In the mean time, it also sees that inexpensive ships have low combined Hull and Shield values, and accordingly assigns positive values to those coefficients.

But of course we know that Agility has a strong inverse relationship with Hull+Shields--as predictors, they're not independent of each other (nor is Agility independent from either your speed factor or the evade action). So it's a big mess of spaghetti put in a mathematical blender, and the output is exactly as unappetizing as you'd expect from the end result of that metaphor.

I agree with you that it's a fun and interesting exercise, though.