ad rotator

Tuesday, November 15, 2011

A difficult NoteCaddy definition constructed

Most definitions are pretty easy to script.  Once in awhile, some can be a little bit tricky.  I recently was asked for advice on a particular scenario and thought it would make for a decent tutorial.

The idea was to make a note that shows the range with which someone cold calls pre flop and then raise/calls the flop.  The final factor being that this player must not be all in on the flop.

The first thing you should have when scripting a note definition is a sample hand.  You can find sample hands pretty easily by using Holdem Manager's filtering.  Also, when you're playing, you should probably constantly be looking for note-worthy actions.  This applies even if you write your own notes!

Anyways, let's look at the sample hand.  The person of interest here is the button

BB: $649.50
UTG: $146.00
MP: $420.00
CO: $819.70
BTN: $344.07
SB: $895.90

Pre Flop: ($6.00)
2 folds, CO raises to $12, BTN calls $12, 2 folds

Flop: ($30.00) 2 of clubs T of hearts 4 of hearts (2 players)
CO bets $22, BTN raises to $70.87, CO raises to $140, BTN calls $69.13

Turn: ($310.00) 7 of hearts (2 players)
CO bets $667.70 all in, BTN calls $192.07 all in

River: ($694.14) A of diamonds (2 players - 2 are all in)

Final Pot: $694.14
CO shows A of spades T of spades (two pairs, Aces and Tens)
BTN shows A of hearts 2 of hearts (a flush, Ace high)
CO wins $475.63
BTN wins $691.14

You see he cold calls pre flop then raise/calls the flop just as I had indicated.  This seems like it could be pretty straightforward until you realize that NoteCaddy doesn't have a raise/call post flop action (oops).  Let's start from the beginning.

The first thing we need to do is give the definition a name and description

For the name we just give it something descriptive.  The "description" field is where the real magic happens.  This is what will actually be written as a note.  In this instance, I am using a trick where I combine a regular variable with a range variable.  The difference between the two is that for a regular variable, a new note is taken for each different value.  In this instance $flopposition will produce either "IP" or "OOP".  In the end you'll have two different notes, one for in position and the other for out of position.  $flophandrange is going to give us a list of all the different hands he had.  This is primarily what we're looking for so we need to include that.  

Next we go to HUD options and choose "use CaddySpark".  We do this so that the range will be graphed out in our notes and we can much more quickly analyze the data.  For more details on this, please check out

Now it's time to model the player's actions.  Pre flop is pretty easy.
Here we just select the option for limp/call and the 3 options for cold calling.  The 3 on the bottom refer to calling different open raise sizes.  In most cases you'll pick all 3.  If you look at the top left of that screen, you'll see an option "all pre flop actions performed must be selected".  We will select this also.  What this accomplishes is that it prevents hands from being included where maybe a player cold called a raise and then called a squeeze (a 3 bet after a cold call) as well.  This is very different and we're not interested in that.

Now we move on to the flop actions.  As I had mentioned before, there is no raise/call option.  What we have to do is get creative here and use a flop previous action.  "Previous actions" exist for both pre flop and post flop.  They are actions that must occur prior to the last time the player last acts on that street.  So if we specify a definition where someone 3 bets, we may want to put a pre flop previous action that indicates that there was an open raise.  Usually this isn't necessary though as NoteCaddy understands that if there's a 3 bet, there had to be an open raise first.  However, if we wish to filter by certain things in regards to the open raiser himself (player type) then we identify him specifically in an open raise previous action.

In this case, we're simply going to use the previous action as a form of workaround.  Since there fails to exist a raise/call action, we use the fact that there had to be a bet/raise to go along with it.  If you look at the above hand again you'll see the flop action went bet/raise/raise/call.  I've highlighted what we'll include for the flop previous action.

We go to the flop->previous actions tab and create a previous action by giving it a description and clicking save.  Next we see a dizzying amount of options.  We'll skip past most of those and go directly to the "action" section at the bottom.

You'll see that is divided into subcategories.  The key here is that each subcategory is the first action the player took.  Since we're interested  in a bet/raise, we'll look at the "Bets" section.

Here you see I've selected the 3 bottom options.  These are bet/raises in the form x/y where x is the original bet size and y indicates that it could be a 3,4,5...n bet.  This is what we need so we pick only these 3.  Make sure everything else is unselected by first clicking the "unselect all" button towards the top of the "action" section.

Lastly, we need to make sure that we didn't get all in on the flop.  We do so by going to turn->general.  Look at the bottom left and see the option "player had to act on the turn".  Select that and we filter out any hands where players got all in earlier.

Now we click file->save (or CTRL+S) and we are ready to test.  As I said early on, the important thing is to have a hand history ready.  We'll click tools->test environment and copy/paste that hand in there.

Now we click the "run" button on the bottom.  You'll see on the left that all the players are listed.  We expand the button player and see a section called "notes".  Expand there and you'll see for all of your definitions, a reason why they didn't get the note, or the note itself.

I look at the button and I see:

Yay it worked!

No comments:

Post a Comment