Source Code

Forum Archive : Source Code

 
Match equity calculator

From:   Claes Thornberg
Address:   claest@snapper.electrum.kth.se
Date:   23 September 1996
Subject:   Match Equity Calculator
Forum:   rec.games.backgammon
Google:   CLAEST.96Sep23152128@snapper.electrum.kth.se

Hi all,

Having spotted, what I believe to be some errors in Tomas Szabo's
match equity tables for different ratings I decided to figure out how
to calculate match equities (well described by Tom Keith at URL
http://www.bkgm.com/articles/met.html).  I have now written a program
which can calculate match equity tables.  This program takes as input
(arguments) match length, gammon rate and winning probability in one
game for the better player.  As output it prints a match equity table
for the favorite with respect to those parameters.

The program is available at

http://www.bkgm.com/articles/Thornberg/mec.c

and should compile using any ANSI-C compiler.

Enjoy,
  Claes Thornberg (claest @ FIBS)

PS.  If you decide to try/use it, I would appreciate any feedback you
might want to give.

Example:

For instance, suppose I want an equity table for a 9pt match with
gammon rate 20% where the favorite wins 55% of the games, then I start
my program:

mec 9 .2 .55

The output is:

Gammon rate 0.2000
Winning %   0.5500

        1     2     3     4     5     6     7     8     9
  1 0.550 0.748 0.797 0.869 0.887 0.930 0.941 0.963 0.969
  2 0.352 0.550 0.653 0.728 0.796 0.849 0.884 0.913 0.934
  3 0.303 0.461 0.563 0.640 0.715 0.777 0.821 0.860 0.889
  4 0.215 0.378 0.484 0.563 0.643 0.709 0.762 0.806 0.843
  5 0.194 0.310 0.412 0.492 0.573 0.642 0.700 0.750 0.793
  6 0.133 0.245 0.343 0.423 0.506 0.577 0.639 0.693 0.742
  7 0.118 0.203 0.294 0.368 0.449 0.518 0.582 0.638 0.691
  8 0.082 0.162 0.245 0.317 0.394 0.463 0.528 0.585 0.640
  9 0.073 0.134 0.208 0.273 0.346 0.412 0.477 0.535 0.591
--
______________________________________________________________________
Claes Thornberg                 Internet: claest@it.kth.se
Dept. of Teleinformatics        URL:      http://www.it.kth.se/~claest
KTH/Electrum 204                Voice:    +46 8 752 1377
164 40 Kista                    Fax:      +46 8 751 1793
Sweden
 
Did you find the information in this article useful?          

Do you have any comments you'd like to add?     

 

Source Code

Benchmark player "pubeval.c"  (Gerry Tesauro, Feb 1993) 
GamesGrid .CBG viewer in flex  (Gary Wong, Sept 1997) 
Match equity calculator  (Claes Thornberg, Sept 1996)  [Recommended reading]
Move generator  (Gary Wong, Oct 1998)  [Long message]
Rfibs and sfibs recorder and replayer  (Jan Spitzkowsky, Aug 1994) 
race2.c  (Marc Ringuette, Dec 1993)  [Long message]
race4.c  (Marc Ringuette, Dec 1993)  [Long message]

[GammOnLine forum]  From GammOnLine       [Long message]  Long message       [Recommended reading]  Recommended reading       [Recent addition]  Recent addition
 

  Book Suggestions
Books
Cheating
Chouettes
Computer Dice
Cube Handling
Cube Handling in Races
Equipment
Etiquette
Extreme Gammon
Fun and frustration
GNU Backgammon
History
Jellyfish
Learning
Luck versus Skill
Magazines & E-zines
Match Archives
Match Equities
Match Play
Match Play at 2-away/2-away
Miscellaneous
Opening Rolls
Pip Counting
Play Sites
Probability and Statistics
Programming
Propositions
Puzzles
Ratings
Rollouts
Rules
Rulings
Snowie
Software
Source Code
Strategy--Backgames
Strategy--Bearing Off
Strategy--Checker play
Terminology
Theory
Tournaments
Uncategorized
Variations

 

Return to:  Backgammon Galore : Forum Archive Main Page