Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 35 36 [37] 38 39 ... 47  All

Author Topic: Maths thread.  (Read 307191 times)

0 Members and 1 Guest are viewing this topic.

Witherweaver

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 6476
  • Shuffle iT Username: Witherweaver
  • Respect: +7861
    • View Profile
Re: Maths thread.
« Reply #900 on: July 25, 2017, 11:32:56 am »
0

My point here is that when we can define a tuple of numbers without a notion of a vector space, and hence without a notion of a basis.  It's just a set of things.  When you introduce a vector space on the set, then you can talk about the representation of a given tuple as an element of the vector space in terms of a given basis.  Ultimately what I'm saying is that there's nothing fishy about talking about n-tuples as vector spaces and using coordinates as your basis.  The representations naturally coincide.

Yes, it's the same element of the underlying set.  But there are still different connotations.  The element (1,1,1) of R^3 doesn't have a length, but one can be defined, at it isn't unique.
Logged

Haddock

  • Minion
  • *****
  • Offline Offline
  • Posts: 725
  • Shuffle iT Username: Haddock
  • Doc Cod
  • Respect: +558
    • View Profile
Re: Maths thread.
« Reply #901 on: July 25, 2017, 11:53:59 am »
0

My point here is that when we can define a tuple of numbers without a notion of a vector space, and hence without a notion of a basis.  It's just a set of things.  When you introduce a vector space on the set, then you can talk about the representation of a given tuple as an element of the vector space in terms of a given basis.  Ultimately what I'm saying is that there's nothing fishy about talking about n-tuples as vector spaces and using coordinates as your basis.  The representations naturally coincide.

Yes, it's the same element of the underlying set.  But there are still different connotations.  The element (1,1,1) of R^3 doesn't have a length, but one can be defined, at it isn't unique.
I agree with the italicised portion.

Sort of see where you're coming from with the last line, but can't 100% agree.  Such a vector does have a (standard Euclidean) length.  The fact that you can define length in multiple ways notwithstanding.  It's a philosophical point, but I'd say the problem lies in the definition of length, not in the vector itself. 

Anyhow.
 
Logged
The best reason to lynch Haddock is the meltdown we get to witness on the wagon runup. I mean, we should totally wagon him every day just for the lulz.

M Town Wins-Losses (6-2, 75%): 71, 72, 76, 81, 83, 87 - 79, 82.  M Scum Wins-Losses (2-1, 67%): 80, 101 - 70.
RMM Town Wins-Losses (3-1, 75%): 42, 47, 49 - 31.  RMM Scum Wins-Losses (3-3, 50%): 33, 37, 43 - 29, 32, 35.
Modded: M75, M84, RMM38.     Mislynched (M-RMM): None - 42.     Correctly lynched (M-RMM): 101 - 33, 33, 35.       MVPs: RMM37, M87

Witherweaver

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 6476
  • Shuffle iT Username: Witherweaver
  • Respect: +7861
    • View Profile
Re: Maths thread.
« Reply #902 on: July 25, 2017, 12:11:59 pm »
0

Well, I don't exactly disagree.  But I'd say that a point in the set R^3 is not a vector.  It's only a vector when it belongs to the vector space, which requires additional structure. 

Maybe another example to show how I'm thinking of it is the function

f(x) = 1 if x=0, 0 otherwise.

This is an element of the set of all functions g:R->R.  Under scalar multiplication and pointwise addition, this is a vector space, and f is an element of this space.

Now consider the space of L^2 functions.  The function f is also in this space, and is a (representation of the) zero element: g+f = g+f = g for all g in L^2.  But it isn't the zero element of the original vector space. 

I mean you're saying that's the property of the space and not of the element, which is fine.  My point I guess is that when you talk about an element belonging to a structure, you're tying in context related to the structure.  So it's not exactly the same. 

But yeah.
Logged

Cuzz

  • Minion
  • *****
  • Offline Offline
  • Posts: 623
  • Shuffle iT Username: Cuzz
  • Respect: +1018
    • View Profile
Re: Maths thread.
« Reply #903 on: July 25, 2017, 12:41:32 pm »
0

Well, I don't exactly disagree.  But I'd say that a point in the set R^3 is not a vector.  It's only a vector when it belongs to the vector space, which requires additional structure. 

Maybe another example to show how I'm thinking of it is the function

f(x) = 1 if x=0, 0 otherwise.

This is an element of the set of all functions g:R->R.  Under scalar multiplication and pointwise addition, this is a vector space, and f is an element of this space.

Now consider the space of L^2 functions.  The function f is also in this space, and is a (representation of the) zero element: g+f = g+f = g for all g in L^2.  But it isn't the zero element of the original vector space. 

I mean you're saying that's the property of the space and not of the element, which is fine.  My point I guess is that when you talk about an element belonging to a structure, you're tying in context related to the structure.  So it's not exactly the same. 

But yeah.

I think this example muddles things a bit since the elements of L^2 (assuming you want it to have its normed vector space structure) aren't functions but equivalence classes. If you don't want it to have its normed vector space structure, then it is still a vector space but your f is not the zero element.
Logged

Witherweaver

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 6476
  • Shuffle iT Username: Witherweaver
  • Respect: +7861
    • View Profile
Re: Maths thread.
« Reply #904 on: July 25, 2017, 12:51:28 pm »
0

Well, fair enough.
Logged

pacovf

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3499
  • Multiediting poster
  • Respect: +3838
    • View Profile
Re: Maths thread.
« Reply #905 on: July 25, 2017, 02:52:51 pm »
+2

silverspawn: So vectors and coordinates in R^n don't seem to be the same thing, so what's the deal with matrices then.
people: just as the vector coordinates depends on your basis, so does the matrix representation of an endomorphism in R^n.
silverspawn: oh ok thanks I get it
f.ds: also *one extra page of mathematical pedantry expanding the answer*
Logged
pacovf has a neopets account.  It has 999 hours logged.  All his neopets are named "Jessica".  I guess that must be his ex.

Tables

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2816
  • Build more Bridges in the King's Court!
  • Respect: +3347
    • View Profile
Re: Maths thread.
« Reply #906 on: August 08, 2017, 07:56:48 pm »
0

Okay, here's a confusing one. I'm trying to work out a formula for a game. Specifically, it's for Splatoon 2's Special Saver ability, but knowledge of the game shouldn't matter for the maths.

You can have anywhere from 0 to 57 points (denoted P) in an ability, and typically the formula for how effective the ability will be is:

Max x ( 0.99 x P - ( 0.09 x P )^2 ) / 30

Where Max is the max effect an ability gives.

This formula basically makes the early points in abilities more valuable than later ones, for example with just P = 10 you get roughly 30% of Max, with P = 30 you get about 75% of Max. In particular, this formula is increasing, and its derivative is decreasing.

Most abilities will do something with the output of this formula to get a final result - for example with your run speed, it's added to your normal run speed. With Ink saver (spend less ammo), it's subtracted from the cost of each shot.

I've explained all this because, most likely, Special Saver also uses some kind of variation on this formula's output to get a final answer, but I just can't work out what it is. Here are some output values I've measured:

0 pts = 135
10 pts = ~162
15 pts = 180
20 pts = ~197
26 pts = ~217
30 pts = ~228

These are actually angles, out of a max possible of 270 (three quarter circle). Any with a tilde are from measuring it, and while that's not perfectly accurate they should be correct to within one degree, maybe two at most. The output for 57 is almost certainly going to be in the 260-270 range, and the output is almost certainly going to be an increasing function. These are all the facts I have. And I'm stuck. Anyone got any suggestions, or can see how to make this work? I know it's a long shot...

If needed, I could probably check some more values up to about 33 or 36, if someone thinks they've worked it out or could do with an extra data point, but due to how the ability system works I can't necessarily check any value (some numbers, like 5 and 11 are literally impossible to have, many others are very awkward but possible, like 25).

I figured at first it would just be a nice and simple, 135 max, add it on to 135 base, done. That's how it worked in Splatoon 1. WRONG. Doesn't even get close to most of these numbers. So I tried tweaking stuff to make the formula work, and it... doesn't. One notable thing is that the jump between 10 and 20 is bigger than between 0 and 10, meaning it isn't just using a multiple or something. So I've tried doing weird things like ignoring the max bit and dividing by (1-output), which gets close, but doesn't get me there.
Logged
...spin-offs are still better for all of the previously cited reasons.
But not strictly better, because the spinoff can have a different cost than the expansion.

Mic Qsenoch

  • 2015 DS Champion
  • *
  • Offline Offline
  • Posts: 1709
  • Respect: +4329
    • View Profile
Re: Maths thread.
« Reply #907 on: August 08, 2017, 08:12:14 pm »
+1

A plot of points vs angles is basically linear. With a best fit line (least squares) of  angle = 3.1714*pts + 133.11, and an R^2 = 0.9976. With measurement errors on the order of degrees I'd guess the true formula is exactly linear. I don't think the effectiveness formula you gave is relevant for this ability.
« Last Edit: August 08, 2017, 08:13:53 pm by Mic Qsenoch »
Logged

Tables

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2816
  • Build more Bridges in the King's Court!
  • Respect: +3347
    • View Profile
Re: Maths thread.
« Reply #908 on: August 09, 2017, 06:57:41 am »
0

I did actually try something linear, but there's a few points I know are definitely correct - at 0, it's definitely exactly 135, and it was exactly 180 at 15 as well. I also don't think my angle measuring was that far off, but I guess it could be due to the resolution of the pictures (it's a fairly small line that's being measured). Regardless, it actually looks like simply 3P + 135 gets reasonably close everywhere. I'll have to test 10 pts again, since that should be exactly 165 if this is correct, and 30 pts should be 225.

I suppose this does make sense... although it's bloody weird in terms of not working like everything else, for no obvious reason. It also means it would cap at 45, which is also really weird.
Logged
...spin-offs are still better for all of the previously cited reasons.
But not strictly better, because the spinoff can have a different cost than the expansion.

Mic Qsenoch

  • 2015 DS Champion
  • *
  • Offline Offline
  • Posts: 1709
  • Respect: +4329
    • View Profile
Re: Maths thread.
« Reply #909 on: August 09, 2017, 07:53:42 am »
+1

I did actually try something linear, but there's a few points I know are definitely correct - at 0, it's definitely exactly 135, and it was exactly 180 at 15 as well. I also don't think my angle measuring was that far off, but I guess it could be due to the resolution of the pictures (it's a fairly small line that's being measured). Regardless, it actually looks like simply 3P + 135 gets reasonably close everywhere. I'll have to test 10 pts again, since that should be exactly 165 if this is correct, and 30 pts should be 225.

I suppose this does make sense... although it's bloody weird in terms of not working like everything else, for no obvious reason. It also means it would cap at 45, which is also really weird.

Well it may just look linear because we don't have data from the higher point values.

A second order polynomial fit of effectiveness vs angle works well too, but with this data gives 57 -> ~280. Which I guess overshoots the expected max angle a bit.
« Last Edit: August 09, 2017, 08:05:28 am by Mic Qsenoch »
Logged

Mic Qsenoch

  • 2015 DS Champion
  • *
  • Offline Offline
  • Posts: 1709
  • Respect: +4329
    • View Profile
Re: Maths thread.
« Reply #910 on: August 09, 2017, 09:48:29 am »
+1

Is the effectiveness formula you gave known to be exactly right (or were those just approximate numbers)? Because it's close, but not exactly the parabola with a maximum at 57. When I use the parabola with a maximum at 57 to calculate effectiveness and then plot effectiveness vs angle (from your data), the best fit 2nd degree polynomial gives an angle for 57 pts of 272 degrees, which is better if we think it's supposed to be 270.

Anyway, my guess would be second degree polynomial for effectiveness to angle (or at least that this can reproduce the real thing with as much precision as one would care about).
« Last Edit: August 09, 2017, 09:58:42 am by Mic Qsenoch »
Logged

Drab Emordnilap

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1832
  • Shuffle iT Username: Drab Emordnilap
  • Luther Bell Hendricks V
  • Respect: +1886
    • View Profile
Re: Maths thread.
« Reply #911 on: August 09, 2017, 01:04:54 pm »
+1

I assume it's been checked that the 270 degrees displayed are accurate? I remember some Street Fighter type game where the last section of the players health bars were displayed incorrectly, such that the last ~10% of health points was squished down into the same length as the first ~5%, so that it looked like you were closer to death than you actually were.
Logged

Tables

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2816
  • Build more Bridges in the King's Court!
  • Respect: +3347
    • View Profile
Re: Maths thread.
« Reply #912 on: August 09, 2017, 01:28:32 pm »
0

That formula is exact as far as we know. I'll try that parabola out.

Edit: I'm not entirely sure what parabola you're referring to actually. Do you just mean the formula I gave? Because if so, that's pretty far off... so I presume you mean something else.

I assume it's been checked that the 270 degrees displayed are accurate? I remember some Street Fighter type game where the last section of the players health bars were displayed incorrectly, such that the last ~10% of health points was squished down into the same length as the first ~5%, so that it looked like you were closer to death than you actually were.

That's actually a really interesting possibility. I'm going to test that out now.

Edit: It's accurate.
« Last Edit: August 09, 2017, 01:44:47 pm by Tables »
Logged
...spin-offs are still better for all of the previously cited reasons.
But not strictly better, because the spinoff can have a different cost than the expansion.

Mic Qsenoch

  • 2015 DS Champion
  • *
  • Offline Offline
  • Posts: 1709
  • Respect: +4329
    • View Profile
Re: Maths thread.
« Reply #913 on: August 09, 2017, 02:43:23 pm »
+2

That formula is exact as far as we know. I'll try that parabola out.

Edit: I'm not entirely sure what parabola you're referring to actually. Do you just mean the formula I gave? Because if so, that's pretty far off... so I presume you mean something else.

I'll just try to clarify what I've done.

So you gave a function for what I am calling effectiveness, s (p is points): s(p) = [0.99p - (0.09p)^2]/30
This function has a maximum at 61.111..

If you use s(p) to convert the data you've given from points to effectiveness and then plot effectiveness vs the angle you can find a best-fit 2nd degree polynomial which relates effectiveness to angle. If I force the intercept to be 135 you get roughly:
a(s) = 73.62s^2 + 70.63s + 135
and it matches the pattern of the data quite well (R^2=0.9995), but doesn't seem to predict the upper end as well (not surprising as there's no data there), as it says 57 points should give an angle of ~280 degrees. If there were more data from the upper end, the best-fit polynomial could be improved for that region.

Since you said 57 is the highest skill point I just thought I'd try a different effectiveness function but with a maximum at 57 (otherwise it's basically the same function):
s(p) = (2/57)*p - (p/57)^2

Doing the same stuff as above gives (roughly):
a(s) = 73.29s^2 + 63.98s + 135
which again can reproduce the data you've provided just fine but does a little better at 57 points where it gives around 272 degrees. So that's why I wondered about your effectiveness formula.

You could always rewrite the functions for the angles in terms of points instead of effectiveness if you want a direct path, it's just some more complicated polynomial.

You can also just do a best-fit 4th degree polynomial for the points vs angles data and just forget about the effectiveness:
(2.96405E-05)*p^4 - (3.87428E-03)*p^3 + (1.35901E-01)*p^2 + (1.71140E+00)*p + 1.35000E+02
this also gives ~270 for the 57 point angle.
« Last Edit: August 09, 2017, 02:51:39 pm by Mic Qsenoch »
Logged

Tables

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2816
  • Build more Bridges in the King's Court!
  • Respect: +3347
    • View Profile
Re: Maths thread.
« Reply #914 on: August 09, 2017, 03:27:20 pm »
0

I see what you mean now. How did you get those formulae? Just shoving the points into a program? Mostly I'd like to know so I can do it myself, after adding a few extra points. That final formula seems pretty good, even predicts a few extra points I've been checking roughly correctly. But It does make me wonder what the actual formula they used was, since this seem overly complex.

Regarding the effectiveness formula, it's possible they did something like you said, in general actually - I'd have no real way of checking that since the differences are so slight, short of getting some perfect gear to test values in the 45+ range, and the max multiplier could easily change things so the difference is largely imperceptible.

Anyway, I checked everything over again, from the start. Gathered every single possible value I can - they're all up in raw at https://twitter.com/TablesUploads - the special meter is the bar on the top right of each screenshot, should be obvious. Here is how I measured them - I haven't measured all of them, mind. And here's a list of all the angles in that final screenshot:

0 pts = 135
3 pts = 141.5
6 pts = 149
10 pts = 163
13 pts = 173
15 pts = 180 (not in the screenshot but I checked it)
16 pts = 183
20 pts = 196
23 pts = 206.5
26 pts = 215
30 pts = 227
33 pts = 234

All of these should be accurate to the nearest degree, I think. There's a little inaccuracy in that it's not great resolution.
Logged
...spin-offs are still better for all of the previously cited reasons.
But not strictly better, because the spinoff can have a different cost than the expansion.

Mic Qsenoch

  • 2015 DS Champion
  • *
  • Offline Offline
  • Posts: 1709
  • Respect: +4329
    • View Profile
Re: Maths thread.
« Reply #915 on: August 09, 2017, 03:36:10 pm »
+1

I just use Excel to do the best-fit stuff.
Logged

Tables

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2816
  • Build more Bridges in the King's Court!
  • Respect: +3347
    • View Profile
Re: Maths thread.
« Reply #916 on: August 09, 2017, 03:46:56 pm »
0

Hm, I see. What function is it?
Logged
...spin-offs are still better for all of the previously cited reasons.
But not strictly better, because the spinoff can have a different cost than the expansion.

Mic Qsenoch

  • 2015 DS Champion
  • *
  • Offline Offline
  • Posts: 1709
  • Respect: +4329
    • View Profile
Re: Maths thread.
« Reply #917 on: August 09, 2017, 03:50:32 pm »
+1

Hm, I see. What function is it?

I usually put in a scatter chart and then right click the points and add trendline just so I can see the picture, there are also formulas you can put in cells but I don't know them off the top of my head (I'm not any good with Excel), presumably there are a billion websites that will explain it.
Logged

Kirian

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 7096
  • Shuffle iT Username: Kirian
  • An Unbalanced Equation
  • Respect: +9411
    • View Profile
Re: Maths thread.
« Reply #918 on: August 09, 2017, 04:48:52 pm »
0

All this math ability and you guys can't use freaking Excel?  How did you get through science classes?
Logged
Kirian's Law of f.DS jokes:  Any sufficiently unexplained joke is indistinguishable from serious conversation.

Kirian

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 7096
  • Shuffle iT Username: Kirian
  • An Unbalanced Equation
  • Respect: +9411
    • View Profile
Re: Maths thread.
« Reply #919 on: August 09, 2017, 04:52:06 pm »
0

Excel gives the formula as 3.129(P) + 132.74

It's not a perfect fit, but it has R^2 = 0.9982, and I have my doubts Nintendo would fit things to a third-order polynomial.
Logged
Kirian's Law of f.DS jokes:  Any sufficiently unexplained joke is indistinguishable from serious conversation.

Kirian

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 7096
  • Shuffle iT Username: Kirian
  • An Unbalanced Equation
  • Respect: +9411
    • View Profile
Re: Maths thread.
« Reply #920 on: August 09, 2017, 04:55:48 pm »
0

Excel gives the formula as 3.129(P) + 132.74

It's not a perfect fit, but it has R^2 = 0.9982, and I have my doubts Nintendo would fit things to a third-order polynomial.

And 135 + 3P is almost as close a fit, and given that you likely have a +- 2° error in your measurements, I'm gonna go with that.  3° per skill point.

Which now that I look more closely is exactly what you posted above.
« Last Edit: August 09, 2017, 04:56:55 pm by Kirian »
Logged
Kirian's Law of f.DS jokes:  Any sufficiently unexplained joke is indistinguishable from serious conversation.

Tables

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2816
  • Build more Bridges in the King's Court!
  • Respect: +3347
    • View Profile
Re: Maths thread.
« Reply #921 on: August 09, 2017, 06:49:09 pm »
0

Hm, I see. What function is it?

I usually put in a scatter chart and then right click the points and add trendline just so I can see the picture, there are also formulas you can put in cells but I don't know them off the top of my head (I'm not any good with Excel), presumably there are a billion websites that will explain it.

Ah right. Yeah, I've been doing that for a while, but was mostly getting imprecise values from the formula (like it would round the displayed trendline to 1sf for the 4th order and higher term) so was thinking you'd done something clever to get a greater degree of accuracy. I should just mess around with the settings on there a bit.

Edit: That's all it was, sigh. Missed the obvious of just changing the trendline settings
« Last Edit: August 09, 2017, 06:50:34 pm by Tables »
Logged
...spin-offs are still better for all of the previously cited reasons.
But not strictly better, because the spinoff can have a different cost than the expansion.

Tables

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2816
  • Build more Bridges in the King's Court!
  • Respect: +3347
    • View Profile
Re: Maths thread.
« Reply #922 on: August 09, 2017, 07:01:54 pm »
0

Excel gives the formula as 3.129(P) + 132.74

It's not a perfect fit, but it has R^2 = 0.9982, and I have my doubts Nintendo would fit things to a third-order polynomial.

And 135 + 3P is almost as close a fit, and given that you likely have a +- 2° error in your measurements, I'm gonna go with that.  3° per skill point.

Which now that I look more closely is exactly what you posted above.

My later measurements I'm much more confident in the accuracy of, and it really doesn't fit for quite a few points. It's up to 4 degrees off for e.g. the 6 points result. There's a little error in measurement here, but 4 degrees seems a little excessive - it's very easy to notice something being that far off.

I'm beginning to wonder if they're using the linear formula as a base with some kind of fudging term in there, though. Don't know why they'd do that, but... maybe.
Logged
...spin-offs are still better for all of the previously cited reasons.
But not strictly better, because the spinoff can have a different cost than the expansion.

Tables

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2816
  • Build more Bridges in the King's Court!
  • Respect: +3347
    • View Profile
Re: Maths thread.
« Reply #923 on: August 09, 2017, 07:16:43 pm »
0

I think I'm probably gonna leave it for now, as an approximate formula. That will do.
Logged
...spin-offs are still better for all of the previously cited reasons.
But not strictly better, because the spinoff can have a different cost than the expansion.

Kirian

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 7096
  • Shuffle iT Username: Kirian
  • An Unbalanced Equation
  • Respect: +9411
    • View Profile
Re: Maths thread.
« Reply #924 on: August 10, 2017, 01:30:54 pm »
0

Excel gives the formula as 3.129(P) + 132.74

It's not a perfect fit, but it has R^2 = 0.9982, and I have my doubts Nintendo would fit things to a third-order polynomial.

And 135 + 3P is almost as close a fit, and given that you likely have a +- 2° error in your measurements, I'm gonna go with that.  3° per skill point.

Which now that I look more closely is exactly what you posted above.

My later measurements I'm much more confident in the accuracy of, and it really doesn't fit for quite a few points. It's up to 4 degrees off for e.g. the 6 points result. There's a little error in measurement here, but 4 degrees seems a little excessive - it's very easy to notice something being that far off.

Eh, I just pulled the image for 6 points into Illustrator, put it into a polar grid the best I could, and got 150, maybe 151.  Protractors have major measurement error, especially because here there's no easily defined center.  Maybe, maybe if we printed it out and used a straightedge to define the center and used the protractor on paper.
Logged
Kirian's Law of f.DS jokes:  Any sufficiently unexplained joke is indistinguishable from serious conversation.
Pages: 1 ... 35 36 [37] 38 39 ... 47  All
 

Page created in 0.06 seconds with 21 queries.