6 import sys
, thread
, time
, os
21 print "\nDepth %s:" % d
22 if 'CLEAR' in os
.environ
:
24 if 'PARALLEL' in os
.environ
:
28 x
= alphaBeta(pos
, d
, top
= True, splits
= splits
)
29 print " ", removePV(x
)
30 print " ", algebraicForPV(x
['pv'])
38 print "\nDepth %s:" % d
40 x
= alphaBeta(pos
, d
, top
= True, splits
= splits
)
41 print ["no split", "one split"][splits
]
42 print " ", removePV(x
)
43 print " ", algebraicForPV(x
['pv'])
45 times
[splits
] = x
['time']
46 pvCache
, otherPVCache
= otherPVCache
, pvCache
47 speedup
= float(times
[0]) / times
[1]
48 print "Speed-up: %.2fx (ratio: %.1f%%)" % (speedup
, 100.0 /
51 if __name__
== '__main__':
52 thread
.start_new_thread(main2
, ())