Bulding a simple spreadsheet

For this intro article, I'll assume you know very little about Excel.

Say you want to figure out what your strategy is with suited connectors, for example JsTs, in the small blind. The first you might want to know is, what are your chances to end up with the best hand, after the river, against random hands? You would do this with the "simulate" function. You compute this by select 3 cells horizontally (e.g. E3:G3), and entering the following formula:

=simulate("JsTs", , , 2, 100000)

VERY IMPORTANT: when you are done entering the formula, instead of simply hitting enter, you should hit Control-Shift-Enter. Always do this when your formula returns more than one cell.

This means, you start with JsTs, against 2 unknown players, and you simulate 100000 hands. The spaces between the commas mean you aren't specifying burned cards or community cards. The result is:

40886 2630 100000

Meaning, 40886 wins, 2630 draws, and 100000 total hands, i.e. you win 40.886% of the time. You can compute that explicitly by entering the formula:

=E3/G3

in cell H3. Then, to make things easier, say you enter "JsTs" in cell B3 (without the quotes). Then you can change your formula to be:

=simulate(B3, , , 2, 100000)

But lets say you want to know your percentages against all numbers of random hands. You would do that by entering the numbers 1 through 9 in a column, say in cells D3:D11. The you can adjust your formula to be:

=simulate($B$3, , , D3, 100000)

Here you might notice that I have added $ signs to the starting hand reference. This is an Excel thing, which means when we copy around the formula (which we will do in a minute), the formula keeps refering to the same cell. It's called making a reference absolute. Now you select the formula above, together with the percentage calculation, i.e. cells E3:H3. This can be done either with the mouse or with by going to cell E3, holding the shift key down, and hitting the right arrow button 3 times. Then you copy the formula (let go of the shift key first), either by hitting Control-C, or right-clicking the mouse in the formula you just selected, and choosing "Copy" from the drop-down menu. Now the formula you want to copy is ready to be copied. You need to specify where to copy it. This is done by going to cell E4, and selecting down to cell E11 (again, either with the mouse or by using the shift key and arrow keys). Now the last thing you need to do is paste the formula. My preferred approach is to use the keyboard shortcuts, which in this case is Control-V. Or you can use the mouse and right-click the area you just selected, and hitting the "Paste" option in the drop-down menu. Voila! You now have the winning percentages for JsTs against 1 to 9 random players. Now, if you want to calculate your odds for other starting hands, all you need to do is change cell B3, and that's it. Keep in mind, if you have calculation set to manual, you will need to hit Shift-F9 for the sheet to recompute after you change the inputs.

So that's one thing you can do. Another thing is the standard, hands for several players, burned cards, community cards. If, for example, you wanted to know how our previous hand, JsTs, fares agains AdKc and KhQd, you have a few ways of doing that. The most straightforward is to select a range of 3 rows and 3 columns, say cells C14:E16, and enter the following formula:

=enumerate("JsTs AdKc KhQd")

and again hit Control-Shift-Enter. The first row is the results for JsTs, the second for AdKc and the third for KhQd. It might be easier to enter the hands in different cells, for two reasons. First, you'll be able to see more easily which hand belongs to which row, and second, you won't need to edit the formula, you can just change the cell with the hand you want to edit. So in cells B14, B15 and B16, enter JsTs, AdKc, and KhQd. Then change the formula in C14:E16 to be:

=enumerate(B14:B16)

Here is another thing you can do. Go to one of the cells in the formula, and hit Shift-F3. This brings up a little window which shows you all the possible inputs to the function. Here you can see that the function enumerate can also take arguments for burned and community cards. You can add those in this window, either by entering the cards directly, separated by spaces, or by refering to cells contining those cards. That will be left as an exercises to the proverbial reader. Or you can refer to the spreadsheets I have up.

Here is what the result of all the above looks like:

How do suited connectors stack up?
Hope this was helpful. If you have more questions, get in touch with me!


Copyright Pokeracle Inc. 2007