Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Chess program improvement project (copy at Winboard::Programming)

Author: Stuart Cracraft

Date: 20:51:36 03/06/06

Go up one level in this thread


On March 06, 2006 at 23:20:21, Dann Corbit wrote:

>On March 06, 2006 at 23:04:24, Dann Corbit wrote:
>
>>*** Problem   Solution(s): Nxd5 (bm)
>>[D] r1q2rk1/p3bppb/3p1n1p/2nPp3/1p2P1P1/6NP/PP2QPB1/R1BNK2R b KQ - bm Nxd5
>>*** Problem   Solution(s): Nxd5 (bm)
>>BR ** BQ ** -- BR BK **
>>BP -- ** -- BB BP BP BB
>>-- ** -- BP -- BN -- BP
>>** -- BN WP BP -- ** --
>>-- BP -- ** WP ** WP **
>>** -- ** -- ** -- WN WP
>>WP WP -- ** WQ WP WB **
>>WR -- WB WN WK -- ** WR
>>mv 1 stage 0, black to move, computer plays black
>>hash=3a81fdded6269e62
>>pawnhash=2466670e8a77b5de
>>Alpha=-111 Beta=689 Maxdepth=9999999 MaxTime=1000
>>Ply/Max Mv   Score   Time Nodes PV
>> 1/ 6>f6e4 689  0.00       45 f6e4
>> 1/ 6 c8d8 1117  0.01      124 c8d8
>> 2/ 6 c8d7 981  0.01      256 c8d7
>> 3/ 9<c8d7 580  0.02     1136 c8d7 c1d2
>> 3/ 9 c8d7 537  0.03     2049 c8d7 b2b3
>> 4/10 c8d7 636  0.07     4563 c8d7 g4g5 h6g5 c1g5
>> 5/13 c8d8 762  0.17    13572 c8d8 g4g5 f6d7
>> 6/19 c8c7 681  0.71    59228 c8c7 g4g5 h6g5 c1d2 a8b8 d2g5
>> 7/19 c8a6 602  2.45   206288 c8a6 e2a6 c5a6 c1d2 a8b8 mtmt
>> 8/23 c8d8 688  4.37   375249 c8d8 f2f3 a8c8 c1d2
>> 9/25 Tc8d8  508 10.01   855040 c8d8 e1g1 a8c8 g1h2 g8h8 f2f3
>>nps=85410 h/p/q=27.00%/97.00%/0.00% q=80.0% bc=47%
>>br=3.59mp=1921/3040/-2129/-1311
>>pawnx=9340 recapx=5270 qcheckx=0 checkx=10159 qfutilx=224976 onereplyx=272
>>mthrx=246 futilx=0 bmx=0
>>c8d8 e1g1 a8c8 g1h2 g8h8 f2f3 - 10.00/24.60 0% 0/5 bf=2.58
>>h/p/q=27.80%/98.00%/0.00% 50.07 5432343 1086469/10/108499
>>34809/18912/738/120154/1064146/6169/0/2714
>>
>>There is something very intersting here.  You have a large positive score for
>>the queen move.  The best move (according to most programs) is the knight sac,
>>which leads, after a convoluted exchange, to an advantage of less than one pawn.
>> Perhaps you have discovered something interesting here.
>
>Is your score reported in millipawns?  If not, then something does not make
>sense with your scores up above.  Or perhaps I am reading the output wrong.
>
>Interesting that Aristarch like c8d7 for a while:
>
>Analysis from E:\bust.epd
>3/6/2006 8:05:17 PM Level: Infinite
>Analyzing engine: Aristarch 4.50
>
>1) Nxd5;
>    Searching move: Nf6xd5
>    Best move (Aristarch 4.50): Nf6xd5
>    identical moves! Found in: 01:35
>      2	00:00	           2	2	-0.42	f6g4 ? e2g4
>      2	00:00	          38	38	-3.52	f6g4 e2g4
>      2	00:00	          76	76	-3.51	f6e4 !! g3e4
>      2	00:00	         113	113	-3.32	f6e4 g2e4
>      2	00:00	         150	150	-3.31	f6d5 !! e4d5
>      2	00:00	         186	186	-3.11	f6d5 !! e4d5
>      2	00:00	         222	222	-2.85	f6d5 e4d5
>      2	00:00	         268	268	-2.84	a7a5 !! c1h6
>      2	00:00	         303	303	-2.64	a7a5 !! c1h6
>      2	00:00	         341	341	+0.11	a7a5 g3f5
>      2	00:00	         387	387	+0.12	b4b3 !! a2b3
>      2	00:00	         424	424	+0.18	b4b3 g3f5
>      2	00:00	         530	530	+0.19	h7g6 !! g3f5
>      2	00:00	         566	566	+0.24	h7g6 g3f5
>      3	00:00	         705	705	+0.32	h7g6 g3f5 c8d7
>      3	00:00	         903	903	+0.33	c8b7 !! g3f5 a8c8
>      3	00:00	       1.090	1.090	+0.33	c8b7 g4g5 h6g5
>      3	00:00	       1.153	1.153	+0.34	c8d7 !! g3f5 a8c8
>      3	00:00	       1.309	1.309	+0.41	c8d7 g4g5 h6g5
>      4	00:00	       3.046	152.300	+0.08	c8d7 c1d2 a7a5 a1c1
>      4	00:00	       3.233	161.650	+0.09	c8b7 !! g4g5 h6g5 c1g5
>      4	00:00	       3.717	185.850	+0.26	c8b7 e1g1 a8c8 g3f5
>      5	00:00	      10.930	546.500	+0.14	c8b7 f2f4 e5f4 c1f4 a8c8 g3f5
>      5	00:00	      11.895	594.750	+0.15	c8d7 !! c1d2 a7a5 a1c1 a8c8
>      5	00:00	      13.702	456.733	+0.35	c8d7 !! c1d2 a7a5 a1c1 a8c8
>      5	00:00	      18.092	603.066	+0.44	c8d7 c1d2 a7a5 a2a3 d7a4
>      6	00:00	      40.018	666.966	+0.28	c8d7 c1d2 b4b3 e2c4 b3a2 b2b4 d7a4
>      6	00:00	      51.968	649.600	+0.29	c8b7 !! f2f4 e5f4 c1f4 g7g5 f4c1 a8c8
>      6	00:00	      62.322	692.466	+0.40	c8b7 f2f4 e5f4 c1f4 g7g5 f4d2 a8c8
>      7	00:00	     176.309	705.236	-0.02	c8b7 ? h3h4 b7d7 g4g5 f6g4 f2f3 h6g5
>      7	00:00	     188.594	698.496	-0.02	c8b7 h3h4 b4b3 g4g5 f6d7 g5h6 a8c8
>      7	00:00	     195.383	697.796	-0.01	c8d7 !! c1d2 b4b3 e2c4 b3a2 b2b4 d7a4
>b4c5
>      7	00:00	     207.649	692.163	+0.19	c8d7 !! c1d2 b4b3 e2c4 b3a2 b2b4 d7a4
>b4c5
>      7	00:00	     261.244	725.677	+0.43	c8d7 c1d2 a7a5 g3f5 a8c8 a1c1 h7g6
>      7	00:00	     306.316	729.323	+0.44	f6d5 !! e4d5 c5d3 e1d2 d3f4 e2f3 c8c2
>d2e1 f4d3 e1f1
>      7	00:00	     320.513	728.438	+0.64	f6d5 !! e4d5 c5d3 e1d2 d3f4 e2f3 c8c2
>d2e1 f4d3 e1f1
>      7	00:01	     414.511	753.656	+0.97	f6d5 g3f5 h7f5 g4f5 d5f6 c1d2 c8b7 f2f3
>      8	00:01	     516.011	747.842	+0.68	f6d5 g3f5 h7f5 e4f5 c8b7 e2c4 e5e4 g2e4
>c5e4
>      9	00:01	     808.025	784.490	+0.89	f6d5 g3f5 h7f5 e4f5 c8b7 e2c4 e5e4 e1g1
>d5f6 d1e3
>     10	00:02	   1.346.429	826.030	+0.85	f6d5 g3f5 h7f5 e4f5 c8b7 e1g1 a8d8 e2c4
>d5b6 c4b4 d6d5
>     11	00:03	   2.503.074	848.499	+0.67	f6d5 g3f5 h7f5 e4f5 c8b7 e1g1 a8c8 e2c4
>e5e4 g2e4
>     12	00:05	   4.658.176	846.941	+0.25	f6d5 ? g3f5 h7f5 e4f5 c8b7 e2c4 e5e4
>g2e4 c5e4 c4e4 b7b5 d1e3 d5e3 f2e3
>     12	00:06	   5.760.049	853.340	+0.22	f6d5 g3f5 h7f5 e4f5 c8b7 e2c4 e5e4 g2e4
>c5e4 c4e4 a8c8 d1e3 c8c5 e1g1
>     12	00:08	   7.184.824	845.273	+0.23	c8d7 !! g3f5 b4b3
>     12	00:18	  14.912.697	795.343	+0.43	c8d7 !! g3f5 a8c8
>     12	00:29	  22.597.382	779.220	+0.38	c8d7 e1g1 f8c8 b2b3 a7a5 d1b2 e7d8 b2c4
>h6h5 g3f5 h7f5 e4f5 a5a4
>     13	01:12	  56.881.398	790.019	+0.47	c8d7 g4g5 h6g5 c1d2
>     13	01:35	  76.500.639	805.269	+0.48	f6d5 !! e4d5 c5d3 e1d2 d3f4 e2f3 c8c2
>d2e1 f4d3 e1f1
>     13	01:39	  80.309.833	811.210	+0.52	f6d5 g3f5 h7f5 e4f5 c8b7 e1g1 a8d8 f1e1
>b4b3 d1e3 d5f4 g2b7
>     14	02:06	 102.082.343	810.177	+0.72	f6d5 g3f5
>     15	04:43	 225.280.866	796.045	+1.05	f6d5 e4d5
>   3/6/2006 8:15:34 PM, Time for this analysis: 00:05:00, Rated time: 01:35
>
>1 of 1 matching moves
>3/6/2006 8:15:35 PM, Total time: 12:10:18 AM
>Rated time: 01:35 = 95 Seconds


Yes -- all millipawns.

Here are my evaluation settings: Passers get the credit by the
rank squared times a factor related to the attack/defense/occupation
status of the square in front of it. This is from the Chess 4.7
chapter in Frey's book, as is almost all the evaluation function.
I couldn't think of a passed connected value so I use half a pawn (500).

  1,		// PAWN_PASSED_R2 : Passed pawn credit
  1,		// PAWN_PASSED_R3 : Passed pawn credit
  1,		// PAWN_PASSED_R4 : Passed pawn credit
  1,		// PAWN_PASSED_R5 : Passed pawn credit
  1,		// PAWN_PASSED_R6 : Passed pawn credit
  1,		// PAWN_PASSED_R7 : Passed pawn credit
  500,		// PAWN_PASSED_CONNECTED : Passed pawns connected

No credit for advancing pawns on files a, b, or g. Slight negative
for an h-file advance

  0,		// PAWN_ADVANCED_A : Advanced pawn A file
  0,		// PAWN_ADVANCED_B : Advanced pawn B file
  39,		// PAWN_ADVANCED_C : Advanced pawn C file
  54,		// PAWN_ADVANCED_D : Advanced pawn D file
  70,		// PAWN_ADVANCED_E : Advanced pawn E file
  23,		// PAWN_ADVANCED_F : Advanced pawn F file
  0,		// PAWN_ADVANCED_G : Advanced pawn G file
  -2,		// PAWN_ADVANCED_H : Advanced pawn H file

Doubled, isolated are fairly heavy penalties.

  -80,		// PAWN_DOUBLED : Doubled pawn penalty (anywhere on board)
  -200,		// PAWN_ISOLATED : Isolated pawn penalty (anywhere on board)

Weak pawns (lite and very) are based on Bob Hyatt's recent comments. I didn't
know what to score them so I just picked 1/100th and 1/50th of a pawn.

  -10,		// PAWN_WEAK_LITE : Not defended and square in front is attacked by 1 gt
defended
  -20,		// PAWN_WEAK_VERY : Not defended and square in front is attacked by >1
gt defended

Attacking a weak pawn gets a small credit.

  7,		// PAWN_WEAK_ATTACK : Attacks on a weak pawn

The next three I believe are all from Crafty by way of GNU but I don't know
if the values of -1/10th of a pawn are too small or too big.
  -100,		// PAWN_EIGHT : Still eight pawns remaining on computer's side
  -100,		// PAWN_STONEWALL : Fight people using stonewall
  -100,         // PAWN_LOCKED : Locked pawns in the center and extended center

This is the multiplier for knight tropism. Just like Chess 4.7

  16,		// KNIGHT_CENTER_TROPISM : Multiplier for center tropism
6-2*(4.5-r+4.5-f)

Penalties for undevelopment of minors are the same.

  -94,		// KNIGHT_UNDEV : Penalty per undeveloped knight anywhere on back rank
  -110,		// BISHOP_UNDEV : Penalty per undeveloped bishop anywhere on back rank

Likewise bishop square control. This is a multiplier that if 1 simply keeps
the same value as Chess 4.7.

  1,		// BISHOP_SQUARE_CONTROL : Bonus per bishop-attacked non-friendly-pawn
square

This is from GNU. I made knights and bishops 3250 and 3250 instead of
Chess 4.7's 3250 and 3500 because (really 325 and 350 since 4.7
was centipawn) because I think the bishop pair is very valuable together
but not so useful if the other side has a bishop.

  180,		// BISHOP_PAIR : Advantage of the bishop pair (B+B) against no bishops

The obvious for rooks

  16,		// ROOK_SQUARE_CONTROL : Bonus per rook-attacked square
  -16,		// ROOK_KING_TROPISM : Penalty for distance to least of enemy king
file/column
  80,		// ROOK_DOUBLING : Bonus for attacking a friendly rook
  220,		// ROOK_SEVENTH : Bonus for each rook on seventh
  80,		// ROOK_OPENFILE : Bonus for rook on open file
  30,		// ROOK_SEMIOPENFILE : Bonus for rook on semi-open file
  -400,		// QUEEN_FORAGING : Queen moving in opening

Still more 4.7 stuff for Queen's

  -8,		// QUEEN_KING_TROPISM : Queen tropism to king as function of minimum of
taxicab f/r
  8,		// QUEEN_SQUARE_CONTROL : Credit for each un-enemy-attacked
my-queen-controlled sq
  -250,		// QUEEN_ABSENT : Queen is absent

King safety is identical to 4.7 as well, including the simplified mopup
algorithm of 4.7. These are for the main king safety.

  -23,		// KING_CORNERED : King cornered in endgame
  -12,		// KING_ATTACKED : Enemy king adjacent square attackers
  -31,		// KING_NOSANCTUARY : Friendly king not in sanctuary
  -78,		// KING_PAWNAFFINITY : Friendly king affinity for center of all pawns in
endgame
  -31,		// KING_BARE : Friendly king has no friendly pawns or pieces next to it
  -16,		// KING_NEARLYBARE : Friendly king has only one friendly pawn or piece
next to it
  -41,		// KING_NUDE : Friendly king has no pawn on same file
  -36,		// KING_NUDER : Friendly king has no pawn on at least one neighbor file
  -8,		// KING_LUFT : Friendly king has no luft on 2nd rank

Hung pieces are a little different. 4.7 sets to -16 for one and if more than
the worst positional evaluation so far for the side in the search. I can add
this when my minposnscore[2] array is maintained accurately and its extreme
sizes bug discovered. minposnscore isn't used right now.

  -16,		// HUNG : Hung pieces require tempi to safety (defend, move, ignore,
etc.)

A small flat credit for mobility, all pieces. This is not 4.7 either.

  4		// MOBILITY : Mobility bonus for pseudo-legal moves at terminal nodes

Stuart



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.