Author: Mike Byrne
Date: 11:34:00 04/18/04
The next release of Crafty 19.12 SE will have the unqique ability to approximate pi from its own internally generated random numbers -- added for no other reason than to test the RNG , plus it was fun ...I am certain no other chess program has this function from its console today ;>) This called the "Monte Carlo Value for Pi" Each successive sequence of six bytes is used as 24 bit X and Y co-ordinates within a square. If the distance of the randomly-generated point is less than the radius of a circle inscribed within the square, the six-byte sequence is considered a "hit". The percentage of hits can be used to calculate the value of Pi. For very large streams (this approximation converges very slowly), the value will approach the correct value of Pi if the sequence is close to random. A 32768 byte file created by radioactive decay yielded: Monte Carlo value for Pi is 3.139648438 (error 0.06 percent). The Mersenne Twister algorithm is off by 0.04 percent after 10,000,000 iterations - slightly more random than the radioactive decay yielded file above more inforamtion is here: http://www.chem.unl.edu/zeng/joy/mclab/mcintro.html the command is : pi <iterations> (sample output,not all random numbers shown) pi 3000 ... 0.7565284544 0.5282603130 0.7576006791 0.8268741225 0.4657651940 0.7838006988 0.6996462909 0.5248089549 0.6799561661 0.2909411630 0.0062850285 0.2781589846 0.5033952501 0.4572914760 0.0556873158 0.9999520252 pi = 3.15733333 to just show the calculation updated every million iterations type "SE on" and then the output would look like this for 10,000,000 iterations White(1): pi 10000000 pi = 3.13866800 pi = 3.14014200 pi = 3.14102933 pi = 3.14111000 pi = 3.14086240 pi = 3.14046733 pi = 3.14025714 pi = 3.14031150 pi = 3.14021778 pi = 3.14012840 pi = 3.14012840 White(1): How close it gets to pi is dependant upon how many iterations and how good the RNG actually is. Here's an extract of the wb2uci.log showing the personality changing randomly after every move: 53.391: S> Personality changed to 16 53.391: S> Confirmation Personality changed to 16 53.391: S> queen value..........................900 53.391: S> rook value...........................500 53.391: S> bishop value.........................300 53.391: S> knight value.........................300 53.391: S> pawn value...........................100 53.391: S> personality setting..................16 53.391: S> personality name .................. 2000 60.391: S> move d5 60.391: S> Personality changed to 9 60.391: S> Confirmation Personality changed to 9 60.391: S> queen value..........................800 60.391: S> rook value...........................400 60.391: S> bishop value.........................250 60.391: S> knight value.........................350 60.391: S> pawn value...........................125 60.391: S> personality setting..................9 60.391: S> personality name .................. Knight 60.500: S> tellicsnoalias set 1 Crafty v19.12 SE [Knight] (1 cpus) 60.641: S> move Nf3 60.641: S> Personality changed to 19 60.641: S> Confirmation Personality changed to 19 60.641: S> queen value..........................1100 60.641: S> rook value...........................550 60.641: S> bishop value.........................325 60.641: S> knight value.........................325 60.641: S> pawn value...........................125 60.641: S> personality setting..................19 60.641: S> personality name .................. Master 65.484: S> tellicsnoalias set 1 Crafty v19.12 SE [Master] (1 cpus) 65.875: S> 7 -15 28 106901 5. ... dxc4 6. Nc3 cxd3 7. Bxd3 Qb6 8. Ne5 Nf6 65.969: S> 7 -58 38 141174 5. ... dxe4 6. dxe4 Qxd1+ 7. Kxd1 Bd7 8. Nc3 O-O-O 9. Be3 Nf6 <HT> 65.984: S> 7 -58 38 141174 5. ... dxe4 6. dxe4 Qxd1+ 7. Kxd1 Bd7 8. Nc3 O-O-O 9. Be3 Nf6 <HT> 66.047: S> 8 -30 45 177500 5. ... dxe4 6. dxe4 Qxd1+ 7. Kxd1 Bd7 8. Nc3 O-O-O 9. Be3 Nf6 10. Bd3 66.063: S> stat01: 47 182590 8 36 38 66.203: S> 8 -30 61 249804 5. ... dxe4 6. dxe4 Qxd1+ 7. Kxd1 Bd7 8. Nc3 O-O-O 9. Be3 Nf6 10. Bd3 66.359: S> 9 -56 77 331476 5. ... dxe4 6. dxe4 Qxd1+ 7. Kxd1 Bd7 8. Nc3 O-O-O 9. Be2 Nd4 10. Ne5 Nxe2 11. Kxe2 66.609: S> 9 -56 102 449093 5. ... dxe4 6. dxe4 Qxd1+ 7. Kxd1 Bd7 8. Nc3 O-O-O 9. Be2 Nd4 10. Ne5 Nxe2 11. Kxe2 72.938: S> move dxe4 72.938: S> Personality changed to 4 72.938: S> Confirmation Personality changed to 4 72.938: S> queen value..........................600 72.938: S> rook value...........................400 72.938: S> bishop value.........................275 72.938: S> knight value.........................275 72.938: S> pawn value...........................200 72.938: S> personality setting..................4 72.938: S> personality name .................. Beginner 72.938: S> stat01: 0 0 0 0 0 72.938: S> stat01: 0 0 0 0 0 72.938: S> stat01: 0 0 0 0 0 72.938: S> stat01: 0 0 0 0 0 72.938: S> stat01: 0 0 0 0 0 72.938: S> stat01: 0 0 0 0 0 72.953: S> Hint: dxe4 80.109: S> move Qxd1+ 80.109: S> Personality changed to 2 80.109: S> Confirmation Personality changed to 2 80.109: S> queen value..........................350 80.109: S> rook value...........................300 80.109: S> bishop value.........................275 80.109: S> knight value.........................275 80.109: S> pawn value...........................250 80.109: S> personality setting..................2 80.109: S> personality name .................. Wendy 80.125: S> Hint: Kxd1 87.156: S> tellicsnoalias set 1 Crafty v19.12 SE [Wendy] (1 cpus) 87.297: S> move Kxd1 87.297: S> Personality changed to 1 87.297: S> Confirmation Personality changed to 1 87.297: S> queen value..........................150 87.297: S> rook value...........................200 87.297: S> bishop value.........................250 87.297: S> knight value.........................300 87.297: S> pawn value...........................350 87.297: S> personality setting..................1 87.297: S> personality name .................. Krazi-Kamakazi 87.531: S> tellicsnoalias set 1 Crafty v19.12 SE [Krazi-Kamakazi] (1 cpus) 94.594: S> move Nd4 94.594: S> Personality changed to 19 94.594: S> Confirmation Personality changed to 19 94.594: S> queen value..........................1100 94.594: S> rook value...........................550 94.594: S> bishop value.........................325 94.594: S> knight value.........................325 94.594: S> pawn value...........................125 94.594: S> personality setting..................19 94.594: S> personality name .................. Master 95.406: S> Hint: Nc3 102.391: S> tellicsnoalias set 1 Crafty v19.12 SE [Master] (1 cpus) 102.500: S> move Nc3 102.500: S> Personality changed to 14 102.500: S> Confirmation Personality changed to 14 102.500: S> queen value..........................900 102.500: S> rook value...........................500 102.500: S> bishop value.........................300 102.500: S> knight value.........................300 102.500: S> pawn value...........................125 102.500: S> personality setting..................14 102.500: S> personality name .................. Club 102.813: S> tellicsnoalias set 1 Crafty v19.12 SE [Club] (1 cpus) 109.578: S> move cxd4 almost done with Crafty 19.12SE - but I have to some work around the house today
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.