My wife has recently taken up watching baseball. I enjoy a good game, but every night, gets kind of repetitive. So I tried to liven it up by considering how to apply a lecture I saw on non-linear optimization for the pitcher vs the batter.
(google search for "non-linear optimization video", chose the one that says lecture and Gilbert Strang, or link if it's ok to post: http://videolectures.net/mit18085f07_strang_lec32/)
The lecture comes down to game theory, where 2 players can make 2 choices at once, and where their 2 choices match is the payout. It works out to a 2x2 matrix (hope this lines up):
player A
left..............right
......4......|......2.......up player B (this should be on the left, but on the right cuz easier to line up)
......1......|......7......down
Ex, so, if A chooses "left", and B chooses "down", B has to pay out 1. If B thinks A will choose "right", B should choose "up", only pays out 2. Or if A thinks B will choose "up", A should choose "left", to get 4.
Then, the game is, A and B choose randomly with a percentage split; A might choose "left" 20% of the time, and "right" 80% of the time, and B might choose "up" 65% of the time, and "down" 35% of the time. The expected payout becomes:
[vector of A percentages]^-T * [payout matrix] * [vector of B percentages]
(-T to transpose A's vector so the vectors and matrices can multiply together)
I was trying to present this to my wife to help her understand the strategy between the pitcher and the batter: the pitcher can choose to throw the ball inside or outside the box, and the batter can choose to swing or not. The pitcher's strategy is to trick the batter -- throw a few balls in a row, so the batter is not expecting the good pitch and so does not swing and misses it; or, throw a good one, then an outside ball to get the batter to swing with a higher probability of missing it. The batter's strategy is not to swing at outside balls, so the pitcher has to get it closer inside, or to get a walk, or show he's not tricked; or swing to try to hit a good pitch.
(In all truth, I don't know if this model is true, the most I ever played was in high school PE, on the nerd team)
I was wondering what the payout matrix in this case would be. I suppose it would be "hit" vs "strike", or "base" vs "out". Is it possible to reduce the batter vs pitcher to a 2x2 matrix, or is it too simplified, requiring a couple more matrices?
This is what I was thinking so far, but looks like it needs some work:
pitcher
throw in..........................throw out
strike (-1) or hit (1)....|....strike (-1)....swing batter
strike (-1).................|........ball (1)....hold
I've used 1 and -1, they seemed useful to eventually get a numerical value for the payout. Must be wrong for "throw in" - "swing" -- surely a cell should not have 2 possibilities. Also, "throw out" - "swing" would have 2 possibilities, probably a strike but sometimes could be a hit.
Any suggestions how this payout matrix should look? thanks
(google search for "non-linear optimization video", chose the one that says lecture and Gilbert Strang, or link if it's ok to post: http://videolectures.net/mit18085f07_strang_lec32/)
The lecture comes down to game theory, where 2 players can make 2 choices at once, and where their 2 choices match is the payout. It works out to a 2x2 matrix (hope this lines up):
player A
left..............right
......4......|......2.......up player B (this should be on the left, but on the right cuz easier to line up)
......1......|......7......down
Ex, so, if A chooses "left", and B chooses "down", B has to pay out 1. If B thinks A will choose "right", B should choose "up", only pays out 2. Or if A thinks B will choose "up", A should choose "left", to get 4.
Then, the game is, A and B choose randomly with a percentage split; A might choose "left" 20% of the time, and "right" 80% of the time, and B might choose "up" 65% of the time, and "down" 35% of the time. The expected payout becomes:
[vector of A percentages]^-T * [payout matrix] * [vector of B percentages]
(-T to transpose A's vector so the vectors and matrices can multiply together)
I was trying to present this to my wife to help her understand the strategy between the pitcher and the batter: the pitcher can choose to throw the ball inside or outside the box, and the batter can choose to swing or not. The pitcher's strategy is to trick the batter -- throw a few balls in a row, so the batter is not expecting the good pitch and so does not swing and misses it; or, throw a good one, then an outside ball to get the batter to swing with a higher probability of missing it. The batter's strategy is not to swing at outside balls, so the pitcher has to get it closer inside, or to get a walk, or show he's not tricked; or swing to try to hit a good pitch.
(In all truth, I don't know if this model is true, the most I ever played was in high school PE, on the nerd team)
I was wondering what the payout matrix in this case would be. I suppose it would be "hit" vs "strike", or "base" vs "out". Is it possible to reduce the batter vs pitcher to a 2x2 matrix, or is it too simplified, requiring a couple more matrices?
This is what I was thinking so far, but looks like it needs some work:
pitcher
throw in..........................throw out
strike (-1) or hit (1)....|....strike (-1)....swing batter
strike (-1).................|........ball (1)....hold
I've used 1 and -1, they seemed useful to eventually get a numerical value for the payout. Must be wrong for "throw in" - "swing" -- surely a cell should not have 2 possibilities. Also, "throw out" - "swing" would have 2 possibilities, probably a strike but sometimes could be a hit.
Any suggestions how this payout matrix should look? thanks