Author: Tony Werten
Date: 06:07:35 10/19/00
Go up one level in this thread
On October 19, 2000 at 06:02:33, Rafael Andrist wrote: >On October 19, 2000 at 05:36:14, Tony Werten wrote: > >>On October 19, 2000 at 03:12:43, Rafael Andrist wrote: >> >>>I'm actually writing a little chess program and want to detect pinned pieces in >>>the evaluation function because i do calculations, how often a piece is attacked >>>and "defended". If it's now attacked by 3 and defended by 3, but one of them is >>>pinned, the search needs 5 or 6 ply to detect the pinned piece. Has someone an >>>idea how to solve this problem in eval or is it only possible in search? >> >>After the normal search, you do a quiscence search, ie only capturing moves (and >>the abbility to stop and accept the current score). This search takes care of >>your problem, since the pinned piece will not recapture. >> >>Tony > >I know how this problem is solved in search. But my question was, if it is >possible to do this in the position evaluation. Ok. That makes it a bit harder. Depends a bit on your implementation. I use 0x88, and then you have the direction from wich a piece is attacked. Check to see if the piece that's attacked, himself attacks the king in the same direction. Or, probabely better. Regard your king as a queen and see wich pieces you defend. These pieces can be pinned if they are attacked in the opposite direction. cheers, Tony
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.