Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: how to detect information about pawn structure based on bitboard

Author: JW de Kort

Date: 03:46:33 12/17/02

Go up one level in this thread


On December 17, 2002 at 06:44:52, Uri Blass wrote:

>On December 17, 2002 at 06:28:31, JW de Kort wrote:
>
>>On December 17, 2002 at 05:57:55, Uri Blass wrote:
>>
>>>On December 17, 2002 at 05:46:29, JW de Kort wrote:
>>>
>>>>On December 17, 2002 at 04:46:16, Uri Blass wrote:
>>>>
>>>>>On December 17, 2002 at 04:27:48, JW de Kort wrote:
>>>>>
>>>>>>On December 17, 2002 at 03:40:11, Uri Blass wrote:
>>>>>>
>>>>>>>I think to add to my program bitboard that will be used only for pawn structure.
>>>>>>>
>>>>>>>2 numbers of 64 bits that are used for white pawns and for black pawns.
>>>>>>>
>>>>>>>I want to detect based on these bitboards a lot of information about every pawn
>>>>>>>and I may want to use the information together with attack tables for
>>>>>>>evaluation.
>>>>>>>
>>>>>>>My question is if using bitboard is a good idea to get the information and
>>>>>>>if the answer is positive how can I detect the information by bitboards
>>>>>>>
>>>>>>>For every pawn I want to detect the following:
>>>>>>>
>>>>>>>1)Is it a weak pawn(a pawn that can never be defended by a pawn and cannot go
>>>>>>>forward to promote without captures and without the risk of being captured by a
>>>>>>>pawn)
>>>>>>>2)Is it probably weak pawn(it means that the only way to defend it by a pawn is
>>>>>>>by capturing the opponent pawn or by letting the opponent to capture the
>>>>>>>potential defender by a pawn).
>>>>>>>
>>>>>>>3)Is it a pawn that is defended by a pawn and if not how many normal pawn moves
>>>>>>>that are not captures and do not let the opponent to capture by a pawn are
>>>>>>>needed to defend it by a pawn.
>>>>>>>
>>>>>>>4)Is it a passed pawn and if it is a passed pawn how many normal pawn moves are
>>>>>>>needed to defend it by a pawn.
>>>>>>>
>>>>>>>5)Is it a potential passed pawn(is the only way of the opponent to stop it is by
>>>>>>>letting the player to have another passed pawn)
>>>>>>>In case that it is a potential passed pawn the question is if it can be done by
>>>>>>>normal means or the only way to make it a passed pawn is by sacrifices
>>>>>>>
>>>>>>>Uri
>>>>>>
>>>>>>Dear Uri,
>>>>>>
>>>>>>I do this in my 0x88 based program: i use bitboards to do the pawn evaluation.
>>>>>>This evaluation is only on a very basic level but the topics you mention is
>>>>>>covered. I found out that by bitboard it is far easier and quicker to check
>>>>>>whether a pawn is passed or not but i think this is commom knowledge. I found
>>>>>>the source of Crafty very informative.
>>>>>>
>>>>>>regards
>>>>>>
>>>>>>Jan Willem
>>>>>
>>>>>1)This seems to be not very basic level.
>>>>>
>>>>>In the match steve ham against computers Nimzo7.32 could not evaluate correctly
>>>>>a black passed pawn at c3 that could not be protected by a pawn and gave it a
>>>>>big bonus.
>>>>>
>>>>>If even Nimzo7.32(that is at the level of the top amateurs) could not evaluate
>>>>>it then it means that it is not a basic evaluation because I expect nimzo7.32 to
>>>>>know at least everything that is very basic level.
>>>>>
>>>>>I guess that big majority of the chess programs do not have this information
>>>>>because most amateurs have less knowledge than nimzo7.32(movei of today even
>>>>>does not evaluate passed pawns).
>>>>>
>>>>
>>>>
>>>>
>>>>I'am afraid my response was not completely clea at this point or maybe i got
>>>>your question not right. M<y progrma can tell if a pawn if passed atc. by using
>>>>bitboards but iám not to say that it is evaluated correctly. My engine is very
>>>>weak at the moment and one of the problems is the wrong evaluation of these
>>>>features. I understood your question as; how to detect these things. Iám sorry
>>>>if i under estimated you. (I wonderde why you asked this question to be honest).
>>>>By 'basic' i mean that an evaluationfunction coveres all the aspectes that are
>>>>already in the function of CHESS 4.5.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>2)Where did you look at crafty source code to find the relevant information that
>>>>>helped you?
>>>>
>>>>I took a close look in the evaluationfunction where the pawns are evalutaed. But
>>>>i think it is not to hard to understand this. e.g if you want to know if a pawn
>>>>is passed you can do a logical AND with the bitboard of all opposite pawns and
>>>>an bitboard giving all the squares that must be empty for the pawn to be passed.
>>>>(Again i appologize if this information is not what you are looking for).
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>
>>>>>Note that I plan to use the information for the evaluation but it does not mean
>>>>>that this information will give me the evaluation because I want to evaluate
>>>>>weak pawn that is attacked by the opponent as less than weak pawn that is not
>>>>>attacked  by the opponent so I may use my attack tables.
>>>>>
>>>>>3)What is the level of your program?
>>>>>
>>>>
>>>>
>>>>
>>>>Not very good i'am afraid. The evaluationfunction does know almost all the
>>>>features of CHESS 4.5 like passed pawns, backwardspawns, very backwardspawns,
>>>>doubled rooks, rooks and quens on seventh rank, kin safety, caslte bonus for
>>>>being casteld and a malus for not being so, king tropism, center tropism,
>>>>placement of pieces like near the centre and on safe squares etc. but these
>>>>features are at the moment so badly tuned that my program is willing to open up
>>>>his king defence to advance his pawns. But again this is only for starters,
>>>>since it can play under winboard iám planning to make it stronger. My main
>>>>concern however is the speed, or better the lack of it. I saw it beat BEOWULF
>>>>once but i saw it beaten by BEOWULF about twenty times. It largely depends on
>>>>the opening my progrma plays if it can give some resistance.
>>>
>>>My programs knows almost nothing about it but it is clearly better than programs
>>>like Gerbil.
>>>
>>>My question is what is the level of your program relative to other chess
>>>programs.
>>>
>>>Uri
>>
>>Dear Uri,
>>
>>
>>I have never let it play agains Gerbil, but i will do that soon. I had it play
>>against Fritz 6 with the obvious result. It plays about 50-50 agains TCSP (or is
>>it TSCP i'am not sure) but i do not like this program to test is againt (but is
>>very usefull to get information from) because it always plays the same moves. My
>>progrma uses a large openingbook wich contains gambits and if my program plays a
>>gambit it is a sure loss because the lost pawn will never be retrieved and my
>>progrma does not know how to exploid the possitional advantages. Agains BEOWULF
>>it plays better then i expected but it also most of the time loses but i have
>>seen it a few times. The problem with my progrma is that the evalutaion function
>>is not tuned and i hope to find time to work on it.
>>
>>So i would say my engine is relatively weak but i think -or hope- it has
>>potential to grow.
>>
>>Greetings JWK
>
>I think that the problem with your program is that you worked on the wrong
>direction.
>
>search is clearly more important than evaluation.
>
>If it is often losing against tscp after playing gambit lines then it means that
>something is wrong with it's search.
>
>I also believe that the way to work on evaluation is not to implement a lot of
>things in the evaluation but to add one thing and to test if there is an
>improvement or if you do not expect a big improvement to test to verify that
>there is not a big regression.
>
>I test my program often against gerbil in 1 second/game,...10 seconds/game when
>my program use no book and always change the first move.
>
>The last result that was the best so far is 275-125 for movei.
>at 5 minutes per game I got with an older version 32-5 and 3 draws
>so I believe that the gap between movei and gerbil is bigger at longer time
>control.
>
>Note that Movei may play stupid gambits like 1.e4 f5 in the conditions that I
>test but it simply has better search and evaluation than gerbil and these
>factors dominate.
>
>Uri



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.