- make a podcast playlist on itunes
- create a smart playlist from your musics tab as follows (I called mine "New Podcasts")
- you probably want to configure the podcast settings so that you only keep the most recent episode (otherwise say for NPR hourly podcasts, your playlist will include multiple podcasts from NPR hourly)
- create an application with automator
- create a new application and save it somewhere
- search for itunes and put "get specified itunes times" into the right side (then add your playlist u just made)
- search for itunes and put "play itunes playlist" into the right side
- this is how it should look at the end.

- system preferences -> users & groups -> login items: add your automator application to get it to run on login
- to get computer to automatically turn on, system preferences -> energy saver -> schedule -> startup/wakeup every day at xyz time
- go to calendar and add repeating items for daily/hourly runs
- create a new event, make it repeat
- go to the alerts -> custom -> open file. and instead of opening calendar, open the application
- to automatically download/get the most recent podcasts, the easiest would probably be to write an applescript, then export it as an application (and then schedule to run it right before your podcast alarm)

Monday, April 28, 2014
Setting up podcast alarms for your mac
Quick notes on how to configure your mac so that you can wake up to podcasts/get podcasts to play every hr etc.
Saturday, September 14, 2013
Poker: running cards multiple times
Consider the following a quick exercise in combinatorics. We are investigating the effects of running cards twice. You can see a real life example here. It is known that the EV doesn't change when you run multiple times (but you lower your variance). Let us check this claim.
Let's take the case of KK vs AA allin after a blank flop. After the flop, there are 45 cards left. If we run it once:
EV for KK = Pr(K on turn and no A on river) + Pr(no A on turn and K on river) + Pr(K's on turn and river) = 2/45 * 41/44 + 41/45 * 2/44 + 2/45 * 1/44 = 8.383838...%
Notice that the first two terms are the same because turn/river is interchangeable. Double checking this on pokerstove and using a flop with 0 chances of runner runner flush/straights, we get 8.384%. Nice. Exact.
Let's say we run it the second time. A couple possibilities in the first run:
Let's take the case of KK vs AA allin after a blank flop. After the flop, there are 45 cards left. If we run it once:
EV for KK = Pr(K on turn and no A on river) + Pr(no A on turn and K on river) + Pr(K's on turn and river) = 2/45 * 41/44 + 41/45 * 2/44 + 2/45 * 1/44 = 8.383838...%
Notice that the first two terms are the same because turn/river is interchangeable. Double checking this on pokerstove and using a flop with 0 chances of runner runner flush/straights, we get 8.384%. Nice. Exact.
Let's say we run it the second time. A couple possibilities in the first run:
- one A came out (2/45 * 41/44 * 2 = 8.2828%)
- then EV for second run is 2/43 * 40/42 * 2 + 2/43 * 1/42 = 8.9701%
- two A's came out (2/45 * 1/44 = 0.1010%)
- then EV for second run is 2/43 * 2 - 2/43 * 1/42 == 2/43 * 41/42 * 2 + 2/43*1/42 == 9.1915%
- one K and one A came out (2/45 * 2/44 *2 = 0.4040%)
- then EV for second run is 1/43 * 41/42 * 2 = 4.5404%
- one K came out and no A's came out (2/45 * 41/44 *2 = 8.2828%)
- then EV for second run is 1/43 * 40/42 * 2 = 4.4297%
- two K's came out (2/45 * 1/44 = 0.1010%)
- then EV for second run is 0%
- no A/K came out (41/45 * 40/44 * 2 )
- then EV for second run is 2/43 * 39/42 * 2 + 2/43 * 1/42 = 8.7486%
The above EVs were also double checked with pokerstove using dead cards (A, K and blanks) and should be the exact probabilities. Adding these all up, the EV over all cases for the second run is 8.3838%- same as the first run.
Friday, August 30, 2013
Poker: Pot Odds 2
Some follow up thoughts on the first post about odds. To get the most precise numbers for your hand's equity/odds, you should compare pot odds with your hand's odds of hitting its outs.
So using the same scenario from the first post, the third/most precise method is as follows:
Method 3 == Pot Odds vs Odds of Hitting Outs
Pot odds == 1:5
Your hand has 8 outs. On the turn, there is 52 - 5 = 47 cards left. Your odds of hitting outs is 8 : (47-8) == 8:39 == 1:4.875
Since pot odds > odds of hitting outs, you should call.
So note that this is much more precise, and only deals with the turn card (ie. if you had read the second post about bet sizing, this assumes that you will bet optimally on the turn again and that effective stack size is large enough for optimal bet)
However, the disadvantage of pot odds is that when the probability is small, the odds change very rapidly to any small change in probability. ie. 1:49 vs 1:99 is actually only 1% apart. So whereas for equity calculation, you are "safe" if you have say a 5% buffer between required equity vs hand equity, here there is no similar rule and you might be easily mislead as to how much edge you have.
Let's look at what a 5% equity edge means for different pot odds.
Without the 5% buffer, the Required Hand Odds should equal pot odds. Instead, as you can see, 1:5 -> 1:3.6, while 1:1.5 -> 1:1.2. Hence there is no easy way to build in some buffer with pot odds. However, you may have noticed that the required outs actually increases by a constant (2.4 outs) when you build in a 5% buffer. This makes perfect sense- 2.4 outs --> an extra 5% chance of drawing out.
Thus the optimal way to give yourself a buffer is to calculate the odds as is, but then require a couple extra outs to be conservative.
Interestingly, if you look at the # of outs required for 1x pot and 2x pot bets on the flop, they are actually "ahead" (> 50% chance of drawing out by the river). So it seems as though any drawing hand that could call a > pot sized bet could also just raise or push all-in. More on this next.
So using the same scenario from the first post, the third/most precise method is as follows:
Method 3 == Pot Odds vs Odds of Hitting Outs
Pot odds == 1:5
Your hand has 8 outs. On the turn, there is 52 - 5 = 47 cards left. Your odds of hitting outs is 8 : (47-8) == 8:39 == 1:4.875
Since pot odds > odds of hitting outs, you should call.
So note that this is much more precise, and only deals with the turn card (ie. if you had read the second post about bet sizing, this assumes that you will bet optimally on the turn again and that effective stack size is large enough for optimal bet)
However, the disadvantage of pot odds is that when the probability is small, the odds change very rapidly to any small change in probability. ie. 1:49 vs 1:99 is actually only 1% apart. So whereas for equity calculation, you are "safe" if you have say a 5% buffer between required equity vs hand equity, here there is no similar rule and you might be easily mislead as to how much edge you have.
Let's look at what a 5% equity edge means for different pot odds.
| Bet Size | Pot Odds | Required # of Turn Outs Without Buffer | Equity + 5% Buffer | Required Hand Odds With Buffer | Required # of Turn Outs With Buffer |
|---|---|---|---|---|---|
| 1/4x pot | 1:5 | 7.8 | 21.7% | 1:3.6 | 10.2 |
| 1/2x pot | 1:3 | 11.8 | 30.0% | 1:2.3 | 14.2 |
| 1x pot | 1:2 | 15.7 | 38.3% | 1:1.6 | 18.1 |
| 2x pot | 1:1.5 | 18.8 | 45% | 1:1.2 | 21.4 |
Without the 5% buffer, the Required Hand Odds should equal pot odds. Instead, as you can see, 1:5 -> 1:3.6, while 1:1.5 -> 1:1.2. Hence there is no easy way to build in some buffer with pot odds. However, you may have noticed that the required outs actually increases by a constant (2.4 outs) when you build in a 5% buffer. This makes perfect sense- 2.4 outs --> an extra 5% chance of drawing out.
Thus the optimal way to give yourself a buffer is to calculate the odds as is, but then require a couple extra outs to be conservative.
Interestingly, if you look at the # of outs required for 1x pot and 2x pot bets on the flop, they are actually "ahead" (> 50% chance of drawing out by the river). So it seems as though any drawing hand that could call a > pot sized bet could also just raise or push all-in. More on this next.
Wednesday, August 28, 2013
Poker: Bet Sizing
Following the last introductory post to poker, here is an example on how to determine bet sizing based on the texture of the flop.
Let's say effective stack size is 200 BB, we are in button/cutoff, it was limp/folded to us, and we raised to 4-6 BB and one player called. So the pot is ~10 BB (8.5-13.5 BB depending on dead money/size of raise) and effective stack size is 195 BB.
Let's say the flop comes with two flush cards (two cards of same suit) and you have top pair top kicker and you are committed to calling the all-in even if the another flush card comes because you have a weird hunch/you are tilting etc. Let's look at what you need to bet taking into account the implied pot to push a flush draw opponent out of the pot.
The flush draw opponent has 36% equity -> you want to lay 1.8:1 odds for optimal play -> with an implied pot of 10 BB + 195BB, that is a bet of 205/1.8 = 114 BB. This sounds ridiculously huge and incorrect. There are two reasons for this.
How much you would typically/normally commit with top pair top kicker
Generally, with top pair or worse, you want to control the pot to be medium sized. Let's look at what that means for the flop/turn/river betting rounds:
From these rough estimates, it seems that we should be willing to commit another 35-40 BB to this 10 BB pot. Let's say that the implied pot size is 10 + 35 BB. Then the optimal bet is 25BB, or 2.5x the pre-money pot. This certainly seems more reasonable but from what we know empirically about poker betting, it still seems to be on the high end. Let's move on to consider the fact that there can still be betting on the turn/river.
Betting on the turn
From the conclusion of last post, remember that by betting optimally against a dog, each time you bet, you are effectively causing them to loose money equivalent to them folding to the bet in the long run. I would thus make the following statement:
By betting optimally on the turn, it is as though we have cut off the opponent's chances to draw on the river. ie. it is as though the opponent loses the pot right here on the turn.
Now, we can see that perhaps our opponent doesn't have 36% equity, since after they see one card on the turn, we can bet again, which is equivalent to cutting them out right there. So they have 9 outs out of 47 possible turn cards. So we could lay 38:9 ~= 4.2:1 odds to price them out. With a 45BB implied pot, this means betting 10.7 BB ~= 1.1x the pre-money pot. This is more inline with what we know as "normal" betting.
What is interesting is that if you follow this line of reasoning/betting on the flop, you are committed to betting the turn 100% of the time if no flush cards come out- otherwise you are actually giving your opponent 36% equity and good odds to call on the flop.
So it turns out that maybe our flop bet sizing could vary depending on our game plan on the turn.
As a matter of exercise, let's look at what our proper bet on the turn is. Let's say we just bet another 1x pot on the flop- so the turn pot is 30BB (and we are ready to commit another 25-30BB). What is the optimal bet on the turn if no flush cards come? They have 9 outs out of 46 river cards, so we lay 37:9 ~= 4.1:1 odds. With an implied pot of 60BB, this means that betting 15xBB = 1/2 the pre-money pot.
So either you bet [1.1x pot on flop AND 0.5x pot on turn], or maybe you need to overbet on the flop by betting (at most?) 2.5x pot if you intend to (sometimes? check the turn.
Let's say effective stack size is 200 BB, we are in button/cutoff, it was limp/folded to us, and we raised to 4-6 BB and one player called. So the pot is ~10 BB (8.5-13.5 BB depending on dead money/size of raise) and effective stack size is 195 BB.
Let's say the flop comes with two flush cards (two cards of same suit) and you have top pair top kicker and you are committed to calling the all-in even if the another flush card comes because you have a weird hunch/you are tilting etc. Let's look at what you need to bet taking into account the implied pot to push a flush draw opponent out of the pot.
The flush draw opponent has 36% equity -> you want to lay 1.8:1 odds for optimal play -> with an implied pot of 10 BB + 195BB, that is a bet of 205/1.8 = 114 BB. This sounds ridiculously huge and incorrect. There are two reasons for this.
- Being willing to commit 200 BB on a flush board with top pair is an incorrect play.
- The existence of a turn bet means that the true "correct bet" amt is much lower.
How much you would typically/normally commit with top pair top kicker
Generally, with top pair or worse, you want to control the pot to be medium sized. Let's look at what that means for the flop/turn/river betting rounds:
- if betting sizes were pot sized, I would say two bets would already be really pushing it. (ie. you would control the size by either bet/check/bet or bet/bet/check etc). In this case the pot would be 90 BB by showdown and you and your opponent would have each put in another 40 BB.
- if betting sizes were 1/2 pot, it is probably feasible to bet on all three rounds. In this case the pot would just be 80 BB (35BB each since flop). But betting like this might be stupid with the flush draw on the board.
From these rough estimates, it seems that we should be willing to commit another 35-40 BB to this 10 BB pot. Let's say that the implied pot size is 10 + 35 BB. Then the optimal bet is 25BB, or 2.5x the pre-money pot. This certainly seems more reasonable but from what we know empirically about poker betting, it still seems to be on the high end. Let's move on to consider the fact that there can still be betting on the turn/river.
Betting on the turn
From the conclusion of last post, remember that by betting optimally against a dog, each time you bet, you are effectively causing them to loose money equivalent to them folding to the bet in the long run. I would thus make the following statement:
By betting optimally on the turn, it is as though we have cut off the opponent's chances to draw on the river. ie. it is as though the opponent loses the pot right here on the turn.
Now, we can see that perhaps our opponent doesn't have 36% equity, since after they see one card on the turn, we can bet again, which is equivalent to cutting them out right there. So they have 9 outs out of 47 possible turn cards. So we could lay 38:9 ~= 4.2:1 odds to price them out. With a 45BB implied pot, this means betting 10.7 BB ~= 1.1x the pre-money pot. This is more inline with what we know as "normal" betting.
What is interesting is that if you follow this line of reasoning/betting on the flop, you are committed to betting the turn 100% of the time if no flush cards come out- otherwise you are actually giving your opponent 36% equity and good odds to call on the flop.
So it turns out that maybe our flop bet sizing could vary depending on our game plan on the turn.
As a matter of exercise, let's look at what our proper bet on the turn is. Let's say we just bet another 1x pot on the flop- so the turn pot is 30BB (and we are ready to commit another 25-30BB). What is the optimal bet on the turn if no flush cards come? They have 9 outs out of 46 river cards, so we lay 37:9 ~= 4.1:1 odds. With an implied pot of 60BB, this means that betting 15xBB = 1/2 the pre-money pot.
So either you bet [1.1x pot on flop AND 0.5x pot on turn], or maybe you need to overbet on the flop by betting (at most?) 2.5x pot if you intend to (sometimes? check the turn.
Friday, August 23, 2013
Poker: Intro to Pot Odds
Here's some useful background for anyone interested in poker. Frequently, when someone bets into you, and you are chasing a draw, you need to decide if you want to call or not. Below, we look at a couple ways to think about this.
Before we start, one important definition to get out of the way. The term equity/pot equity may be confusingly used to refer to a % of the pot or an actual $ amount. I will use %equity and $equity to differentiate between these. Both %equity and $equity look at what would happen on average if your hand was taken to show down without any further betting.
Before we start, one important definition to get out of the way. The term equity/pot equity may be confusingly used to refer to a % of the pot or an actual $ amount. I will use %equity and $equity to differentiate between these. Both %equity and $equity look at what would happen on average if your hand was taken to show down without any further betting.
Take an example on the turn where the pot is $100. then the opponent bets $25 into pot. We need to decide if we call or not.
Simple Pot Odds
We are doing the analysis below with the assumption that opponent is all-in (or that there is no more betting on the river). Intuitively, we might already think that it is cheap to call (we can call because the bet was small)- let's see what the math says:
Simple Pot Odds
We are doing the analysis below with the assumption that opponent is all-in (or that there is no more betting on the river). Intuitively, we might already think that it is cheap to call (we can call because the bet was small)- let's see what the math says:
Method 1 == pot odds required probability vs %equity
Pot Odds
- the opponent just bet 1/4 of the pot.
- the pot odds that you are getting is 25:125 == 1:5
- ie. pot odds are post money (inclusive of bet)
- from the pot odds, the required equity (probability of winning) in order to call is 1/(5+1) = 1/6 = 17%
%Equity (== Your Hand's Actual Probability to Win)
- looking at your hand vs your opponent's range, what is your probability of winning?
- let's say you put your opponent on a pair or better and you just have a straight draw.
- you only win if u hit your draw (8 outs = 18% chance of hitting)
Now compare pot odds probability (17%) to your hand's probability to win (18%) and since hand probability > the probability required from pot odds, this is callable. (maybe in practice you might demand say a 5% buffer before saying it's callable?)
Method 2 == EV calculation
folding = $0
calling = 18% * 125 + 82% * (-25) = $2
so it's +EV to call. so call
Notice that here, you already take into acct the pot size (125) and the bet size (25).
Compare this to method 1 (the pot odds vs probability method) - the probability calculation doesn't take into acct the bet/pot ratio and that's why you need to compare pot odds to it in method 1.
I think in practice, method 1 is actually easier to work out over the board.
Compare this to method 1 (the pot odds vs probability method) - the probability calculation doesn't take into acct the bet/pot ratio and that's why you need to compare pot odds to it in method 1.
I think in practice, method 1 is actually easier to work out over the board.
Implied Pot Odds
Now let's say we were not allin (there is more betting on the river). Let's say there's another $50 behind in effective stack size after the call. it's actually very easy to do implied pot odds
25:(125+50) == 1:7
25:(125+50) == 1:7
that's it. required equity is 12.5%.
no chg with hand equity. so 12.5% vs 18% == much bigger reason to call/you have much more juice
no chg with hand equity. so 12.5% vs 18% == much bigger reason to call/you have much more juice
Looking at the EV method, this is 18% * 175 + 82% * (-25) = $11
Benefits of Offering the Correct Odds
On a side note, i think it is interesting to look at what the EV # means. One way to think about the expected value of your profit at each situation is your $equity - money put in. At each point of decision when you have to decide between raise/bet/call/check/fold, you are seeking to maximize your incremental profit.
Let's go through the scenario above where you and your opponent each put in $50 before the turn, and have $25 each left. At the beginning of the turn, your $equity is $18, so your accumulated profit since the start of the hand is $18 - $50 = -$32.
- if you could check it down (opponent hadn't bet) == you would get avg $18 from the pot of $100. Your incremental profit in this scenario is $0. Your accumulated profit since the start of the hand is still -$32.
- Opponent bets and you fold. You $equity dropped to $0 here from $18, and you also didn't put any more money in. So your incremental profit for choosing this option is -$18. Your accumulated profit is now -$32 - $18 = -$50.
- Opponent bets and you call $25 allin. You would get avg 18%*150 = $27 from the $150 pot. Your $equity increased from $18 to $27, but you also spent $25 calling. Your incremental profit = +$9 -$25 = -$16. Add this to your pre-calling accum profit of -$32 before to see that your post-calling accum profit is -$48.
Note that if you could, you would still much rather get option #1 than having to choose between #2 and #3. In option #3, your are choosing an action that has -EV (you lose another $16). However, choosing option #2 would have even worse consequences (-$18). All this is because your opponent had bet out at you when you had <50% in %equity. You either put in more chips being the underdog, or you fold- effectively losing your pot equity (the chance to draw out on the winner).
This has very interesting implications for when you are playing/betting optimally with the winning hand.
By making an optimal bet, you win exactly your opponent's $equity since they should be apathetic to folding.
Quick example to show this again: lets say your opponent still has 20% chance (one in five) to draw out on you in a $100 implied pre-money pot. Right now, your accum profit is 80 - 50 = $30. Optimally, you would lay 1:4 odds post-money, or 1/3 of the pre-money pot == $33. If we show that when you make this $33 bet, you are increasing your accum profit from $30 to $50, then we have shown a working example of the statement made above. It is obvious if opponent folds. If opponent calls, then your expected payoff is 80% * 166 = 133 and your cost is 50 + 33 = 83. Accum profit = 133 - 83 = 50.
Note that this optimal bet sizing is most important to get right when it comes to closer draws (ie. it matter less when you are 90/10 favorite already). I claim this because with a close draw (say 60/40), the opponent still has 40% equity in the pot, so betting correctly to win that 40% equity is likely to be hugely lucrative, vs winning the 10% equity is less so. This may be a reason for why we have more freedom to slow play with trips etc when we are already 90%+ favorites.
Subscribe to:
Comments (Atom)