Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: please answer this question too!

Author: Vasik Rajlich

Date: 02:24:53 03/24/04

Go up one level in this thread


On March 23, 2004 at 15:01:11, Mridul Muralidharan wrote:

>On March 23, 2004 at 13:40:40, Vasik Rajlich wrote:
>
>>On March 23, 2004 at 12:45:39, Joachim Rang wrote:
>>
>>>On March 23, 2004 at 12:38:29, martin fierz wrote:
>>>
>>>>On March 23, 2004 at 12:22:16, Tord Romstad wrote:
>>>>
>>>>>On March 23, 2004 at 11:31:18, martin fierz wrote:
>>>>>
>>>>>>On March 23, 2004 at 10:14:05, Tord Romstad wrote:
>>>>>>
>>>>>>>One of the really embarassing things about Gothmog's eval of this position
>>>>>>>is that it doesn't even consider the bishop on g1 to be a bad biship.  My
>>>>>>>bad bishop eval is based on the number of *blocked* pawns on squares of the
>>>>>>>bishop's colour.  In the position we discuss, there are only two such pawns
>>>>>>>(on e3 and g3).  Therefore Gothmog thinks that the g1 bishop isn't really
>>>>>>>that bad.  It has limited mobility, but it should be easy to relocate it
>>>>>>>to a better square.
>>>>>>
>>>>>>perhaps you should change your definition a bit. the pawn on f2 is virtually
>>>>>>blocked too, and the pawn on c4 is rather blocked and with it the one on c3. in
>>>>>>any case, the f2-pawn should be recognizable as blocked.
>>>>>>to evaluate my bishops, i use a sum of c1*(blocked pawns on that color) +
>>>>>>c2*(unblocked pawns on that color). i think that is a better way of doing it.
>>>>>>still it's not good, because as said, the g1-bishop would be just fine on a3 or
>>>>>>on f4.
>>>>>
>>>>>Thanks for the suggestions.  You are probably right, I should have a look
>>>>>at my bad bishop code.
>>>>
>>>>an interesting idea posted here lately (don't remember by who - sorry) was to
>>>>look in the forward direction of the bishop and see whether it hits own pawns.
>>>>like this, a bishop on a3/f4 in your position gets no penalty, but a bishop on
>>>>g1 does. obviously, this criterion alone is not too useful either, but it may be
>>>>an ingredient.
>>>>
>>>>>>>As so often, Gothmog's eval proves to be the worst of them all.
>>>>>>no!!! as i said you asked the wrong question! you didn't even answer the right
>>>>>>question yourself, and all others won't answer it either as i know them... the
>>>>>>right question is:
>>>>>>
>>>>>>***************************************************************
>>>>>>"please give me your static eval with bishop on g1, c1 and a3".
>>>>>>***************************************************************
>>>>>>
>>>>>>my answer is "-0.49 (g1), -0.51(c1), -0.35(a3)."
>>>>>
>>>>>... and my answer is "+0.24 (g1), +0.18 (c1), +0.31 (a3)".
>>>>>
>>>>>>as you can see, my answer is always about the same, and for example ridiculous
>>>>>>in that g1 is preferred over c1 (reason: the rook's mobility is smaller for
>>>>>>Bc1).
>>>>>
>>>>>Same thing here, as you can see from my numbers.
>>>>>
>>>>>>i will bet another beer (you owe me one IIRC)
>>>>>
>>>>>I do.  :-)
>>>>>
>>>>>>that most of the people who
>>>>>>answered your post (and of who you think they are evaluating this better) have
>>>>>>similar problems. e.g. the position with the bishop on c1/a3 is roughly equal
>>>>>>(well, with the Ba3 you in fact immediately win a pawn, but just philosophically
>>>>>>speaking, white has little to fear with a pawn for the exchange and the bishop
>>>>>>pair) and all those guys who gave a big negative score for white will still be
>>>>>>giving a big negative score for white (because nobody is realizing that the
>>>>>>g1-bishop is the big problem, they just think exchange=2 pawns), and gothmog's
>>>>>>eval will be the superior one.
>>>>>
>>>>>Do you think that white has the advantage with the bishop at c1?
>>>>
>>>>no. i think the position is equal. there is nothing black can do do improve as
>>>>far as i can see; i.e. there are 3 things he can try:
>>>>-> return the exchange by capturing c4 at some point
>>>>-> play d5 at some point
>>>>-> play a6-b5 at some point
>>>>
>>>>i don't believe in the pawn breaks, you remove white's weak pawn on c4, open up
>>>>the position for the bishops and still have no clear plan. that leaves the first
>>>>possibility, but then it's not too clear either. specially if you already have
>>>>the bishop on a3 black must also look out for his own weakness on d6. so i think
>>>>black does best doing nothing, and white has no active plan either that i can
>>>>see, so it's a draw.
>>>>
>>>>i thought you were unhappy with your evaluation because you were +0.2 while
>>>>others were -1.0, which is of course looking bad for you when you have the
>>>>bishop on g1, then the others are much better. but with the bishop on c1, the
>>>>correct eval is probably about 0, and then your +0.2 are better than the -1.0 of
>>>>the others. that's why i said you should be feeling better now. not about the
>>>>position with the bishop on g1 of course, but in general - gothmog seems to be
>>>>closer to the truth (according to me) than the others.
>>>>
>>>Shredder 8 manages both:
>>>
>>>it gives -0.2 for the bishop on c1 and -1.4 for the bishop on g1. Don't ask me
>>>how SMK has solved this.
>>>
>>>regards Joachim
>>>
>>>
>>>>cheers
>>>>  martin
>>>>
>>>>
>>>>PS:
>>>>>Exchange=1.75 pawns in Gothmog, by the way.
>>>>better than 2.0 :-)
>>
>>True. You can often evaluate badly and correctly. It's also important not to get
>>hung up on fixing one position - same as with changing your search to solve some
>>testsuite position. Some things are just beyond the scope of what your
>>evaluation should be doing.
>>
>>Re. material values, for what it's worth here is my messy code for scoring
>>material. These values are pre-computed, and put into a "material lookup table".
>>Rybka would evaluate the material here as roughly equal - due to the bishop
>>pair, and # of pawns which congests the rook pair.
>>
>>Vas
>>
>>// Responsible for setting the weight (from white point of view) of an imbalance
>>specified by
>>// an MLT index.
>>// Applies the three-pass procedure which is also used to set parameters at the
>>leaf node:
>>// 1) Score according to piece weights.
>>// 2) Score according to material imbalance.
>>// 3) Score according to (potential) simplified ending.
>>void MLTI::Calc_Weight (int MLT_index, char *out_base, char *out_pawn)
>>{
>>	int wh_n, wh_r, wh_q, wh_b;
>>	int bl_n, bl_r, bl_q, bl_b;
>>	Get (MLT_index, wh_n, bl_n, wh_b, bl_b, wh_r, bl_r, wh_q, bl_q);
>>
>>	// stage 1: score each piece according to its special weight (currently not
>>used)
>>
>>	// stage 2: score imbalance
>>
>>	// score each piece separately according to generic weights
>>
>>	// Basic values:
>>	//		N: 3.25 pawns	B: 3.25 pawns	B pair: 0.50 pawns	R: 5 pawns	Q: 9.75 pawns
>>	// Pawn density:
>>	//		1/16 pawn extra for N for each pawn above 5 (or -1/16 for below)
>>	//		1/8 pawn extra for R for each pawn below 5 (or -1/8 for above)
>>	// Very small bishop v knight bonuses : (note: no additional bonuses for these
>>imbalances, only simple ending)
>>	//		BN v NN with nothing else: 1/8 pawn
>>	//		RB v RN, or RRB v RRN: 1/8 pawn
>>	//		QB v QN: -1/16 pawn
>>	// Piece vs pawns:
>>	//		The presence of move overall material increases value of a piece
>>	//		In endgame B+p v p, B == 2.5 pawns
>>	//		In endgame N+p v p, N == <2.5 pawns (2.4 pawns)
>>	// R v minor(s):
>>	//		Very favorable for rook to trade other majors
>>	//		R v one minor:	0.2 pawn penalty when all other majors remain
>>	//						0.2 pawn bonus when all other majors traded
>>	//		R v two majors:	0.3 pawn penalty when all other majors remain
>>	//						0.3 pawn bonus when all other majors traded
>>	//		Bishop pair increases slighly in value when fighting against the
>>	//		rook, to 0.6 pawns
>>	// Q v R+minor:
>>	//		Slightly favorable for queen to trade remaining rook pair
>>	//			0.1 pawn penalty when other rook pair remains
>>	//			0.1 pawn bonus when other rook pair is traded
>>	//		Bishop pair value is again bumped up to 0.6 pawns
>>	// Q vs minors
>>	//		Bishop pair value is again bumped up to 0.6 pawns
>>
>>	//	Pawn density bonuses:	for each white rook,	+128 to base,	-2 (ie -2/32 of a
>>pawn, for each pawn above 8 total)
>>	//							for each white knight,	-64 to base,	+1 (ie 1/32 of a pawn, for each
>>pawn above 8 total)
>>
>>	int base = 0;
>>	int pawn = 0;
>>
>>	// Basic piece values & pawn densities
>>	base += (wh_n * ( 250 - 64 ));
>>	pawn += (wh_n * ( 1 ));
>>	base -= (bl_n * ( 250 - 64 ));
>>	pawn -= (bl_n * ( 1 ));
>>
>>	base += (wh_b * ( 250 ));
>>	base -= (bl_b * ( 250 ));
>>
>>	base += (wh_r * ( 0 + 128 ));
>>	pawn += (wh_r * ( -2 ));
>>	base -= (bl_r * ( 0 + 128 ));
>>	pawn -= (bl_r * ( -2 ));
>>
>>	base += (wh_q * ( 750 ));
>>	base -= (bl_q * ( 750 ));
>>
>>	// bishop pair bonuses
>>	if (wh_b >= 2) base += 500;
>>	if (bl_b >= 2) base -= 500;
>>
>>	// Small bonuses for bishop v knight
>>	SimpleEnding simple_ending = Get_SimpleEnding ();
>>	if (simple_ending == KBN_v_KNN) base += 128;
>>	if (simple_ending == KNN_v_KBN) base -= 128;
>>	if (simple_ending == KRB_v_KRN) base += 128;
>>	if (simple_ending == KRN_v_KRB) base -= 128;
>>	if (simple_ending == KRRB_v_KRRN) base += 128;
>>	if (simple_ending == KRRN_v_KRRB) base -= 128;
>>	if (simple_ending == KQB_v_KQN) base -= 64;
>>	if (simple_ending == KQN_v_KQB) base += 64;
>>
>>	// Piece vs pawns, give bonus to amount of material on the board
>>	int total_material = Get_MaterialTotal (MLT_index); // -128 to 128
>>	MaterialImbalance material_imbalance = Get_MaterialImbalance ();
>>	if ((material_imbalance == B_v_ppp) || (material_imbalance == N_v_ppp))
>>		base += (total_material * 4); // bonus of up to 512
>>	if ((material_imbalance == ppp_v_B) || (material_imbalance == ppp_v_N))
>>		base -= (total_material * 4); // bonus of up to 512
>>	// in the case of simple minor vs pawns endings, overwrite the previous values
>>	if (simple_ending == KB_v_K) base = -500; // this is a bit skewed by lines
>>which were played to force a draw, an intelligent analysis should be done to get
>>the right value
>>	if (simple_ending == KN_v_K) base = -600;
>>	if (simple_ending == K_v_KB) base = 500;
>>	if (simple_ending == K_v_KN) base = 600;
>>
>>	// increase bishop pair bonus by 0.1 pawns when fighting against a rook or
>>queen
>>	if (((wh_r < bl_r) || (wh_q < bl_q)) && (wh_b >= 2) && (bl_b <= 1))
>>		base += 100;
>>	if (((wh_r > bl_r) || (wh_q > bl_q)) && (wh_b <= 1) && (bl_b >= 2))
>>		base -= 100;
>>
>>	int major_pairs = __min (wh_r, bl_r) + __min (wh_q, bl_q);
>>
>>	// bonus of 0.2 pawns to rook vs one minor piece for trading other major pieces
>>	if ((material_imbalance == R_v_Npp) || (material_imbalance == R_v_Bpp))
>>		base -= ((major_pairs - 1) * 200);
>>	if ((material_imbalance == Npp_v_R) || (material_imbalance == Bpp_v_R))
>>		base += ((major_pairs - 1) * 200);
>>
>>	// bonus of 0.3 pawns to rook vs two minor pieces for trading other major
>>pieces
>>	if ((material_imbalance == Rp_v_BB) || (material_imbalance == Rp_v_BN) ||
>>(material_imbalance == Rp_v_NN))
>>		base -= ((major_pairs - 1) * 300);
>>	if ((material_imbalance == BB_v_Rp) || (material_imbalance == BN_v_Rp) ||
>>(material_imbalance == NN_v_Rp))
>>		base += ((major_pairs - 1) * 300);
>>
>>	// bonus of 0.1 pawns for queen fighting against rook and minor for trading
>>remaining rook pair (0.1 pawn penalty for now doing so)
>>	if ((material_imbalance == Q_v_RBpp) || (material_imbalance == Q_v_RNpp))
>>		base -= ((major_pairs * 200) - 100);
>>	if ((material_imbalance == RBpp_v_Q) || (material_imbalance == RNpp_v_Q))
>>		base += ((major_pairs * 200) - 100);
>>
>>	// stage 3: according to simplified endings (currently not used)
>>
>>	// convert to units of 32 rather than 1000
>>	base = (base * 32) / 1000;
>>
>>	*out_base = char (base);
>>	*out_pawn = char (pawn);
>>}
>
>
>I have very similar code and the idea for which I got from :
>http://mywebpages.comcast.net/danheisman/Articles/evaluation_of_material_imbalance.htm
>
>But till now , I have not added all the required imbalances yet ....
>Interesting how all masters think alike :)
>
>Mridul

Yes, that was a very good source of information.

Another one was "Secrets of Modern Chess Strategy", by Watson. He gives some
interesting data for the endgame QN v QB, and B v N in general. B v N is
probably the most important for a chess program, these decisions are made all
the time.

Vas



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.