Page 1 of 1

So Happy ;)

PostPosted: 15 Sep 2009, 21:06
by NaltaP312
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

Re: So Happy ;)

PostPosted: 18 Sep 2009, 22:57
by Gerd Isenberg
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

Re: So Happy ;)

PostPosted: 20 Sep 2009, 21:03
by NaltaP312
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

Re: So Happy ;)

PostPosted: 25 Oct 2009, 15:53
by zteve
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