Need Help to debug

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

NaltaP312
Posts: 56
Joined: Wed Oct 29, 2008 1:06 pm
Full name: Marc Paule

Re: Self tests

Post by NaltaP312 »

Hi,

many thanks Steven.
Now i will take all advices and tips to perform my move generation.

First i will implement the divide and after i will implement all idea to be sure than i have a generation move without bug.

Regards
Yves
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Self tests

Post by sje »

This will give you something to compare. Note that's it's helpful for performing comparisons to have the program's moves appear using SAN as appears below.
[D] r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1

Code: Select all

[] empbulk 1
Bb5 1
Bc1 1
Bc4 1
Bd1 1
Bd3 1
Be3 1
Bf1 1
Bf4 1
Bg5 1
Bh6 1
Bxa6 1
Kd1 1
Kf1 1
Na4 1
Nb1 1
Nb5 1
Nc4 1
Nc6 1
Nd1 1
Nd3 1
Ng4 1
Nxd7 1
Nxf7 1
Nxg6 1
O-O 1
O-O-O 1
Qd3 1
Qe3 1
Qf4 1
Qf5 1
Qg3 1
Qg4 1
Qh5 1
Qxf6 1
Qxh3 1
Rb1 1
Rc1 1
Rd1 1
Rf1 1
Rg1 1
a3 1
a4 1
b3 1
d6 1
dxe6 1
g3 1
g4 1
gxh3 1
Depth: 1   Count: 48   Elapsed: 0.241353  (198.879 Hz / 0.00502819 s)
[] empbulk 2
Bb5 39
Bc1 43
Bc4 41
Bd1 44
Bd3 42
Be3 43
Bf1 44
Bf4 43
Bg5 42
Bh6 41
Bxa6 36
Kd1 43
Kf1 43
Na4 42
Nb1 42
Nb5 39
Nc4 42
Nc6 41
Nd1 42
Nd3 43
Ng4 44
Nxd7 45
Nxf7 44
Nxg6 42
O-O 43
O-O-O 43
Qd3 42
Qe3 43
Qf4 43
Qf5 45
Qg3 43
Qg4 43
Qh5 43
Qxf6 39
Qxh3 43
Rb1 43
Rc1 43
Rd1 43
Rf1 43
Rg1 43
a3 44
a4 44
b3 42
d6 41
dxe6 46
g3 42
g4 42
gxh3 43
Depth: 2   Count: 2,039   Elapsed: 0.241307  (8449.82 Hz / 0.000118346 s)
[] empbulk 3
Bb5 2,057
Bc1 1,963
Bc4 2,082
Bd1 1,733
Bd3 2,050
Be3 2,136
Bf1 2,060
Bf4 2,000
Bg5 2,134
Bh6 2,019
Bxa6 1,907
Kd1 1,894
Kf1 1,855
Na4 2,203
Nb1 2,038
Nb5 2,138
Nc4 1,880
Nc6 2,027
Nd1 2,040
Nd3 1,803
Ng4 1,878
Nxd7 2,124
Nxf7 2,080
Nxg6 1,997
O-O 2,059
O-O-O 1,887
Qd3 2,005
Qe3 2,174
Qf4 2,132
Qf5 2,396
Qg3 2,214
Qg4 2,169
Qh5 2,267
Qxf6 2,111
Qxh3 2,360
Rb1 1,969
Rc1 1,968
Rd1 1,885
Rf1 1,929
Rg1 2,013
a3 2,186
a4 2,149
b3 1,964
d6 1,991
dxe6 2,241
g3 1,882
g4 1,843
gxh3 1,970
Depth: 3   Count: 97,862   Elapsed: 0.241376  (405434 Hz / 2.46649e-06 s)
[] empbulk 4
Bb5 79,739
Bc1 83,037
Bc4 84,835
Bd1 74,963
Bd3 85,119
Be3 90,274
Bf1 88,728
Bf4 84,869
Bg5 87,951
Bh6 82,323
Bxa6 69,334
Kd1 79,989
Kf1 77,887
Na4 91,447
Nb1 84,773
Nb5 81,498
Nc4 77,752
Nc6 83,885
Nd1 84,782
Nd3 77,431
Ng4 79,912
Nxd7 93,913
Nxf7 88,799
Nxg6 83,866
Qd3 83,727
O-O 86,975
O-O-O 79,803
Qe3 92,505
Qf5 104,992
Qg3 94,461
Qf4 90,488
Qg4 92,037
Qh5 95,034
Qxf6 77,838
Qxh3 98,524
Rb1 83,348
Rc1 83,263
Rd1 79,695
Rf1 81,563
Rg1 84,876
a3 94,405
a4 90,978
b3 81,066
d6 79,551
g3 77,468
g4 75,677
dxe6 97,464
gxh3 82,759
Depth: 4   Count: 4,085,603   Elapsed: 0.273711  (1.49267e+07 Hz / 6.6994e-08 s)
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

A couple more

Post by sje »

Code: Select all

[] empbulk 5
Bc1 3,793,390
Bd1 3,074,219
Bb5 4,032,348
Bc4 4,182,989
Bd3 4,066,966
Be3 4,407,041
Bf4 3,941,257
Bf1 4,095,479
Bg5 4,370,915
Bxa6 3,553,501
Kd1 3,559,113
Bh6 3,967,365
Kf1 3,377,351
Nb1 3,996,171
Na4 4,628,497
Nb5 4,317,482
Nc4 3,494,887
Nd1 3,995,761
Nd3 3,288,812
Nc6 4,083,458
Ng4 3,415,992
Nxd7 4,404,043
Nxf7 4,164,923
Nxg6 3,949,417
O-O 4,119,629
O-O-O 3,551,583
Qd3 3,949,570
Qe3 4,477,772
Qf4 4,327,936
Qg3 4,669,768
Qf5 5,271,134
Qg4 4,514,010
Qxf6 3,975,992
Qh5 4,743,335
Rb1 3,827,454
Qxh3 5,067,173
Rd1 3,568,344
Rc1 3,814,203
Rf1 3,685,756
Rg1 3,989,454
a4 4,387,586
a3 4,627,439
b3 3,768,824
d6 3,835,265
dxe6 4,727,437
g3 3,472,039
g4 3,338,154
gxh3 3,819,456
Depth: 5   Count: 193,690,690   Elapsed: 1.26182  (1.53501e+08 Hz / 6.5146e-09 s)
[] empbulk 6
Bd1 131,348,645
Bc1 158,801,466
Bb5 158,033,152
Bc4 170,094,798
Bd3 167,737,155
Bf1 174,218,453
Bf4 165,805,784
Be3 184,114,087
Bxa6 130,642,863
Bh6 161,319,567
Bg5 177,883,051
Kd1 148,612,404
Kf1 139,601,450
Nb1 165,673,862
Nb5 166,970,874
Na4 191,260,040
Nc4 145,182,844
Nc6 169,836,097
Nd1 165,415,976
Nd3 140,737,072
Ng4 144,264,874
Nxg6 165,477,768
Nxf7 176,070,755
Nxd7 193,856,446
O-O 172,063,416
O-O-O 148,701,308
Qd3 164,583,144
Qe3 189,120,807
Qf4 181,938,761
Qg3 198,078,522
Qg4 189,789,456
Qf5 226,135,507
Qh5 197,839,051
Qxf6 146,338,070
Rb1 160,413,321
Qxh3 210,100,865
Rc1 159,720,218
Rd1 149,265,033
Rf1 154,273,720
Rg1 166,086,672
a3 197,413,067
a4 183,872,225
b3 153,953,689
d6 151,133,066
g3 141,076,301
g4 135,208,177
dxe6 203,255,191
gxh3 158,328,615
Depth: 6   Count: 8,031,647,685   Elapsed: 55.3296  (1.4516e+08 Hz / 6.88895e-09 s)
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

And another

Post by sje »

Code: Select all

[] emptran 7
Bc1 7,188,695,081
Bb5 7,708,742,487
Bd1 5,464,336,094
Bc4 8,143,385,765
Bd3 7,843,129,110
Be3 8,831,533,611
Bf1 7,893,751,276
Bf4 7,644,341,581
Bg5 8,614,847,947
Bh6 7,594,325,672
Bxa6 6,480,008,058
Kd1 6,605,992,768
Kf1 6,050,797,903
Na4 9,346,560,191
Nb1 7,574,150,349
Nb5 8,536,331,785
Nc4 6,485,370,632
Nc6 8,102,096,729
Nd1 7,560,735,010
Nd3 6,010,078,078
Ng4 6,143,255,313
Nxd7 8,964,657,917
Nxf7 8,146,033,781
Nxg6 7,679,730,505
O-O 8,038,310,789
O-O-O 6,631,088,095
Qd3 7,637,864,872
Qe3 8,885,152,041
Qf4 8,487,829,062
Qg3 9,484,342,196
Qf5 10,870,589,675
Qg4 9,047,498,461
Qh5 9,445,639,220
Qxf6 7,136,487,960
Rb1 7,312,345,541
Qxh3 10,314,822,739
Rc1 7,249,929,466
Rd1 6,710,600,976
Rf1 6,941,145,758
Rg1 7,743,466,513
a3 9,491,604,100
a4 8,711,431,200
b3 7,059,227,732
d6 7,180,089,264
g3 6,261,927,843
dxe6 9,741,806,126
g4 5,928,350,487
gxh3 7,265,571,564
Depth: 7   Count: 374,190,009,323   Elapsed: 1006.34  (3.71832e+08 Hz / 2.68939e-09 s)
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Last one

Post by sje »

Code: Select all

[] emptran 8
Bc1 299,879,274,628
Bb5 305,642,680,663
Bd1 232,299,228,024
Bc4 331,999,730,288
Bd3 323,148,326,669
Be3 367,090,135,640
Bf1 334,227,994,103
Bf4 320,459,928,018
Bg5 349,225,586,853
Bh6 309,132,031,261
Bxa6 241,387,211,019
Kd1 274,750,767,755
Kf1 248,309,615,874
Na4 386,563,996,492
Nb1 314,690,850,723
Nc4 270,362,407,999
Nb5 335,285,961,781
Nc6 338,226,587,566
Nd1 313,541,077,840
Nd3 256,502,027,044
Ng4 258,333,972,987
Nxf7 342,156,201,114
Nxd7 392,791,660,921
Nxg6 321,396,995,625
O-O 334,274,439,913
O-O-O 276,865,226,742
Qd3 318,831,262,788
Qe3 374,069,077,176
Qf4 355,165,150,488
Qg3 401,204,979,014
Qf5 460,271,562,178
Qg4 378,965,394,329
Qh5 393,307,640,844
Qxf6 264,835,246,136
Rb1 305,422,602,641
Qxh3 426,819,204,139
Rc1 302,507,795,871
Rd1 279,687,999,714
Rf1 289,675,094,245
Rg1 320,668,896,061
a3 402,654,556,153
a4 363,636,312,256
b3 287,466,826,392
d6 281,928,947,052
g3 252,982,671,742
dxe6 416,725,713,915
g4 238,841,590,165
gxh3 299,731,647,143
Depth: 8   Count: 15,493,944,087,984   Elapsed: 30471.3  (5.08477e+08 Hz / 1.96666e-09 s)
NaltaP312
Posts: 56
Joined: Wed Oct 29, 2008 1:06 pm
Full name: Marc Paule

Re: Self tests

Post by NaltaP312 »

Hello Steven,

thanks for your help. yes it is more difficult and i used a lot printf with lan move description.
At this time i work on debug and so the bishopattack and rookattack and it is so dificult. i have code the checkevasion but it is another subject ;)

i have found this on the web, f this can help so someone.
http://www.cs.berkeley.edu/~flab/chess/ ... games.html

Best Regards and have a nice code ;)
Yves