------------------------ INSTANT MATCHPOINTER 2.0 by Richard Pavlicek ------------------------ Instant Matchpointer is a bridge utility I wrote to create "instant matchpoint" tables from an input file that lists each board with its scores and frequencies. It is a DOS program written in assembly language, which should work fine under any Windows system. -------------- How To Install -------------- The file IM20.ZIP is a standard PKzip compressed archive, which contains the following files: IM.COM The program itself (COM format) IM.TXT The file you are reading TEST.FRQ Sample input file To install the program, make a new directory (I use the name IM, but you can call it what you want) and move all the files to that new directory. That's it! To see how the program works, issue the command: IM TEST This will read the sample input file TEST.FRQ and create two output files as follows: TEST.MP Matchpoint tables (based on 100 top) TEST.XP As above with additional information Scores and awards are always relative to North-South, so awards for East-West are determined by subtracting the North-South award from 100; e.g., if North-South get 23, East-West get 77. To use the program, you would create your own frequency data file with the extension .FRQ (format described later). If your data contains an error (score out of sequence, impossible score, etc.) the program will exit with a message like: Error at Line 82 Board 3 Score -410 Simply edit the .FRQ file to fix it and try again. Matchpoint tables will be created only for contiguous boards without errors. If all results are converted succesfully, you will see an exit message like: All OK! 8 Boards (1-8) Most Awards: 40 Fewest: 33 The output file with extension .MP contains the actual matchpoint tables with all "gap awards" properly determined. The output file with extension .XP contains additional information (frequencies and raw awards before converting to percent), which might be useful or interesting. For details about instant matchpoint theory, see http://www.rpbridge.net/7q41.htm. Note: This utility does not recognize long filenames (or long folder names). To convert such an input file, you must use its alias (DOS 8:3 naming format). For example, if you have a file named MONDAY_DUPLICATE.FRQ in your "MY DOCUMENTS" folder, the command line to process it would be: IM MYDOCU~1\MONDAY~1 Output files will be named MONDAY~1.XP and MONDAY~1.MP (with no associated long name) and located in your "MY DOCUMENTS" folder. Alternatively, you can avoid this naming difference by keeping all your .FRQ files in standard DOS 8:3 format. -------------------- Command Line Options -------------------- Optionally, the filename on the command line may be followed by a space and a number, which is the minimum frequency to accept for a score to be considered (default = 1). Example: IM MYGAME 2 Processes the file MYGAME.FRQ but ignores scores that occurred only once. This is a convenient way to prevent occasional fluke results (like +2300) from appearing in the output tables. Also, the letter S (preceded by a space) causes the program to smooth output tables when two scores produce the same percentage. For example, suppose two rare scores, +850 and +800 both happen to yield 99 when rounded to whole percents. Smoothing would change the inferior one (+800) to 98, thus producing a more pleasing table with unique awards for each score. Example: IM C:\GAMES\0502 S Processes the file 0502.FRQ (in directory C:\GAMES) and smooths the output tables so that all scores have unique awards. For smoothing to be effective, boards should not have more than about 35 scores, preferably from 20 to 30. Smoothing boards with more scores would tend to drift away from mathematical fairness in bunched areas (usually the upper and lower ends of the scale).* *If a board has too many scores and smoothing is desired, it is usually a simple matter to remove fluke scores, either by editing the board frequencies directly, or with the number option (which affects all boards). The option S (smooth) and a number (minimum frequency) may both be used (either order) if each is preceded by a space. Example: IM MONDAY 3 S Processes the file MONDAY.FRQ, accepting scores with a frequency of 3 or higher, and smooths the output. ------------------- Format of .FRQ File ------------------- The source file for Instant Matchpointer must have extension .FRQ (note that .FRQ is not included on the command line). File must be in the following format: Board 1 300 13 150 27 100 43 50 119 -150 10 -170 13 -200 17 -230 7 -400 77 -420 71 -430 66 -440 6 -450 211 -460 87 -480 398 -490 25 -510 10 -920 49 -980 24 -1010 12 -1090 4 -1210 2 Board 2 800 38 750 2 690 10 660 60 630 37 620 28 (etc.) Header for each board must be a single word (does not have to be "Board"), a space, and a number (1-65535). Additional characters on the header line are ignored. This and all lines must end with a CRLF (carriage return, line feed). Each result line consists of a signed North-South score (sign is optional if positive), one separator character (tab is used above, but a space or comma, or any non-digit, may be used) followed by a number, which indicates the frequency (how many times the score was achieved). The total of all frequencies on a board cannot exceed 65,535. Scores must be ordered for North-South from highest positive to lowest negative, and each score must be valid for the board number (else an error will be reported). Any frequency may be increased or decreased (without changing the number shown) by using one or more of the following characters immediately after the number (without spaces): + 200% | > 150% | increase } 125% | { 87.5% | < 75% | decrease - 50% | * 0% (suppress entirely) The above is a convenient way to adjust for inequities without losing the original frequencies. Examples: 800 38> (interpret as 57) 660 60-- (interpret as 15) -510 10+} (interpret as 25) -1150 5* (interpret as 0) If a frequency is followed by a space or tab, any further text on that line is ignored, which allows comments to be added if desired for your later reference. Example: 1100 2 reduced from 7, but maybe 4-5 is better Only 1100 and 2 are read by the program. Board numbers do not have to be sequential or unique, however, the exit message will alert you if board numbers are nonsequential, as this is unlikely to be your intention. Board numbers are also used to determine vulnerability conditions (for score verification) as in standard duplicate rotation (16-board cycle). There is no limit to the length of the .FRQ source file, or the number of boards, as long as you have enough disk space to store the output. I've tested it on a 70 MB file with 260,000 boards. ------------------- Version Information ------------------- 2.0 Added option to smooth output awards. Added option to allow minimum frequency to accept. Added increase/decrease control (+<{}>-) in .FRQ file. Improved output information in .XP file. Improved display message on exit. Changed from .EXE to .COM (like my other utilities). 1.0 Original public release. ---------------------- Copyright & Disclaimer ---------------------- This software is offered free, "as is" and without warranty. The author assumes no liability. It may be distributed freely provided all the files are intact and unmodified, no fee is charged, and it is not included as part of another package. Comments and suggestions are welcome. ---------------- Richard Pavlicek E-mail: richard@rpbridge.net Web site: www.rpbridge.net