ChessAssistantDocs : CQLKnightMatesFirstMove

HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register

Knight gives mate with its first move

Games in which a knight gives mate with its first move are rare. Edward Winter has collected and published several such games, including four specimens in his book Kings, Commoners and Knaves (Russell Enterprises, Inc., Milford, 1999, pages 78-80). Before writing a CQL query to find such games, let's start with a simple query that finds all games where a knight gives mate.

(match
  (position
    :mate
    :attackcount N k 1 100
  )
)

This query finds all games where a white knight mates the black king. After saving this query in Composite search in Chess Assistant it can be run with Side set to 'Any' to search for checkmates both by black and white. Running the query on the 2.7 milion games in Hugebase returns a dataset of 5.913 game. This dataset should be used for all following searches involving checkmates with a knight as it will only require a small fraction of the time it takes to do a full database search. In order to find the subset where a knight gives mate on its first move the following query can be used:
(match
  :forany checker N
  (position :movefrom $checker :matchcount 1)
  (position
    :mate
    :attackcount $checker k 1 100
  )
)

Save this query in Composite search. Run the query first with Side set to 'White' and then to 'Black' to find all games where a knight gives mate with its first move. The search returns seven games for each side, or a total of 14 games.

There are 6 comments on this page. [Display comments]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.3
Page was generated in 0.0340 seconds