So Happy ;)

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

Moderator: Andres Valverde

So Happy ;)

Postby NaltaP312 » 15 Sep 2009, 21:06

Hello everyone,

just a topic to say than i have finally found with koggestone algorithm and some precomputed array a good way for isPinned functions.
With this fen string 2k3r1/8/8/8/6N1/4b3/7Q/q3B1K1 w - - 0 1 my engine found the rights moves.
1 : The white king on g1 move to f1

2 : The white king on g1 move to h1

3 : The white king on g1 move to g2

4 : The white queen on h2 move to f2

This with koggestone algorithm orthogonalMove and diagonalMove and a precomputed table than indicate
the direction between two squares indexed by from and to square.

May be it is a little for some great guys ;) but for me, i just share my happiness.

Really, koggestone is wonderfull.

A wonderful website to visualize fen position
http://www.dhtmlgoodies.com/scripts/che ... fen-3.html

Best Regards
NaltaP
User avatar
NaltaP312
 
Posts: 13
Joined: 02 Jun 2009, 19:24

Re: So Happy ;)

Postby Gerd Isenberg » 18 Sep 2009, 22:57

Fine you like Kogge-Stone that much ;-)
It is really a great algorithm.

Another way to detect pinned pieces, discovered checker, or in case of distant sliding check the king-slider-in-between squares, is to treat the king as bishop/rook for all the orthogonal/diagonal rays, and intersect them with the complement direction attacks of opposite bishops/rooks/queen. The set of queen like attacks from the king-square might also be used to look for distant checks, and in king-safety evaluation.

Cheers,
Gerd
Gerd Isenberg
 
Posts: 285
Joined: 31 Jan 2005, 20:31
Location: Hattingen, Germany

Re: So Happy ;)

Postby NaltaP312 » 20 Sep 2009, 21:03

Hello Gerd,

thanks for you reply.
I do not think the development of a chess engine would give me much satisfaction.
It is very difficult, for me, but each time i see a progress it is the new way.

Now i will try to develop my chess knowledge for king safety and i will try to implement it in my chess engine.
May be i will start to play endgame with it : more simple to debug too.

Ikeep trust and continue this adventure ;)
Thanks again for all your help and participation in this forum.

Best regards
NaltaP
User avatar
NaltaP312
 
Posts: 13
Joined: 02 Jun 2009, 19:24

Re: So Happy ;)

Postby zteve » 25 Oct 2009, 15:53

The way i solved the pinned piece scenario was using a copy a the board ad playing all the moves possible and finding out if the king was in check then the moves were reversed.

Then the move that placed the king in check wasn't placed in the list of moves.

Probably a totally round about method but it works :D
zteve
 
Posts: 10
Joined: 09 Oct 2009, 16:28


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 19 guests