Author: Tord Romstad
Date: 11:39:58 11/20/03
Go up one level in this thread
On November 20, 2003 at 04:14:58, Tony Werten wrote: >On November 19, 2003 at 08:33:58, Tord Romstad wrote: > >>On November 19, 2003 at 03:12:35, Tony Werten wrote: >> >>> >>>Basicly, I consider every xray attack as a direct attack by a queen :) Works >>>pretty well. >> >>Really? This is very surprising to me. I consider xray attacks as >>direct attacks by the most valuable piece of the piece which emits >>the X-ray and the piece the ray is radiating through. It seems to me >>that counting all xray attacks as queen attacks would cause too many >>inaccuracies. Have you tried both approaches? > >No, I prefer to slam in my code without any testing. ( Nasty remark off ) > >Serious though, off course it's more inaccurate, but it's also easier. It's a >trade off. I don't see how it is easier, but if you say so I'll accept that the increased inaccuracy is small enough that it doesn't matter much. >>Another problem with X-rays is that they make static mate detection much >>more tricky. If black's king is on g8, the square g7 is not defended >>by any black piece except the king, and a white queen and bishop >>attacks g7, I would like to conclude that white has a mate in 1 by Qxg7. >>Unfortunately this is not necessarily true, because it is possible that >>the queen attack on g7 is just an X-ray attack. And even if the queen >>attack is *not* an X-ray, I cannot be entirely sure that Qxg7 is mate, >>because it is possible that black has an "X-ray-defence" of g7 through >>the white queen (e.g. if white has Bf6 and Qg5, and black has Kg8, Pg7 >>and Qg1). Although attack tables speed up static mate detection, I have >>not found any reliable way to do it without doing some ray tracing. > >Sorry, I was a bit unclear about that. I actually have direct queen attacks ( >normal ) and "just queen attacks" ( xray ) My static mate detection needs a >direct queen to checkmate. > >But anyway, I was talking about see, not static mate detection. For see there is >no difference. I see. >>>Another difference is that I enumerate the bytes wich give the attack/defend >>>status. Ed uses 0..255 but that's not nescessairy. ie P attacks and N attacks >>>but the piececount=1 or 0 is impossible. You can get the numbers down to 64. >>> >>>So my SEE_TABLE has [0..3,0..63,0..63] elements = 16 K >>> >>>and my SEE_MOVE_TABLE has [0..5,0..63,0..63] elements = 24 K >>> >>>A conversation with Gian Carlo made clear that it's possible to half this but I >>>couldn't be bothered with the work it needs. The time is spend in generating the >>>attacktables, not in the lookup_tables >> >>I can see how you can reduce the range a bit from 0..255, but not how it >>is possible to get as low as 0..63. How do you achieve this? Is it >>possible without sacrificing accuracy? > >Of course, but how often will you go wrong if you consider attacks by 5,6,7,8 >queens the same as 4 queens ? More often than you will go wrong with pinned >pieces ? I have now done some experiments with this myself. I first played several test games with a special version of my engine which collected statistics about the frequencies of the various 8-bit patterns. Based on the frequencies found, I made a new, more compact SEE table including only the 64 most common 8-bit patterns for both side. I use a new, small lookup table to translate a 8-bit pattern to an index to the compact SEE table. In the rare cases when I encounter an 8-bit pattern which is not found in the compact SEE table, I do a normal SEE. The result is better than I expected. The speed of my program is almost exactly the same as before (measured by NPS and by number of nodes needed to complete a fixed-depth search). Suddenly porting my program to PalmOS without a complete rewrite seems much more realistic than before. Thank you very much for the ideas! Tord
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.