Author: Mike Byrne
Date: 20:10:32 04/20/04
still testing...
To rehash -- added a random number generated and a couple of random number toys
...
1. Approximate value of Pi by using randon numbers (a Monte Carlo simulation
that essentially is a virtual 1/4 dart board and it calculates the number of
darts thrown in the arc and out side the arc to estimate Pi.
"pi 1000" equals calulate pi on 1000 iterations (dart throws) (or two thousand
randome numbers - since each iteration is essentially two random numbers used
for the x and y axis. If (x^2+y^2) is less than equal to 1 on a 1 inch
dartboard with a quarter circle - it is within the arc and can be counted as a
hit. At the end, 4*hits/throws= ~Pi , if the throws were randomly generated.
2. random (or rand) <low value> <high value> <iterations or number of random
numbers>
Low value must be 0 or higher - high value must be 2^31-2 or less. Counter is
64 bit, so you select 20 billion, 20 trillion whatever - you can pick a number
high enough that your computer (if it will run this long without interruption)
will still be cranking long after you are dead -- even if you were born today.
It also includes a counters for the 0 through 7, so if you wanted to simulate
dice rolls (or head/tail flips) and see what the results would look like after
20 billion throws. Also counts consecutive numbers generated.
Example:
White(1): pi 1000
pi = 3.15600000
White(1): pi 1000000 (takes less than second)
pi = 3.13887200
pi = 3.13887200
White(1): pi 100000000 (maybe about a minute on my machine)
pi = 3.14120400
pi = 3.13971200
pi = 3.14033867
...< a bunch deleted - it is displying every 1,000,000 iteration>
pi = 3.14043735
pi = 3.14042699
pi = 3.14040476
pi = 3.14040476 <genenerally calculates pi to within 0.03% to
0.05% - excellent for a RNG)
White(1): rand 0 1 100000000
{(0 1) simulates a coin flip- after seeing this - you will never be sure about a
100 game chess match again(do "rand 0 1 100") - between two equal engines - you
may have caught in the engines in blip where one engine wins 28 games (very
rare) in a row between a match of two equal engines. You do see 6 or 7 in a row
all the time in RNG for 0 and 1}
A 100 million game chess match will give you more confidence ;>)
zero's = 49994560 -> pretty darn close after 100M RNG
one's = 50005440
two's = 0
three's = 0
four's = 0
five's = 0
six's = 0
seven and higher = 0
maximum consecutive in a row = 28 (either "zero" or "one" or perhaps both
came up 28 times in a row - that happens all the time and more with 100 million
numbers generated for just with a range of two digits)
Total Random Numbers Generated (RNG) = 100000000
Raw RNG per second: 7199424
now for the chess stuff using these random numbers
New personality "Jekyll & Hyde" changes settings after every game or after every
instance (user choice) --all settings are saved.
White(1): "kra jek" (short cut method)
Jekyll & Hyde random personality is selected!
Below are the settings if they seem to be noteworthy!
Keeper setting 1==yes, 0==no 0
queen value..........................897
rook value...........................462
bishop value.........................315
knight value.........................320
pawn value...........................102
book random (0=off)............ .....1
book selection width.................5
delay time limit,(0=off:1=on)........0
draw score setting...................0
search depth.........................0
special edition code (1=off:0=on)....0
time usage setting (0=normal)........0
window beta initial setting..........40
king safety asymmetry................-52
king safety scale.............. .....104
king safety tropism..................96
lazy setting.........................60
pass pawn scale......................109
pawn block scale............... .....79
pawn scale..................... .... 98
incheck extension setting............55
mate extension setting...............32
one response extension setting.......55
pawn push extension setting..........57
recapture extension setting..........42
start extension setting..............30
Type "kra jek" and see new settings generated. All random value have standard
crafty settings as the midpoint - the random values calucated will generally be
within 30% (piece values are within 10% for the most part)- extensions will be
between .5 to 1, some evaluation settings have a wide range (asymentry) ,
others have a narrow range (pawn scale). The code will be released and you can
see for yourself how I did this.
White(1): kra jek
Jekyll & Hyde random personality is selected!
Below are the settings if they seem to be noteworthy!
Keeper setting 1==yes, 0==no 0
queen value..........................882
rook value...........................466
bishop value.........................275
knight value.........................298
pawn value...........................92
book random (0=off)............ .....1
book selection width.................5
delay time limit,(0=off:1=on)........0
draw score setting...................0
search depth.........................0
special edition code (1=off:0=on)....0
time usage setting (0=normal)........0
window beta initial setting..........40
king safety asymmetry................-62
king safety scale.............. .....103
king safety tropism..................96
lazy setting.........................60
pass pawn scale......................90
pawn block scale............... .....93
pawn scale..................... .... 105
incheck extension setting............53
mate extension setting...............46
one response extension setting.......36
pawn push extension setting..........56
recapture extension setting..........44
start extension setting..............30
White(1): st 4
search time set to 4.00.
White(1): mt=2
max threads set to 2
White(1): test d:\crafty\test\tests\wac.epd 2
The random settings above achived an excelltent score in a 4 second wac 300
test. BUT most of the random setting will be WEAKER than Standard Crafty. My
objective was to increase variability in Crafty's play without weakening it
unduly. With the other options of reducing searchd depth and or intensity , the
different flavors of Crafty styles available is virtually limitless.
test results summary:
total positions searched.......... 300
number right...................... 287
number wrong...................... 13
percentage right.................. 95
percentage wrong.................. 4
total nodes searched.............. 175671596
average search depth.............. 5.6
nodes per second.................. 952356
comapre to krafty karpov and krafty standard below on my machine
White(1): kra karpov
White(1): infox
Crafty v19.12 SE (2 cpus)
Keeper setting 1==yes, 0==no 0
personality name .................. Karpov
personality setting..................30
queen value..........................900
rook value...........................500
bishop value.........................300
knight value.........................300
pawn value...........................100
book random (0=off)............ .....0
book selection width.................3
delay time limit,(0=off:1=on)........0
draw score setting...................0
search depth.........................0
special edition code (1=off:0=on)....0
time usage setting (0=normal)........30
window beta initial setting..........40
king safety asymmetry................-60
king safety scale.............. .....130
king safety tropism..................110
lazy setting.........................60
pass pawn scale......................103
pawn block scale............... .....115
pawn scale..................... .... 100
incheck extension setting............60
mate extension setting...............48
one response extension setting.......48
pawn push extension setting..........45
recapture extension setting..........30
start extension setting..............30
test results summary:
total positions searched.......... 300
number right...................... 286
number wrong...................... 14
percentage right.................. 95
percentage wrong.................. 4
total nodes searched.............. 169796730
average search depth.............. 5.3
nodes per second.................. 907518
===========================================================
White(1): kra standard
test results summary:
total positions searched.......... 300
number right...................... 283
number wrong...................... 17
percentage right.................. 94
percentage wrong.................. 5
total nodes searched.............. 190882538
average search depth.............. 5.4
nodes per second.................. 1037123
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.