10 sheets tagged with "competition":

Finite Difference Model

This spreadsheet was the winner of the first round of the Resolver One Spreadsheet Challenge, in January 2009.

It numerically solves Poisson partial differential equations (PDEs), and is set up to help you easily perform an electrostatic analysis of a microchip - something that would normally require software costing $20,000!

It could easily be adapted to do other analyses best performed with PDEs - for example, you could use it to work out seepage underneath a dam, or to solve thermodynamic problems, like heat conduction through a body.

To use it, download the ZIP file (using the button to the right), unpack it, and then load the file "finite_difference.rsl" into Resolver One. A simple model is loaded; click on the "Solve model" to perform the analysis. You can then graph the solution using the "Visualization" buttons below.

Two other models are provided as demonstrations in the "models" directory, which you can load up with the "Load Model" button. You can also create your own by populating the grid with appropriate numbers and clicking on the "Save Model" button.

20 January 2009. Tagged with competition, finite-difference, winner

Minesweeper!

It's just a good old-fashioned Minesweeper game. Click on a cell to check it for mines. If it's safe, you'll reveal the number of mines nearby. Click on a mine, and the game is over. You can choose the size of the board and the number of mines on it. For a new game, trigger a recalculation.

I couldn't figure out any way for the player to flag cells containing mines, so you'll have to settle for revealing all of the cells without mines.

I've tried to put as much of the game logic into the grid as possible. So the interface is with buttons, state is held in an object attached to each cell, and I make much use of cell ranges. This makes it a little slow, and buttons don't allow for much formatting - but this is a spreadsheet, not a games platform ;)

22 January 2009. Tagged with competition, game, minesweeper

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

Using R from Resolver One

This spreadsheet was the winner of the second round of the Resolver One Spreadsheet Challenge, in February 2009.

I wanted to develop a program to enable everyone to carry out complex statistical analysis and stochastic modeling in Resolver One by harnessing the power of R.

In order to run complicated statistical analysis/modeling I use R (an open source clone of the powerful commercial language S-Plus). R is the most successful statistical library currently existing on the market. R has different powerful libraries for data mining, genetics, portfolio optimization, asset allocation, etc.

Although R is the strongest tool for statistical analysis, unlike SPSS it lacks an easy to use yet a powerful spreadsheet. On the other hand building a bridge between R and Resolver one is extremely difficult and involved a number of trial and errors and using Interop objects. By using the provided framework one can enjoy the power of all of the R libraries with the comfort and the power of Resolver One. The accompanying examples will help the reader to use similar strategies to solve complicated statistical problems and to develop exciting results and 2D/3D graphs using OpenGL capabilities and drawing. Users are able to develop fly-through 3D visualizations from Resolver One by using RGL library in R (see screenshot). I have made an effort to provide a complete framework with directions for how to write a program in this framework and how to do error handling between R and Resolver One. All the complex libraries are provided in binary format and users only need to call them from within their Resolver One. It will then enable them to use all the functionality of R inside their Resolver One spreadsheets and send them information successfully back and forth between these two programs.

The same component can be used to call SciLab functions (a clone of MATLAB, a scientific computing environment), using the same procedure provided in the article, users are able to use SciLab similar to the way they use R inside Resolver One.

17 February 2009. Tagged with analysis, competition, framework, modeling, R, statistics, stochastic systems, visualization, winner

Resolver Games

Resolver Games are a class of simple learning games created as Resolver One spreadsheets.

Each Resolver Game consists of two separated spreadsheets which are called the game board and the training data. The game board is unique while the training are various and user-defined. The game board displays the training data, implements the user interface and game logic whereas the training data are user-editable textual items.

19 March 2009. Tagged with competition, game

In-cell visualization and graphing using simple ASCII graphs

In-cell visualization and graphing using simple ASCII graphs

Resolver One doesn't support showing images in cells and you need to open new image worksheets in order to see them

but it is sometimes crucial to see data and graph side by side

this is my solution to this problem for stock prices

this code gets live data from Google finance API then visualizes the data using ASCII codes in it's "Graph" column

it is very handy for me and wanted to share it with others

03 April 2009. Tagged with api, competition, csv files, google finance, graphs, stock price, visualization

Simulation of Poisson Point Processes with Marking Using Resolver One

This spreadsheet is my effort to simulate a simple Poisson point process in Resolver One (the distance between each pair of points is an exponential random variable).

One of the advantages that Resolver One has over Excel is it's underlying Python language it empowers us to use a much better random number generator than VBA and different probability distributions can be used.

have you ever tried to generate an exponential r.v from a uniform distribution in VB? it sometimes breaks because occasionally RAND() gives you zero in Excel and it blows up the LOG() function.

In this spreadsheet we are paving the way towards a more complicated type of simulation, -Poisson Marking of Point Processes- You can read more about them in Resnick’s “Adventures in Stochastic Processes”, also Sheldon Ross provides the information under an older name “Compound Poisson Processes” these types of processes arise when we are dealing with batch arrival of Poisson points (e.g., buses arrive according to a Poisson process and each has a number of people according to another Poisson process)

Marking basically adds another dimension to a pure Poisson process.

In this spreadsheet we are making use of GDI+ which is not available in CPython and is one of the advantages of IronPython. I have used a number of GDI+ functionality including Anti-aliasing, and EndCaps and Start Caps

Refs:
1- Stochastic Processes by Sheldon M. Ross

2- Adventures in Stochastic Processes by Sidney I. Resnick

07 April 2009. Tagged with competition, Marking, Point Process, Poisson, Random numbers, Simulation

Generating Sparklines from real time financial information with Resolver one and Google finance API

Generating Sparklines from real time financial information with Resolver one and Google finance API
Sparklines are the greatest inventions of Professor Edward Tufte (statistician and Professor Emeritus of statistics at Yale University), a Sparkline is a proper tool to visualize financial information in a very small space. Sparklines are tiny informative graphs that can be inserted in financial reports.
Sparkline tools are available for MS-Excel. Our code generates sparklines from financial information in Resolver One; these sparklines can then be inserted in-line with texts in financial reports.
In our code, we read Google closing price from an API provided by Google finance, this API provides us with a CSV stream that we can load into Resolver One. We can additionally change the date range for the data stream from within Resolver One.
The code should work right out of the box and there is no need to download any additional package, it calls GDI+ functions and it should be very easy to modify and customize

07 April 2009. Tagged with api, competition, csv, excel, financial information, google finance, sparklines, stock price, visualization

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

Sudoku Solver using Microsoft Solver Foundation

This is an example for implementing the Microsoft Solver Foundation in Resolver One. This framework provides a suite of solvers and helpers. Here the classical Sudoku puzzle solved as a constraint program.

Requisite:

* Visual Studio Tools for Office 3.0 runtime (http://www.microsoft.com/downloads/details.aspx?FamilyID=54eb3a5a-0e52-40f9-a2d1-eecd7a092dcb&displaylang=en)
* Microsoft Solver Foundation Express edition (http://code.msdn.microsoft.com/solverfoundation)

29 May 2009. Tagged with competition, Solver, Sudoku, winner

<< Resolver Exchange