Profile: gbrayut

Member since: 25 December 2008
Sheets uploaded: 7

Texas Holdem hand evaluator

This spreadsheet can be used to evaluate a player's Texas Holdem hand and show which hand types would beat you.

It uses a .NET library to evaluate and score a players hand and compute the hand value (ie.. Full house, 6s full of 2s). There is a grid of potential opponent pocket hands, which holds the 169 possible types of starting hands. Each cell in the grid contains a list of pocket hands for that group (stored as a 52 digit binary mask) and the Invalid/Win/Tie/Lose information for that group. Groups of hands that beat you will appear as red cells, Tie hands will appear as yellow, and hands that you beat will be white.

In this version you must enter a full 7 card hand (two pocket cards, full flop, turn and river). The next version will include support for partial hands and use a monte carlo simulation to evaluate which hands have the most potential.

23 January 2009. Tagged with competition, poker, texas-holdem

Texas Holdem Monte Carlo Simulator

This spreadsheet can be used to evaluate a player's Texas Holdem hand and show which other hands would beat you using a Monte Carlo simulation. It can calculate odds on the flop, turn or river, and will display pre-calculated odds for pre-flop hands. It also includes a built in help system.

The spreadsheet uses a .NET library to evaluate and score a players hand and compute the hand value (ie.. Full house, 6s full of 2s). There is a grid of potential opponent pocket hands, which holds the 169 possible types of starting hands. Each cell in the grid contains a list of pocket hands for that group (stored as a list of 52 digit binary masks) and the Invalid/Win/Tie/Lose information for that group. Groups of hands with a high percent chance to win will appear as red cells, where as hands with a lower percent chance to win will appear in gray or white.

New Features:
-Built in help system to outline how the spreadsheet is used
-Support for partial hands using Monte Carlo simulation
-Displays High Win percentages as shades of red
-Displays Moderate Win percentages as shades of gray
-Displays low win percentages as white cells
-Uses cached worksheet to store initial hands and pre-flop win percentages that are pre-calculated
-Automatically recalculates odds after changing cards
-Uses separate files for each user code section, as well as a single CachedCodeModule file for cached code. This allows for use of a full IronPython IDE during development

Performance:
-Currently is set to run 300 tests per cell on the flop or 100 test per cell on the turn.
-Total hand evaluations on the flop: 350,000

24 April 2009. Tagged with competition, games, monte-carlo, poker, texas-holdem, Web-Browser, winner

Texas Holdem Poker Worksheet Version 2

I have had a few people ask about how to modify the last poker spreadsheet for different purposes, such as analyzing the outcome for specific hand groups or being able to include multiple hands in the player’s pocket card set. The original spreadsheet was designed to show the hands in a specific layout so it is not very easy to customize. Also the original was broken down into multiple files, which made it difficult to read through all the code.

Instead I made a new self-contained spreadsheet that uses a standard column layout and lets you enter hands using the Hand Query language that is integrated into the C# HandEvaluator library. This new spreadsheet lets you customize the opponent hands and allows you to define multiple hands for the player (ie: What would my odds be if I had AK offsuit or AQ offsuit?). It also lets you specify the number of trials to run for each Monte Carlo simulation and is smart enough to enumerate the cards if you specify more trials than it would take to go through all possible board cards.

This version uses a function to calculate the odds, but you could probably still use it in a external RunWorkbook call if you wanted. I would like to add multi-threading and a hand win-type breakdown table, but that will have to wait for another day. Click the link blow for more info and other poker related projects.

06 October 2009. Tagged with games, monte-carlo, poker, texas-holdem

Pivot Chart, Pivot Table, and Auto filter

Pivot Charts, Pivot Tables and Auto filter are three tools that help users analyze spreadsheet data. Resolver One currently does not include these 3 features, but since it is based on the IronPython programming language the data can easily be exported to another system for analysis.

This example shows how to create a spreadsheet using a complex business object (System.DateTime) and then use Microsoft .NET COM Automation to export the data into a Microsoft Excel workbook for analysis.

This shows how Resolver One can be used to easily extract data from complex business objects and quickly build an easy to maintain spreadsheet. It then shows how the data can be automatically transfered into another application for analysis and reporting.

09 June 2009. Tagged with Auto filter, Data Analysis, excel, Pivot Chart, Pivot Table

Resolver One and WatiN - Web page automation and testing

This is a simple example of how to use the new WatiN 2.0 library in Resolver One. WatiN can be used to automate testing of webpages in Internet Explorer, and version 2.0 has partial support for Google Chrome and Firefox.

You basically use WatiN to create a script of what you want to do on a webpage (ie: click, type, browse to...). This example takes a list of search terms and compares how many results are provided by Google, Bing, and Yahoo.

This is a simple task, but WatiN can be used for much more advanced automation on complex sites even including AJAX webpages. For a more complex example, see the link below for an IronPython script that downloads a list of incoming and outgoing call data from the Vonage website.

NOTE: if you are using Windows Vista with IE7, you will need to uncheck the "Enable Protected Mode" box for the Internet Zone on the Security tab of Internet Options before Watin will work. Otherwise, IE7 will open two windows (one blank, and one for Google) and then give a timeout error. Temporarily disabling Protection Mode and then restarting the browser will allow the sample to run. This error does not occur in IE8 or on Windows XP. See link below for more information.

30 June 2009. Tagged with automation, testing, WatiN

Resolver One and WPF Chart example

This file shows an example of how to use Windows Presentation Foundation to create an interactive chart for data pulled from a Resolver Spreadsheet. The example uses the WPF chart built by Li Gao that was designed to look like the charts from the Google Finance website.

This is a beta version of the chart, but shows how to add a WPF control to a Windows Form program using the ElementHost object. The WPF chart could use a bit of work, but should be a good basis for any customized chart that you wish to make.

See the link below for Screenshots and more details.

01 July 2009. Tagged with chart, finance, WPF

Mad Lib using SpeechSynthesizer

This example uses the System.Speech.Synthesis.SpeechSynthesizer class that is part of the V3.5 of the .NET Framework to create a Mad Lib that will talk back to you. It was really fun to make!

Enjoy!

09 July 2009. Tagged with Funny, game, Mad Lib, Speech Synthesis

<< Resolver Exchange