Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Analysing Deep Junior in Bilbao with "Monte Carlo Simulation"

Author: Graham Laight

Date: 10:07:29 10/13/04

Go up one level in this thread


On October 13, 2004 at 12:42:32, Dieter Buerssner wrote:

>On October 13, 2004 at 06:45:50, Graham Laight wrote:
>
>>OK - here's a program to use the statistical technique called, "Monte Carlo
>>Simulation". I hope that this satisfies everyone that I am not statistically
>>illiterate.
>
>Nice. Until now, I had no idea, that one could write such a thing so easily (at
>least the source looks rather straight forward) in a scripting language that
>runs under any (?) Web browser.

The good news is that most modern web browsers (IE, Netscape, Opera, Firefox)
will run JavaScript. The bad news is that there can be differences in how
different browsers interpret certain functions (though the core language seems
to be solid between browsers) - but I am confident that a program like my
simulator, which, in terms of the "browser object model" is only doing basic
tasks - will work correctly in any browser.

>I had written a very similar program some years ago. It gives the same results
>as your program (within the expected noise of ~sqrt(n)). You could tickle out a
>bit more, by using the knowledge that typically chess players perform
>differently with white and black, and that matches have the same number of white
>and black games. A constructed example: One player as white wins 90%, 5% draw,
>5% losses. As black he wins 5%, draws 5% and loses 90% (against the same
>opponent). We expect 50% in a match. A result of say 7-3 or more extreme is
>rather unlikely.
>If we however take the overall probabilities (47.5% win, 5% draw, 47.5% loss), a
>7-3 result is not very unlikely at all.

It is very gratifying to see that your old program gives the same results as my
new one, which I wrote this morning! It is also good to see that truncating my
results at 2 decimal places appears to have been a wise decision (based on my
personal experience of doing statistical work).

Thankyou very much Dieter - you've brightened up my day!

Take care,
-g

>Regards,
>Dieter
>
>Output of your program (1 million tournaments, your default values otherwise):
>
>DJ won 0 points in 0.16% of the tournaments
>DJ won 0.5 points in 2.23% of the tournaments
>DJ won 1 points in 12.06% of the tournaments
>DJ won 1.5 points in 30.84% of the tournaments
>DJ won 2 points in 36.04% of the tournaments
>DJ won 2.5 points in 15.37% of the tournaments
>DJ won 3 points in 3.02% of the tournaments
>DJ won 3.5 points in 0.27% of the tournaments
>DJ won 4 points in 0.01% of the tournaments
>
>My prog:
>
>C:\e\dcrand>cmueoa 4 1 7 2 1 7 2 1000000
>Result of chess matches
>Player A as white wins 10.0%, draws 70.0% and loses 20.0%
>Player A as black wins 10.0%, draws 70.0% and loses 20.0%
>Expected result: 45.00% (as white 45.00%, as black 45.00%)
>A match of 4 games was simulated 1000000 times by a Monte Carlo method
>
>               result        probability        p <= res.         p > res.
>  0.0 - 4.0   (  0.0%):          0.1639%          0.1639%         99.8361%
>  0.5 - 3.5   ( 12.5%):          2.2384%          2.4023%         97.5977%
>  1.0 - 3.0   ( 25.0%):         12.0312%         14.4335%         85.5665%
>  1.5 - 2.5   ( 37.5%):         30.8543%         45.2878%         54.7122%
>  2.0 - 2.0   ( 50.0%):         36.0153%         81.3031%         18.6969%
>  2.5 - 1.5   ( 62.5%):         15.3896%         96.6927%          3.3073%
>  3.0 - 1.0   ( 75.0%):          3.0155%         99.7082%          0.2918%
>  3.5 - 0.5   ( 87.5%):          0.2814%         99.9896%          0.0104%
>  4.0 - 0.0   (100.0%):          0.0104%        100.0000%          0.0000%
>Average result of simulation 45.0024%
>
>And some longer runtime (now the numbers should come rather close to the exact
>numbers):
>A match of 4 games was simulated 100000000 times by a Monte Carlo method
>
>               result        probability        p <= res.         p > res.
>  0.0 - 4.0   (  0.0%):          0.1596%          0.1596%         99.8404%
>  0.5 - 3.5   ( 12.5%):          2.2387%          2.3983%         97.6017%
>  1.0 - 3.0   ( 25.0%):         12.0859%         14.4842%         85.5158%
>  1.5 - 2.5   ( 37.5%):         30.8014%         45.2856%         54.7144%
>  2.0 - 2.0   ( 50.0%):         36.0047%         81.2903%         18.7097%
>  2.5 - 1.5   ( 62.5%):         15.4025%         96.6928%          3.3072%
>  3.0 - 1.0   ( 75.0%):          3.0176%         99.7104%          0.2896%
>  3.5 - 0.5   ( 87.5%):          0.2797%         99.9901%          0.0099%
>  4.0 - 0.0   (100.0%):          0.0099%        100.0000%          0.0000%
>Average result of simulation 44.9986%



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.