how do you write a good king safety with bitboards?

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

how do you write a good king safety with bitboards?

Postby Antonio R. » 23 Mar 2008, 18:10

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?
Antonio R.
 
Posts: 1
Joined: 23 Mar 2008, 18:01

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

Postby Aleks Peshkov » 23 Mar 2008, 18:42

Top open source programs are similar to each other. Their Elo superiority does not prove that they doing things the best way.
Aleks Peshkov
 
Posts: 27
Joined: 13 Jul 2007, 13:14

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

Postby Ron Murawski » 24 Mar 2008, 14:13

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
User avatar
Ron Murawski
 
Posts: 352
Joined: 26 Sep 2004, 21:50
Location: Schenectady, NY, USA

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

Postby H.G.Muller » 25 Mar 2008, 08:14

Is Fruit bitboard?
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

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

Postby Pedro Castro » 26 Mar 2008, 01:01

The latest versions yes, they are bitboards, for example 2.3.1 and above, but they are private.
Best wishes,

Pedro Castro
User avatar
Pedro Castro
 
Posts: 180
Joined: 28 Jan 2005, 01:09
Location: Pays Basque (Spain)

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

Postby Tord Romstad » 27 Mar 2008, 10:02

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
User avatar
Tord Romstad
 
Posts: 639
Joined: 09 Oct 2004, 12:49
Location: Oslo, Norway

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

Postby Uri Blass » 28 Mar 2008, 23:24

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
User avatar
Uri Blass
 
Posts: 727
Joined: 09 Oct 2004, 05:59
Location: Tel-Aviv


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 49 guests