Page 1 of 1

how do you write a good king safety with bitboards?

PostPosted: 23 Mar 2008, 18:10
by Antonio R.
Hi all,
I wrote a couple of years ago a chess engine. It used a 16x16 board and in the evaluation function I used 8 bit attack tables in order to write a complex king safety and safe mobility evaluation.
Now I am thinking to write a new engine, using bitboards. I have seen that most of todays top programs are bitboard based (rybka, zappa, new fruit and strelka) and according to what I've read, it seems that their king safety evaluation is not very complex, a rather basic one.
So, in your opinion, do you think that to write a top engine you don't need to have a very complex king safety or mobility evaluation? I used attack tables for everything: mobility, king safety, pinned pieces, trapped pieces, squares in front of passed pawns, etc... Do you think it was a waste?

Re: how do you write a good king safety with bitboards?

PostPosted: 23 Mar 2008, 18:42
by Aleks Peshkov
Top open source programs are similar to each other. Their Elo superiority does not prove that they doing things the best way.

Re: how do you write a good king safety with bitboards?

PostPosted: 24 Mar 2008, 14:13
by Ron Murawski
Hi Antonio,

Welcome back!

For king safety you can use pre-calculated bitboards of squares that are one-away and two-away from the king to detect nearby enemy pieces. You might also might want queen-ray bitboards to pick up checks/pins by enemy sliding pieces. I can't think of any other king safety bitboards.

Ron

Re: how do you write a good king safety with bitboards?

PostPosted: 25 Mar 2008, 08:14
by H.G.Muller
Is Fruit bitboard?

Re: how do you write a good king safety with bitboards?

PostPosted: 26 Mar 2008, 01:01
by Pedro Castro
The latest versions yes, they are bitboards, for example 2.3.1 and above, but they are private.

Re: how do you write a good king safety with bitboards?

PostPosted: 27 Mar 2008, 10:02
by Tord Romstad
Pedro Castro wrote:The latest versions yes, they are bitboards, for example 2.3.1 and above, but they are private.

This is almost, but not quite correct. Fruit 2.3.1 does not use bitboards, but later 2.3.x versions do.

Tord

Re: how do you write a good king safety with bitboards?

PostPosted: 28 Mar 2008, 23:24
by Uri Blass
Antonio R. wrote:Hi all,
I wrote a couple of years ago a chess engine. It used a 16x16 board and in the evaluation function I used 8 bit attack tables in order to write a complex king safety and safe mobility evaluation.
Now I am thinking to write a new engine, using bitboards. I have seen that most of todays top programs are bitboard based (rybka, zappa, new fruit and strelka) and according to what I've read, it seems that their king safety evaluation is not very complex, a rather basic one.
So, in your opinion, do you think that to write a top engine you don't need to have a very complex king safety or mobility evaluation? I used attack tables for everything: mobility, king safety, pinned pieces, trapped pieces, squares in front of passed pawns, etc... Do you think it was a waste?


I think that you do not need to have a very complex evaluation to write
a top engine(assuming you consider rybka to be a top engine)

It does not mean that very complex evaluation cannot help to have significantly stronger engine than rybka.

I think that it is not a good idea to spend time on complex evaluation unless your engine is not significantly weaker than rybka.

Uri