Menu

#42 search position by "distance"

Future Release
open
nobody
None
5
2014-12-29
2014-12-23
Cecchino
No

I don't know whether this is already implemented/planned/discussed.

It would be interesting to may search in the database position close to the current position, where the distance may be implemented as some distance concept in information theory, like this (very elementary indeed) http://en.wikipedia.org/wiki/Hamming_distance

Discussion

  • Gregor Cramer

    Gregor Cramer - 2014-12-23

    My preliminary assessment is that a distance concept like the Hamming distance (especially used for error correcting codes) is not really useful here. I think that a distance has to be defined in the language of chess. And it might be of interest to search close positions, but what is the exact meaning of "close"?

    If you have a look into the documentation of CQL-S (http://scidb.sourceforge.net/help/en/CQL-Position-List.html), can you see some helpful keywords for the search of close positions?

    Currently for me it's not really clear what a "close" position is, there are so many aspects. It is helpful if you can make more exact definitions about "close" positions from your point of view, in the language of chess.

     
    • Cecchino

      Cecchino - 2014-12-29

      I don't know right now how to define this distance concept, but, as example, all the positions with pawns c3-d4-e5,c4-d5-e6 should satisfies some common filter. Is it possible to express this requirements at the moment?

       
  • Gregor Cramer

    Gregor Cramer - 2014-12-29

    This is the CQL-S expresssion:

    (match
      (position
        Pc3 Pd4 Pe5          ; pawn chain c3-d4-e5
        :shiftvertical       ; shift chain vertically
        :inside Pc3 [c3-4])) ; but restrict shift to one step upwards (c4-d5-e6)
    

    The alternative is:

    (match
      (position
        :or(
          (Pc3 Pd4 Pe5)    ; pawn chain c3-d4-e5
          (Pc4 Pd5 Pe6)))) ; pawn chain c4-d5-e6
    

    I wrote two versions to show the power of CQL-S.

    CQL-S is very, very powerful, nevertheless some often wanted queries may not be supported yet.

    There exists a Windows binary (see CQL Manual), possibly you might want to play a bit with this application.

     

Log in to post a comment.