Advertisement
logicmoo

Untitled

May 6th, 2017
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 52.64 KB | None | 0 0
  1. ; *** Chess
  2. ; *** Copyright 1998-2002 Zillions Development
  3. ; v.2.0
  4.  
  5. ; You need to purchase Zillions of Games to load this rules file
  6. ; Visit the Zillions web site at http://www.zillions-of-games.com
  7.  
  8. (version "2.0")
  9.  
  10. (define leap1        ($1    (verify not-friend?) add) )
  11. (define leap2        ($1 $2 (verify not-friend?) add) )
  12. (define king-shift   ($1    (verify not-friend?) (set-attribute never-moved? false) add) )
  13.  
  14. (define slide        ($1 (while empty? add $1) (verify not-friend?) add))
  15. (define rook-slide (
  16.   $1
  17.   (while empty? (set-attribute never-moved? false) add $1)
  18.   (verify not-friend?)
  19.   (set-attribute never-moved? false)
  20.   add
  21. ))
  22.  
  23. (define O-O
  24.      ( (verify never-moved?)
  25.        e ; KB1
  26.        (verify empty?)
  27.        e ; KN1
  28.        (verify empty?)
  29.        cascade
  30.        e ; KR1
  31.        (verify (and friend? (piece? Rook) never-moved?) )
  32.        from
  33.        back ; K1
  34.          ; Save expensive not-attacked?s for last
  35.        (verify not-attacked?)
  36.        e ; KB1
  37.        (verify not-attacked?)
  38.        to
  39.        (set-attribute never-moved? false)
  40.          ; We could check if KN1 is attacked too, but this isn't
  41.          ; really necessary since Zillions doesn't allow any moves
  42.          ; into check
  43.        e ; KN1
  44.        (set-attribute never-moved? false)
  45.        add
  46.      )
  47. )
  48.  
  49. (define O-O-O
  50.      ( (verify never-moved?)
  51.        w ; Q1
  52.        (verify empty?)
  53.        w ; QB1
  54.        (verify empty?)
  55.        cascade
  56.        w ; QN1
  57.        (verify empty?)
  58.        w ; QR1
  59.        (verify (and friend? (piece? Rook) never-moved?) )
  60.        from
  61.        back ; K1
  62.          ; Save expensive not-attacked?s for last
  63.        (verify not-attacked?)
  64.        w ; Q1
  65.        (verify not-attacked?)
  66.        to
  67.        (set-attribute never-moved? false)
  68.          ; We could check if KN1 is attacked too, but this isn't
  69.         ; really necessary since Zillions doesn't allow any moves
  70.          ; into check
  71.        w ; QB1
  72.        (set-attribute never-moved? false)
  73.        add
  74.      )
  75. )
  76. (define Pawn-add
  77.    (if (in-zone? promotion-zone) (add Knight Bishop Rook Queen) else add)
  78. )
  79. (define Pawn-move
  80.    (
  81.       n
  82.       (verify empty?)
  83.       (Pawn-add)
  84.       (verify (in-zone? third-rank))
  85.       n
  86.       (verify empty?)
  87.       add
  88.    )
  89. )
  90. (define Pawn-capture
  91.    (
  92.       $1
  93.       (verify enemy?)
  94.       (Pawn-add)
  95.    )
  96. )
  97. (define En-Passant
  98.    (
  99.       $1
  100.       (verify enemy?)
  101.       (verify last-to?)
  102.       (verify (piece? Pawn))
  103.       capture
  104.       n
  105.       to
  106.       n
  107.       (verify last-from?)
  108.       add
  109.    )
  110. )
  111.  
  112. (define Board-Definitions
  113.   (image "images\Chess\SHaag\Chess8x8.bmp" "images\Chess\Chess8x8.bmp")
  114.   (grid
  115.      (start-rectangle 5 5 53 53)
  116.      (dimensions
  117.          ("a/b/c/d/e/f/g/h" (49 0)) ; files
  118.          ("8/7/6/5/4/3/2/1" (0 49)) ; ranks
  119.      )
  120.      (directions (n 0 -1) (e 1 0) (s 0 1) (w -1 0)
  121.                  (ne 1 -1) (nw -1 -1) (se 1 1) (sw -1 1)
  122.      )
  123.   )
  124.   (symmetry Black (n s)(s n) (nw sw)(sw nw) (ne se)(se ne))
  125.   (zone
  126.      (name promotion-zone)
  127.      (players White)
  128.      (positions a8 b8 c8 d8 e8 f8 g8 h8)
  129.   )
  130.   (zone
  131.      (name promotion-zone)
  132.      (players Black)
  133.      (positions a1 b1 c1 d1 e1 f1 g1 h1)
  134.   )
  135.   (zone
  136.      (name third-rank)
  137.      (players White)
  138.      (positions a3 b3 c3 d3 e3 f3 g3 h3)
  139.   )
  140.   (zone
  141.      (name third-rank)
  142.      (players Black)
  143.      (positions a6 b6 c6 d6 e6 f6 g6 h6)
  144.   )
  145. )
  146.  
  147. (game
  148.    (title "Chess")
  149.    (description "Object: Checkmate the opponent's King by attacking
  150.        it so it cannot escape.  To see a description of how a piece moves
  151.        right-click on it to bring up its properties dialog.\\
  152.         Try playing one of the many exciting variants.")
  153.   (history "Chess is a modern version of an ancient Indian game called Shatranj.  The
  154.       earliest record of Shatranj is found in a Persian work called
  155.       Karnamak-i-Artakhshatr-i-Papakan written in about A.D. 600.   The present-day
  156.       form of chess is a little over 100 years old: according to Hooper and Whyld's
  157.        `The Oxford Companion to Chess`, en passant capture was universally adopted in
  158.        1880, although the initial double step for pawns dates from about the 13th
  159.        century.   The most important changes from Shatranj to Chess, expanded moves for
  160.        the queen and bishop, date from about 1475.    Castling began sometime in the
  161.        16th century, but there were many variants of king and rook placement until
  162.        the modern standard was established.")
  163.    (strategy "In the opening, try to develop your pieces more than your pawns.  Always
  164.        protect your King.  Look for ways to exchange lower valued pieces for larger valued
  165.        ones.  Generally, if a Pawn is worth 1 point, then a Bishop or Knight is worth 3,
  166.        a Rook is worth 5 and a Queen worth 9 points.")
  167.    (option "prevent flipping" 2)
  168.    (win-sound "Audio\Orchestra_CF.wav")
  169.    (loss-sound "Audio\Orchestra_FC.wav")
  170.    (click-sound "Audio\Pickup.wav")
  171.    (release-sound "Audio\WoodThunk.wav")
  172.    (players White Black)
  173.    (turn-order White Black)
  174.    (board (Board-Definitions))
  175.  
  176.    (board-setup
  177.       (White
  178.          (Pawn a2 b2 c2 d2 e2 f2 g2 h2)
  179.          (Knight b1 g1)
  180.          (Bishop c1 f1)
  181.          (Rook a1 h1)
  182.          (Queen d1)
  183.          (King e1)
  184.       )
  185.       (Black
  186.          (Pawn a7 b7 c7 d7 e7 f7 g7 h7)
  187.          (Knight b8 g8)
  188.          (Bishop c8 f8)
  189.          (Rook a8 h8)
  190.          (Queen d8)
  191.          (King e8)
  192.       )
  193.    )
  194.  
  195.    (piece
  196.       (name Pawn)
  197.       (help "Pawn: moves forward, captures diagonally, can promote on 8th row")
  198.       (description "Pawn\A Pawn can move straight ahead one square, or two squares from
  199.            its starting position.  A Pawn captures by moving one square ahead and
  200.            diagonally.  If a Pawn reaches the far rank it promotes, changing into
  201.            a Knight, Bishop, Rook, or Queen.  On rare occasions Pawns can also execute
  202.            a move called `En Passant`, or `in passing`.  This allows a Pawn to take
  203.            an enemy Pawn that has just moved two squares.")
  204.       (image White "images\Chess\SHaag\wpawn.bmp" "images\Chess\wpawn.bmp"
  205.              Black "images\Chess\SHaag\bpawn.bmp" "images\Chess\bpawn.bmp")
  206.       (moves
  207.          (Pawn-capture nw)
  208.          (Pawn-capture ne)
  209.          (Pawn-move)
  210.          (En-Passant e)
  211.          (En-Passant w)
  212.       )
  213.    )
  214.  
  215.    (piece
  216.       (name Knight)
  217.       (help "Knight: moves like an `L`, 2 squares one way and one the other")
  218.       (description "Knight\A Knight moves like an `L`, two squares vertically plus one
  219.           horizontally, or two squares horizontally plus one vertically.  It
  220.           hops over any pieces on the way.")
  221.       (image White "images\Chess\SHaag\wknight.bmp" "images\Chess\wknight.bmp"
  222.              Black "images\Chess\SHaag\bknight.bmp" "images\Chess\bknight.bmp")
  223.       (moves
  224.          (leap2 n ne)
  225.          (leap2 n nw)
  226.          (leap2 s se)
  227.          (leap2 s sw)
  228.          (leap2 e ne)
  229.          (leap2 e se)
  230.          (leap2 w nw)
  231.          (leap2 w sw)
  232.       )
  233.    )
  234.  
  235.    (piece
  236.       (name Bishop)
  237.       (help "Bishop: slides diagonally any number of squares")
  238.       (description "Bishop\A Bishop moves any number of squares on a diagonal.  It may
  239.            not leap over other pieces.")
  240.       (image White "images\Chess\SHaag\wbishop.bmp" "images\Chess\wbishop.bmp"
  241.              Black "images\Chess\SHaag\bbishop.bmp" "images\Chess\bbishop.bmp")
  242.       (moves
  243.          (slide ne)
  244.          (slide nw)
  245.          (slide se)
  246.          (slide sw)
  247.       )
  248.    )
  249.  
  250.    (piece
  251.       (name Rook)
  252.       (help "Rook: slides any number of squares along the row or column.")
  253.       (description "Rook\A Rook moves any number of squares orthogonally on a rank
  254.            or a file.  It may not leap over other pieces.")
  255.       (image White "images\Chess\SHaag\wrook.bmp" "images\Chess\wrook.bmp"
  256.              Black "images\Chess\SHaag\brook.bmp" "images\Chess\brook.bmp")
  257.       (attribute never-moved? true)
  258.       (moves
  259.          (rook-slide n)
  260.          (rook-slide e)
  261.          (rook-slide s)
  262.          (rook-slide w)
  263.       )
  264.    )
  265.  
  266.    (piece
  267.       (name Queen)
  268.       (help "Queen: can slide any number of squares in any direction")
  269.       (description "Queen\A Queen moves any number of squares in a straight line.
  270.           It may not leap over other pieces.")
  271.       (image White "images\Chess\SHaag\wqueen.bmp" "images\Chess\wqueen.bmp"
  272.              Black "images\Chess\SHaag\bqueen.bmp" "images\Chess\bqueen.bmp")
  273.       (moves
  274.          (slide n)
  275.          (slide e)
  276.          (slide s)
  277.          (slide w)
  278.          (slide ne)
  279.          (slide nw)
  280.          (slide se)
  281.          (slide sw)
  282.       )
  283.    )
  284.  
  285.    (piece
  286.       (name King)
  287.       (help "King: steps 1 square in any direction to a safe square")
  288.       (description "King\A King can move to any adjacent square, but never to a
  289.           square where it can be captured.  It may also `castle`
  290.           with the Rook if neither the Rook nor King has moved yet and there is
  291.           nothing in between them.  In castling the King moves two squares nearer
  292.           the Rook and the Rook leaps to the far side of the King.  You may not
  293.           castle out of or through check, or if the King or Rook involved has
  294.           previously moved.")
  295.       (image White "images\Chess\SHaag\wking.bmp" "images\Chess\wking.bmp"
  296.              Black "images\Chess\SHaag\bking.bmp" "images\Chess\bking.bmp")
  297.       (attribute never-moved? true)
  298.       (moves
  299.          (king-shift n)
  300.          (king-shift e)
  301.          (king-shift s)
  302.          (king-shift w)
  303.          (king-shift ne)
  304.          (king-shift nw)
  305.          (king-shift se)
  306.          (king-shift sw)
  307.          (O-O)
  308.          (O-O-O)
  309.       )
  310.    )
  311.  
  312.    (loss-condition (White Black) (checkmated King) )
  313. )
  314.  
  315. ; **************************************************************************
  316. ; VARIANTS WHERE THE KING ISN'T ROYAL
  317. ; **************************************************************************
  318. (variant
  319.   (title "-") ; --------------------------------------------------------
  320. )
  321.  
  322. (define progressive-turns
  323.   (turn-order
  324.      White
  325.      Black Black
  326.      White White White
  327.      Black Black Black Black
  328.      White White White White White
  329.      Black Black Black Black Black Black
  330.      White White White White White White White
  331.      Black Black Black Black Black Black Black Black
  332.      White White White White White White White White White
  333.      Black Black Black Black Black Black Black Black Black Black
  334.      White White White White White White White White White White White
  335.      Black Black Black Black Black Black Black Black Black Black Black Black
  336.      White White White White White White White White White White White White White
  337.      Black Black Black Black Black Black Black Black Black Black Black Black Black Black
  338.      White White White White White White White White White White White White White White White
  339.     repeat
  340.      Black Black Black Black Black Black Black Black Black Black Black Black Black Black Black Black
  341.      White White White White White White White White White White White White White White White White
  342.   )
  343. )
  344.  
  345. (define ThruCheck_O-O
  346.      ( (verify never-moved?)
  347.        e ; KB1
  348.        (verify empty?)
  349.        mark
  350.        e ; KN1
  351.        (verify empty?)
  352.        cascade
  353.        (set-attribute never-moved? false)
  354.        e ; KR1
  355.        (verify (and friend? (piece? Rook) never-moved?) )
  356.        from
  357.        back ; KB1
  358.        (set-attribute never-moved? false)
  359.        add
  360.      )
  361. )
  362. (define ThruCheck_O-O-O
  363.     ( (verify never-moved?)
  364.       w ; Q1
  365.       (verify empty?)
  366.        mark
  367.       w ; QB1
  368.       (verify empty?)
  369.       cascade
  370.       (set-attribute never-moved? false)
  371.       w ; QN1
  372.       (verify empty?)
  373.       w ; QR1
  374.       (verify (and friend? (piece? Rook) never-moved?) )
  375.       from
  376.       back ; Q1
  377.       (set-attribute never-moved? false)
  378.       add
  379.     )
  380. )
  381.  
  382. (define unroyal-King
  383.  (piece
  384.    (name King)
  385.    (help "King: steps 1 square in any direction, castles with rook")
  386.    (description "King\A non-royal King can move to any adjacent square.  In
  387.          castling the King moves two squares nearer the Rook and the Rook
  388.          leaps to the far side of the King.  It can castle through check
  389.          if desired.  The non-royal King can be captured like any other piece.")
  390.    (image White "images\Chess\SHaag\wking.bmp" "images\Chess\wking.bmp"
  391.           Black "images\Chess\SHaag\bking.bmp" "images\Chess\bking.bmp")
  392.    (attribute never-moved? true)
  393.    (moves
  394.       (king-shift n)
  395.       (king-shift e)
  396.       (king-shift s)
  397.       (king-shift w)
  398.       (king-shift ne)
  399.       (king-shift nw)
  400.       (king-shift se)
  401.       (king-shift sw)
  402.        (ThruCheck_O-O)
  403.        (ThruCheck_O-O-O)
  404.    )
  405.  )
  406. )
  407.  
  408. ; These macros allow promotion to a King
  409. (define unroyal-Pawn-add      (if (in-zone? promotion-zone) (add Knight Bishop Rook Queen King) else add) )
  410. (define unroyal-Pawn-capture  ($1 (verify enemy?) (unroyal-Pawn-add)) )
  411. (define unroyal-Pawn-move (
  412.     n (verify empty?) (unroyal-Pawn-add)
  413.     (verify (in-zone? third-rank)) n (verify empty?) add
  414. ))
  415.  
  416. (define unroyal-Pawn
  417.   (piece
  418.      (name Pawn)
  419.       (help "Pawn: moves forward, captures diagonally, can promote on 8th row to KQRBN")
  420.      (description "Pawn\A Pawn can move straight ahead one square, or two squares
  421.          from its starting position.  A Pawn captures by moving one square ahead and
  422.          diagonally.  If a Pawn reaches the far rank it promotes, changing into a
  423.          Knight, Bishop, Rook, Queen, or (in this variant) even a King.  On rare
  424.          occasions Pawns can also execute a move called `En Passant`, or `in
  425.          passing`.  This allows a Pawn to take an enemy Pawn that has just moved two
  426.         squares.")
  427.      (image White "images\Chess\SHaag\wpawn.bmp" "images\Chess\wpawn.bmp"
  428.             Black "images\Chess\SHaag\bpawn.bmp" "images\Chess\bpawn.bmp")
  429.      (moves
  430.         (unroyal-Pawn-capture nw)
  431.         (unroyal-Pawn-capture ne)
  432.         (En-Passant e)
  433.         (En-Passant w)
  434.         (unroyal-Pawn-move)
  435.     )
  436.   )
  437. )
  438.  
  439. ; **************************************************************************
  440. (variant
  441.   (title "Extinction Chess")
  442.   (description "Object: Make all of a type of piece extinct; e.g., win
  443.       by capturing both your opponent's Knights.");
  444.    (history "This game was invented by R. Wayne Schmittberger, and was first published
  445.        under his pseudonym `Paddy Smith` in the August 1985 issue of Games Magazine.
  446.        It was originally called `Survival of the Species` and became popular in
  447.        NOST under its present name.")
  448.    (strategy "Games are usually shorter than in orthodox chess and endgames are
  449.        almost impossible.  The queen is somewhat less powerful than in orthodox chess,
  450.        since it cannot move to attacked squares, even if protected.  Multiple piece
  451.        attacks (forks and pins) can be very powerful if one or more of the targets is
  452.        the last of its kind.  Exchanges can reap dividends if the remaining piece
  453.        of a pair can be subsequently attacked.")
  454.    (unroyal-King)
  455.    (unroyal-Pawn)
  456.    (loss-condition (White Black)
  457.         (or
  458.               (pieces-remaining 0 King)
  459.               (pieces-remaining 0 Queen)
  460.               (pieces-remaining 0 Rook)
  461.               (pieces-remaining 0 Bishop)
  462.               (pieces-remaining 0 Knight)
  463.               (pieces-remaining 0 Pawn)
  464.         )
  465.    )
  466. )
  467.  
  468. ; **************************************************************************
  469. ; These macros just force promotion to a King
  470. (define KC-Pawn-add      (if (in-zone? promotion-zone) (add King) else add) )
  471. (define KC-Pawn-capture  ($1 (verify enemy?) (KC-Pawn-add)) )
  472. (define KC-Pawn-move (
  473.     n (verify empty?) (KC-Pawn-add)
  474.     (verify (in-zone? third-rank)) n (verify empty?) add
  475. ))
  476. (variant
  477.    (title "Kinglet Chess")
  478.    (description "Object: To capture all of your opponent's Pawns (Kinglets).\
  479.      The King is not royal and may be captured without ending the game.  Pawns are
  480.      always promoted to Kings.  Right-click on pieces to see how they move.")
  481.   (history "This game is one of the best creations of the prolific inventor of
  482.      chess variants, V. R. Parton.    It was invented in 1953, and appeared in
  483.      Boyer's second anthology of chess variants in 1954.   When Parton described
  484.       it in his own book `Chess -- Curiouser and Curiouser` in 1960, he called it
  485.       `Imperial Fiddlesticks`, after an exclamation by the White King in Lewis
  486.       Carroll's `Alice Through The Looking-Glass`.")
  487.   (strategy "Although it is dangerous to allow your opponent too great a material
  488.      advantage in pieces, Parton himself suggests sacrificing a minor piece (including
  489.      the non-royal king, which is about as strong as a knight or bishop) for a single
  490.      pawn, or a rook (perhaps even a queen!) for two pawns.   Forcing your opponent
  491.      to promote a pawn can also be a useful tactic: if you can force him to promote
  492.      his last remaining pawn, you win.")
  493.   (unroyal-King)
  494.   (piece
  495.      (name Pawn)
  496.       (help "Pawn (Kinglet): moves forward, captures diagonally, promotes on 8th row to King")
  497.      (description "Pawn (Kinglet)\A Pawn can move straight ahead one square, or two squares
  498.        from its starting position.  A Pawn captures by moving one square ahead and
  499.        diagonally.  If a Pawn reaches the far rank it promotes to a non-royal King.  On rare
  500.        occasions Pawns can also execute a move called `En Passant`, or `in passing`.  This
  501.        allows a Pawn to take an enemy Pawn that has just moved two squares.\\
  502.        The object of the game is capture all of the opponent's Pawns.")
  503.       (image White "images\Chess\SHaag\wpawn.bmp" "images\Chess\wpawn.bmp"
  504.                  Black "images\Chess\SHaag\bpawn.bmp" "images\Chess\bpawn.bmp")
  505.       (moves
  506.          (KC-Pawn-capture nw)
  507.          (KC-Pawn-capture ne)
  508.          (KC-Pawn-move)
  509.          (En-Passant e)
  510.          (En-Passant w)
  511.       )
  512.    )
  513.    (loss-condition (White Black) (pieces-remaining 0 Pawn))
  514. )
  515.  
  516. ; **************************************************************************
  517. (variant
  518.    (title "Take-All")
  519.    (description "Object: To capture all of your opponent's pieces.\The
  520.      King is not royal and may be captured without ending the
  521.       game.  Pawns may be promoted to Kings.  Right-click on pieces to
  522.       see how they move.")
  523.   (history "The origin of the game is not known.   In his books, V. R. Parton
  524.      referred to the game as `Mock Chess`.  If the single-move version is
  525.      too slow for you, try the progressive form!")
  526.   (strategy "Material is all-important.  The King is an ordinary piece, about
  527.        the strength of a knight.")
  528.   (unroyal-King)
  529.   (unroyal-Pawn)
  530.   (loss-condition (White Black) (pieces-remaining 0))
  531. )
  532.  
  533. ; **************************************************************************
  534. (variant
  535.   (title "Progressive Take-All")
  536.   (description "Object: To capture all of your opponent's pieces.\The
  537.       King is not royal and may be captured without ending the
  538.       game.  Pawns may be promoted to Kings.  Right-click on pieces to
  539.       see how they move.\\White gets 1 move, Black gets 2, White gets 3, etc.")
  540.    (history "Progressive Take-All was invented in 1979 by Giuseppe Dipilato, one
  541.       of the leading players in the Italian variant organization AISE.  It is
  542.       a popular game and was one of the seven variants selected for the First
  543.       Heterochess Olympics, an international team postal championship in 1989.")
  544.    (strategy "Bishops and queens are powerful in the opening.  Queens tend to
  545.       disappear rather quickly.  In the endgame, knights and rooks are more
  546.       powerful and bishops become weaker.  Single bishops are particularly
  547.       weak, as opposing pieces can easily move to squares of the opposite color.
  548.       As the number of moves per turn increases, watch for promotion opportunities
  549.       for both sides.  When ahead of the opponent in material, try to block his
  550.       remaining pawns from promoting.")
  551.    (unroyal-King)
  552.    (unroyal-Pawn)
  553.    (progressive-turns)
  554.    (loss-condition (White Black) (pieces-remaining 0))
  555. )
  556.  
  557. ; **************************************************************************
  558. ;(define leap1-capture  ($1 (verify enemy?) add) )
  559. ;(define leap1-move     ($1 (verify empty?) add) )
  560. (define leap2-capture ($1 $2 (verify enemy?) add) )
  561. (define leap2-move    ($1 $2 (verify empty?) add) )
  562.  
  563. (define king-shift-capture ($1 (verify enemy?) (set-attribute never-moved? false) add) )
  564. (define king-shift-move    ($1 (verify empty?) (set-attribute never-moved? false) add) )
  565.  
  566. (define slide-capture  ($1 (while empty? $1) (verify enemy?) add) )
  567. (define slide-move     ($1 (while empty? add $1)) )
  568. (define rook-slide-capture ($1 (while empty? $1) (verify enemy?) (set-attribute never-moved? false) add) )
  569. (define rook-slide-move    ($1 (while empty? (set-attribute never-moved? false) add $1)) )
  570.  
  571. (variant
  572.    (title "Losing Chess")
  573.    (description "Object: To lose all of your pieces or be stalemated.\
  574.       All capturing is mandatory, though you may choose which capture to
  575.       make.  The King is not royal and may be captured without ending the
  576.       game.  Pawns may be promoted to a King.")
  577.    (history "This is one of the most popular chess variants, currently being played and
  578.       studied a lot in the Italian organization AISE (Associazione Italiana Scacchi
  579.       Eterodossi).  A closely related variation `Take Me` was invented in 1874 and
  580.       Losing Chess is probably much older than that.  The first known analysis dates
  581.       from 1901.")
  582.    (strategy "It is possible to make a blunder from the very first move.  Be wary
  583.       of letting your Bishops get loose.  They are mobile enough so the opponent
  584.       might devise a chain of captures for the Bishop to make, but not mobile enough
  585.       that the Bishop will have choices of captures and thus be able to force a recapture.")
  586.    (move-priorities capture-move non-capture-move)
  587.  
  588.    (piece
  589.       (name Pawn)
  590.       (help "Pawn: moves forward, captures diagonally, can promote on 8th row to KQRBN")
  591.       (description "Pawn\A Pawn can move straight ahead one square, or two squares from
  592.            its starting position.  A Pawn captures by moving one square ahead and
  593.            diagonally.  If a Pawn reaches the far rank it promotes, changing into
  594.            a Knight, Bishop, Rook, Queen, or even a King.  On rare occasions Pawns can
  595.            also execute a move called `En Passant`, or `in passing`.  This allows a Pawn to
  596.            take an enemy Pawn that has just moved two squares.")
  597.       (image White "images\Chess\SHaag\wpawn.bmp" "images\Chess\wpawn.bmp"
  598.              Black "images\Chess\SHaag\bpawn.bmp" "images\Chess\bpawn.bmp")
  599.       (moves
  600.          (move-type capture-move)
  601.          (unroyal-Pawn-capture nw)
  602.          (unroyal-Pawn-capture ne)
  603.          (En-Passant e)
  604.          (En-Passant w)
  605.          (move-type non-capture-move)
  606.          (unroyal-Pawn-move)
  607.      )
  608.    )
  609.  
  610.    (piece
  611.       (name Knight)
  612.       (help "Knight: moves like an `L`, 2 squares one way and one the other")
  613.       (description "Knight\A Knight moves like an `L`, two squares vertically plus one
  614.           horizontally, or two squares horizontally plus one vertically.  It
  615.           hops over any pieces on the way.")
  616.       (image White "images\Chess\SHaag\wknight.bmp" "images\Chess\wknight.bmp"
  617.              Black "images\Chess\SHaag\bknight.bmp" "images\Chess\bknight.bmp")
  618.       (moves
  619.          (move-type capture-move)
  620.          (leap2-capture n ne)
  621.          (leap2-capture n nw)
  622.          (leap2-capture s se)
  623.          (leap2-capture s sw)
  624.          (leap2-capture e ne)
  625.          (leap2-capture e se)
  626.          (leap2-capture w nw)
  627.          (leap2-capture w sw)
  628.          (move-type non-capture-move)
  629.          (leap2-move n ne)
  630.          (leap2-move n nw)
  631.          (leap2-move s se)
  632.          (leap2-move s sw)
  633.          (leap2-move e ne)
  634.          (leap2-move e se)
  635.          (leap2-move w nw)
  636.          (leap2-move w sw)
  637.       )
  638.    )
  639.  
  640.    (piece
  641.       (name Bishop)
  642.       (help "Bishop: slides diagonally any number of squares")
  643.       (description "Bishop\A Bishop moves any number of squares on a diagonal.  It may
  644.            not leap over other pieces.")
  645.       (image White "images\Chess\SHaag\wbishop.bmp" "images\Chess\wbishop.bmp"
  646.              Black "images\Chess\SHaag\bbishop.bmp" "images\Chess\bbishop.bmp")
  647.       (moves
  648.          (move-type capture-move)
  649.          (slide-capture ne)
  650.          (slide-capture nw)
  651.          (slide-capture se)
  652.          (slide-capture sw)
  653.          (move-type non-capture-move)
  654.          (slide-move ne)
  655.          (slide-move nw)
  656.          (slide-move se)
  657.          (slide-move sw)
  658.       )
  659.    )
  660.  
  661.    (piece
  662.       (name Rook)
  663.       (help "Rook: slides any number of squares along the row or column.")
  664.       (description "Rook\A Rook moves any number of squares orthogonally on a rank
  665.            or a file.  It may not leap over other pieces.")
  666.       (image White "images\Chess\SHaag\wrook.bmp" "images\Chess\wrook.bmp"
  667.              Black "images\Chess\SHaag\brook.bmp" "images\Chess\brook.bmp")
  668.       (attribute never-moved? true)
  669.       (moves
  670.          (move-type capture-move)
  671.          (rook-slide-capture n)
  672.          (rook-slide-capture e)
  673.          (rook-slide-capture s)
  674.          (rook-slide-capture w)
  675.          (move-type non-capture-move)
  676.          (rook-slide-move n)
  677.          (rook-slide-move e)
  678.          (rook-slide-move s)
  679.          (rook-slide-move w)
  680.       )
  681.    )
  682.  
  683.    (piece
  684.       (name Queen)
  685.       (help "Queen: can slide any number of squares in any direction")
  686.       (description "Queen\A Queen moves any number of squares in a straight line.
  687.           It may not leap over other pieces.")
  688.       (image White "images\Chess\SHaag\wqueen.bmp" "images\Chess\wqueen.bmp"
  689.              Black "images\Chess\SHaag\bqueen.bmp" "images\Chess\bqueen.bmp")
  690.       (moves
  691.          (move-type capture-move)
  692.          (slide-capture n)
  693.          (slide-capture e)
  694.          (slide-capture s)
  695.          (slide-capture w)
  696.          (slide-capture ne)
  697.          (slide-capture nw)
  698.          (slide-capture se)
  699.          (slide-capture sw)
  700.          (move-type non-capture-move)
  701.          (slide-move n)
  702.          (slide-move e)
  703.          (slide-move s)
  704.          (slide-move w)
  705.          (slide-move ne)
  706.          (slide-move nw)
  707.          (slide-move se)
  708.          (slide-move sw)
  709.       )
  710.    )
  711.  
  712.    (piece
  713.       (name King)
  714.       (help "King: steps 1 square in any direction, castles with rook")
  715.       (description "King\A King can move to any adjacent square.  It may also `castle`
  716.           with the Rook if neither the Rook nor King has moved yet and there is
  717.           nothing in between them.  In castling the King moves two squares nearer
  718.           the Rook and the Rook leaps to the far side of the King.  Unlike regular
  719.           Chess, in Losing Chess there is nothing `royal` about the King and he
  720.           may be captured like any other piece.")
  721.       (image White "images\Chess\SHaag\wking.bmp" "images\Chess\wking.bmp"
  722.              Black "images\Chess\SHaag\bking.bmp" "images\Chess\bking.bmp")
  723.       (attribute never-moved? true)
  724.       (moves
  725.          (move-type capture-move)
  726.          (king-shift-capture n)
  727.          (king-shift-capture e)
  728.          (king-shift-capture s)
  729.          (king-shift-capture w)
  730.          (king-shift-capture ne)
  731.          (king-shift-capture nw)
  732.          (king-shift-capture se)
  733.          (king-shift-capture sw)
  734.          (move-type non-capture-move)
  735.          (king-shift-move n)
  736.          (king-shift-move e)
  737.          (king-shift-move s)
  738.          (king-shift-move w)
  739.          (king-shift-move ne)
  740.          (king-shift-move nw)
  741.          (king-shift-move se)
  742.          (king-shift-move sw)
  743.          (ThruCheck_O-O)
  744.          (ThruCheck_O-O-O)
  745.       )
  746.    )
  747.  
  748.    (win-condition (White Black) (pieces-remaining 0))
  749.    (win-condition (White Black) stalemated)
  750. )
  751.  
  752. ; **************************************************************************
  753. ; DOUBLE-MOVE VARIANTS
  754. ; **************************************************************************
  755. (variant
  756.    (title "-") ; --------------------------------------------------------
  757. )
  758.  
  759. ; **************************************************************************
  760. (variant
  761.    (title "Double-Move Chess (Capture)")
  762.    (description "Like normal Chess, except that each side moves twice.  Also,
  763.       the King is not royal and may captured.  There is no check -- the winner
  764.       is the first person to capture the opponent's King.")
  765.   (history "In one form or another, Double-Move Chess has been enjoyed for
  766.      many centuries.  One particular version, Marseillais Chess, was played
  767.       in the 1920's by many strong Chess players including Alekhine,
  768.       Reti, Znosko-Borovsky, and Cheron.  Alekhine, known for his attacking
  769.       play, was world champion in normal Chess.")
  770.    (strategy "Shield your King so the opponent can't check you.  If he can
  771.      check you on the first move, he can capture you on the second!  Watch
  772.       for the opportunity to capture an enemy piece and then
  773.      escape on the second move.  Queens are particular agile in this regard.")
  774.   (turn-order White White Black Black)
  775.   (unroyal-King)
  776.   (loss-condition (White Black) (pieces-remaining 0 King))
  777. )
  778.  
  779. ; **************************************************************************
  780. (variant
  781.   (title "Double-Move Chess (Checkmate)")
  782.   (description "Like normal Chess, except that each side moves twice.  A King
  783.      that is in check doesn't have to get out of check until his second move.
  784.       In fact, it is okay to move into check on the first move as long as you
  785.       move out again on the second move.  Checking the opponent is only allowed
  786.       on the second move.")
  787.    (history "In one form or another, Double-Move Chess has been enjoyed for
  788.       many centuries.  One particular version, Marseillais Chess, was played
  789.       in the 1920's by many strong Chess players including Alekhine,
  790.       Reti, Znosko-Borovsky, and Cheron.  Alekhine, known for his attacking
  791.       play, was world champion in normal Chess.")
  792.   (strategy "Shield your King so the opponent can't check you.  If he can
  793.       check you on the first move, he can capture you on the second!  Watch
  794.       for the opportunity to capture an enemy piece and then
  795.       escape on the second move.  Queens are particular agile in this regard.")
  796.    (turn-order White White Black Black)
  797. )
  798.  
  799. ; **************************************************************************
  800. (variant
  801.    (title "Monster Chess (4 Pawns)")
  802.    (description "White gets two moves for every move of Black's.
  803.      The object is to capture the opponent's King.  The White King may
  804.       move into check on the first of his two moves.")
  805.    (history "Also known as Imperatore, this is a variant on the medieval
  806.       8 Pawn version.  With colors reversed this game was played by the
  807.       an early mainframe computer program, MASTER.")
  808.    (strategy "White should get his King and Pawns as close as possible
  809.       to the Black King.  He should also look for opportunities to promote
  810.       a Pawn, since a Queen should win quickly.  Black should play
  811.       carefully to keep the White King at bay, keeping his pieces protecting
  812.       each other and protecting the squares in front of them.")
  813.    (turn-order White White Black)
  814.    (board-setup
  815.       (White
  816.          (Pawn c2 d2 e2 f2)
  817.          (King e1)
  818.       )
  819.       (Black
  820.          (Pawn a7 b7 c7 d7 e7 f7 g7 h7)
  821.          (Knight b8 g8)
  822.          (Bishop c8 f8)
  823.          (Rook a8 h8)
  824.          (Queen d8)
  825.          (King e8)
  826.       )
  827.    )
  828.    (loss-condition (White Black) (pieces-remaining 0 King) )
  829. )
  830.  
  831. ; **************************************************************************
  832. (variant
  833.    (title "Monster Chess (8 Pawns)")
  834.    (description "White gets two moves for every move of Black's.
  835.      The object is to capture the opponent's King.  The White King may
  836.       move into check on the first of his two moves.");
  837.    (history "As H. J. R. Murray shows in `A History of Chess`, this game
  838.       derives from medieval times.  Back then the moves of Queens and Bishops
  839.       were limited compared to today and so White had an easier time of it.")
  840.    (strategy "The problem (c.1100) H. J. R. Murray describes is captioned
  841.       `White to play and win`.  However, with today's more powerful Queens
  842.       and Bishops the result is more in doubt.  White should push forward,
  843.       trying to protect his pawns and look for opportunities to infiltrate.   Black
  844.      should try to drive the white King back if possible, keeping him at
  845.       a safe distance, and try to prevent Pawn promotions, which would most likely
  846.       decide the game.")
  847.   (turn-order White White Black)
  848.   (board-setup
  849.      (White
  850.         (Pawn a2 b2 c2 d2 e2 f2 g2 h2)
  851.         (King e1)
  852.      )
  853.      (Black
  854.         (Pawn a7 b7 c7 d7 e7 f7 g7 h7)
  855.         (Knight b8 g8)
  856.         (Bishop c8 f8)
  857.         (Rook a8 h8)
  858.         (Queen d8)
  859.         (King e8)
  860.      )
  861.   )
  862.   (loss-condition (White Black) (pieces-remaining 0 King) )
  863. )
  864.  
  865. ; **************************************************************************
  866. ; OTHER VARIANTS
  867. ; **************************************************************************
  868. (variant
  869.   (title "-") ; --------------------------------------------------------
  870. )
  871.  
  872. ; **************************************************************************
  873. (variant
  874.   (title "Cylindrical Chess")
  875.   (description "Chess played on a cylinder: the left and right edges wrap around.")
  876.   (history "Cylindrical Chess dates back at least to the early 20th century, where
  877.      it was a popular problem theme.   The game has also been a popular progressive
  878.      game in AISE.")
  879.   (strategy "The Queen and Bishop are relatively stronger than in chess due to
  880.      slightly greater mobility.   The knight has its maximum mobility anywhere in
  881.      the four middle ranks.   Learn to visualize all of the possible moves around
  882.      the board edges.")
  883.   (board
  884.      (Board-Definitions)
  885.      ; Connect left and right edges
  886.      (links e  (h1 a1) (h2 a2) (h3 a3) (h4 a4) (h5 a5) (h6 a6) (h7 a7) (h8 a8))
  887.      (links w  (a1 h1) (a2 h2) (a3 h3) (a4 h4) (a5 h5) (a6 h6) (a7 h7) (a8 h8))
  888.      (links ne (h1 a2) (h2 a3) (h3 a4) (h4 a5) (h5 a6) (h6 a7) (h7 a8))
  889.      (links nw (a1 h2) (a2 h3) (a3 h4) (a4 h5) (a5 h6) (a6 h7) (a7 h8))
  890.      (links se (h2 a1) (h3 a2) (h4 a3) (h5 a4) (h6 a5) (h7 a6) (h8 a7))
  891.      (links sw (a2 h1) (a3 h2) (a4 h3) (a5 h4) (a6 h5) (a7 h6) (a8 h7))
  892.   )
  893. )
  894.  
  895.  
  896. ; **************************************************************************
  897. (define royal-leap2
  898.   ($1 $2 (verify not-friend?) (set-attribute never-moved? false) add)
  899. )
  900. ; These macros allow promotion to a King, but not to a Knight
  901. (define knightmate-Pawn-add      (if (in-zone? promotion-zone) (add Bishop Rook Queen King) else add) )
  902. (define knightmate-Pawn-capture  ($1 (verify enemy?) (knightmate-Pawn-add)) )
  903. (define knightmate-Pawn-move (
  904.   n (verify empty?) (knightmate-Pawn-add)
  905.   (verify (in-zone? third-rank)) n (verify empty?) add)
  906. )
  907. (variant
  908.   (title "Knightmate")
  909.   (description "Like normal Chess, except that the Knights are interchanged
  910.      with the Kings and the object becomes to checkmate the Knight.  Kings
  911.      are not royal and may be taken.  The Knight may castle with a Rook.  Pawns
  912.      may not promote to Knights, but may promote to Kings.")
  913.   (history "Invented by Bruce Zimov in 1972.  The first Knightmate Open
  914.      occurred in Ohio in 1991.   It has also been popular in postal play
  915.      in NOST.   The game was independently invented in the early 1970's at
  916.       Sheffield University in England, where it was known as `Mate The Knight`.")
  917.    (strategy "Keep a careful watch on the squares next to your Knight: if it
  918.       is checked from an adjacent square, it won't be able to capture the
  919.      checking piece.")
  920.   (board-setup
  921.      (White
  922.         (Pawn a2 b2 c2 d2 e2 f2 g2 h2)
  923.         (King b1 g1)
  924.         (Bishop c1 f1)
  925.         (Rook a1 h1)
  926.         (Queen d1)
  927.         (Knight e1)
  928.      )
  929.      (Black
  930.         (Pawn a7 b7 c7 d7 e7 f7 g7 h7)
  931.         (King b8 g8)
  932.         (Bishop c8 f8)
  933.         (Rook a8 h8)
  934.         (Queen d8)
  935.         (Knight e8)
  936.      )
  937.   )
  938.   (piece
  939.      (name Pawn)
  940.      (help "Pawn: moves forward, captures diagonally, can promote on 8th row to KQRB")
  941.      (description "Pawn\A Pawn can move straight ahead one square, or two squares
  942.          from its starting position.  A Pawn captures by moving one square ahead and
  943.          diagonally.  If a Pawn reaches the far rank it promotes, changing into a
  944.          Bishop, Rook, Queen, or (in this variant) even a King.  On rare
  945.          occasions Pawns can also execute a move called `En Passant`, or `in
  946.          passing`.  This allows a Pawn to take an enemy Pawn that has just moved two
  947.          squares.")
  948.      (image White "images\Chess\SHaag\wpawn.bmp" "images\Chess\wpawn.bmp"
  949.             Black "images\Chess\SHaag\bpawn.bmp" "images\Chess\bpawn.bmp")
  950.      (moves
  951.         (knightmate-Pawn-capture nw)
  952.         (knightmate-Pawn-capture ne)
  953.         (En-Passant e)
  954.         (En-Passant w)
  955.         (knightmate-Pawn-move)
  956.     )
  957.   )
  958.   (piece
  959.      (name Knight)
  960.       (help "Knight: moves like an `L`, 2 squares one way and one the other")
  961.      (description "Knight\A Knight moves like an `L`, two squares vertically plus one
  962.          horizontally, or two squares horizontally plus one vertically.  It
  963.          hops over any pieces on the way.  A Knight that hasn't moved has the
  964.           option of castling with one of its Rooks.  This is achieved just as in
  965.           regular Chess.\\The object of this variant is to checkmate the Knight.")
  966.       (image White "images\Chess\SHaag\wknight.bmp" "images\Chess\wknight.bmp"
  967.              Black "images\Chess\SHaag\bknight.bmp" "images\Chess\bknight.bmp")
  968.       (attribute never-moved? true)
  969.       (moves
  970.          (royal-leap2 n ne)
  971.          (royal-leap2 n nw)
  972.          (royal-leap2 s se)
  973.          (royal-leap2 s sw)
  974.          (royal-leap2 e ne)
  975.          (royal-leap2 e se)
  976.          (royal-leap2 w nw)
  977.          (royal-leap2 w sw)
  978.          (O-O)
  979.          (O-O-O)
  980.       )
  981.    )
  982.    (piece
  983.       (name King)
  984.       (description "King\A King can move to any adjacent square.  It may not
  985.          castle.  In this variant the King is not royal and may be captured.")
  986.       (help "King: steps 1 square in any direction")
  987.       (image White "images\Chess\SHaag\wking.bmp" "images\Chess\wking.bmp"
  988.              Black "images\Chess\SHaag\bking.bmp" "images\Chess\bking.bmp")
  989.       (moves
  990.          (leap1 n)
  991.          (leap1 e)
  992.          (leap1 s)
  993.          (leap1 w)
  994.          (leap1 ne)
  995.          (leap1 nw)
  996.          (leap1 se)
  997.          (leap1 sw)
  998.       )
  999.    )
  1000.    (loss-condition (White Black) (checkmated Knight) )
  1001. )
  1002.  
  1003. ; **************************************************************************
  1004. (define NP-leap2        ($1 $2 (verify (or empty? (and not-friend? (or (piece? Pawn) (piece? King))))) add) )
  1005. (define NP-slide        ($1 (while empty? add $1) (verify (and not-friend? (or (piece? Pawn) (piece? King)))) add))
  1006. (define NP-rook-slide (
  1007.   $1
  1008.   (while empty? (set-attribute never-moved? false) add $1)
  1009.   (verify (and not-friend? (or (piece? Pawn) (piece? King))))
  1010.   (set-attribute never-moved? false)
  1011.   add
  1012. ))
  1013.  
  1014. (variant
  1015.    (title "Non-Prise Chess")
  1016.    (description "Non-Prise Chess is the same as orthodox chess except that
  1017.                  Knights, Rooks, Bishops, and Queens cannot capture Knights
  1018.                  Bishops, Rooks, or Queens.");
  1019.    (history     "Non-Prise Chess was invented by Bruce Zimov in 1994.")
  1020.    (strategy "Pieces (Knight, Bishop, Rook, Queen) can't defend their Pawns,
  1021.       which makes Pawns easy prey.  Look to attack Pawns at the base of a
  1022.        Pawn chain.  Since Knights, Bishops, Rooks, and Queens are mostly
  1023.        immune from capture they make great blockades and can effectively
  1024.        shield the King from attack.  Look for aggresive ways to move out
  1025.        your pieces where they won't be easily dislodged by enemy Pawns.")
  1026.    (piece
  1027.       (name Knight)
  1028.       (help "Knight: moves like an `L`, 2 squares one way and one the other")
  1029.       (description "Knight\A Knight moves like an `L`, two squares vertically plus one
  1030.           horizontally, or two squares horizontally plus one vertically.  It
  1031.           hops over any pieces on the way.
  1032.           In this variant, a Knight can't capture any Knights, Bishops, Rooks, or Queens.")
  1033.      (image White "images\Chess\SHaag\wknight.bmp" "images\Chess\wknight.bmp"
  1034.             Black "images\Chess\SHaag\bknight.bmp" "images\Chess\bknight.bmp")
  1035.      (moves
  1036.             (NP-leap2 n ne)
  1037.             (NP-leap2 n nw)
  1038.             (NP-leap2 s se)
  1039.             (NP-leap2 s sw)
  1040.             (NP-leap2 e ne)
  1041.             (NP-leap2 e se)
  1042.             (NP-leap2 w nw)
  1043.             (NP-leap2 w sw)
  1044.      )
  1045.   )
  1046.  
  1047.   (piece
  1048.      (name Bishop)
  1049.       (help "Bishop: slides diagonally any number of squares")
  1050.      (description "Bishop\A Bishop moves any number of squares on a diagonal.  It may
  1051.          not leap over other pieces.
  1052.           In this variant, a Bishop can't capture any Knights, Bishops, Rooks, or Queens.")
  1053.       (image White "images\Chess\SHaag\wbishop.bmp" "images\Chess\wbishop.bmp"
  1054.              Black "images\Chess\SHaag\bbishop.bmp" "images\Chess\bbishop.bmp")
  1055.       (moves
  1056.          (NP-slide ne)
  1057.          (NP-slide nw)
  1058.          (NP-slide se)
  1059.          (NP-slide sw)
  1060.       )
  1061.    )
  1062.  
  1063.    (piece
  1064.       (name Rook)
  1065.       (help "Rook: slides any number of squares along the row or column.")
  1066.       (description "Rook\A Rook moves any number of squares orthogonally on a rank
  1067.            or a file.  It may not leap over other pieces.
  1068.            In this variant, a Rook can't capture any Knights, Bishops, Rooks, or Queens.")
  1069.      (image White "images\Chess\SHaag\wrook.bmp" "images\Chess\wrook.bmp"
  1070.             Black "images\Chess\SHaag\brook.bmp" "images\Chess\brook.bmp")
  1071.      (attribute never-moved? true)
  1072.      (moves
  1073.         (NP-rook-slide n)
  1074.         (NP-rook-slide e)
  1075.         (NP-rook-slide s)
  1076.         (NP-rook-slide w)
  1077.      )
  1078.   )
  1079.  
  1080.   (piece
  1081.      (name Queen)
  1082.       (help "Queen: can slide any number of squares in any direction")
  1083.      (description "Queen\A Queen moves any number of squares in a straight line.
  1084.          It may not leap over other pieces.
  1085.           In this variant, a Queen can't capture any Knights, Bishops, Rooks, or Queens.")
  1086.       (image White "images\Chess\SHaag\wqueen.bmp" "images\Chess\wqueen.bmp"
  1087.              Black "images\Chess\SHaag\bqueen.bmp" "images\Chess\bqueen.bmp")
  1088.       (moves
  1089.          (NP-slide n)
  1090.          (NP-slide e)
  1091.          (NP-slide s)
  1092.          (NP-slide w)
  1093.          (NP-slide ne)
  1094.          (NP-slide nw)
  1095.          (NP-slide se)
  1096.          (NP-slide sw)
  1097.       )
  1098.    )
  1099. )
  1100.  
  1101. ; **************************************************************************
  1102. (variant
  1103.    (title "Pocket Knight Chess")
  1104.    (description "Same as regular chess except that each side begins
  1105.        with an extra Knight `in his pocket.`  This Knight may dropped
  1106.      on any empty square in place of a regular move.");
  1107.    (history "Also known as Tombola Chess, this game was popular in the
  1108.        early 20th century.   Large tournaments were held in 1909 and 1910.
  1109.        In the early versions of the game, the `pocket knight` was either
  1110.        the queenside or kingside Knight, removed before the game.   The
  1111.        game is generally played today with the standard array and a third
  1112.        knight in hand.   The game has been played postally in NOST, and is
  1113.        seen as a good way to gently introduce orthodox players to variant
  1114.        play.")
  1115.    (strategy "Most of the strategy of chess is sound; indeed, games have been
  1116.        won without even using the pocket knight.   But possible drop squares
  1117.        for either side should be kept in mind; knight forks can be particularly
  1118.        devastating if the King and Queen, or Queen and Rook, are carelessly
  1119.        situated.")
  1120.    (board-setup
  1121.       (White
  1122.          (Pawn a2 b2 c2 d2 e2 f2 g2 h2)
  1123.          (Knight off 1 b1 g1)
  1124.          (Bishop c1 f1)
  1125.          (Rook a1 h1)
  1126.          (Queen d1)
  1127.          (King e1)
  1128.       )
  1129.       (Black
  1130.          (Pawn a7 b7 c7 d7 e7 f7 g7 h7)
  1131.          (Knight off 1 b8 g8)
  1132.          (Bishop c8 f8)
  1133.          (Rook a8 h8)
  1134.          (Queen d8)
  1135.          (King e8)
  1136.       )
  1137.    )
  1138.    (piece
  1139.       (name Knight)
  1140.       (help "Knight: moves like an `L`, 2 squares one way and one the other")
  1141.       (description "Knight\A Knight moves like an `L`, two squares vertically plus one
  1142.           horizontally, or two squares horizontally plus one vertically.  It
  1143.           hops over any pieces on the way.")
  1144.       (image White "images\Chess\SHaag\wknight.bmp" "images\Chess\wknight.bmp"
  1145.              Black "images\Chess\SHaag\bknight.bmp" "images\Chess\bknight.bmp")
  1146.       (moves
  1147.          (leap2 n ne)
  1148.          (leap2 n nw)
  1149.          (leap2 s se)
  1150.          (leap2 s sw)
  1151.          (leap2 e ne)
  1152.          (leap2 e se)
  1153.          (leap2 w nw)
  1154.          (leap2 w sw)
  1155.       )
  1156.       (drops ((verify empty?) add))
  1157.    )
  1158. )
  1159.  
  1160. ; **************************************************************************
  1161. ; TRAINING GAMES
  1162. ; **************************************************************************
  1163. (variant
  1164.    (title "-") ; --------------------------------------------------------
  1165. )
  1166.  
  1167. ; **************************************************************************
  1168. (variant
  1169.    (title "King vs. King")
  1170.    (description "The object for the White King is to reach on of the starred squares
  1171.       (f8 or h8) in the upper-right-hand corner of the chessboard.  The object for
  1172.       Black is to prevent White from reaching these squares.\\
  1173.       White can reach one of these squares by move 17.")
  1174.    (history "This endgame training puzzle appears in `Essential Chess Endings
  1175.       Explained Move by Move` (Chess Digest 1988) by International Master Jeremy Silman.")
  1176.    (strategy "White can force a win.  To solve this puzzle every time you'll need to
  1177.      understand the chess concepts of opposition, distant opposition, and outflanking.
  1178.      Choose `Show Solution` under the Help menu to see the solution against good defense
  1179.      by Black.")
  1180.   (option "highlight goals" true)
  1181.   (solution "Solutions\Chess\King_vs_King.zsg")
  1182.   (board-setup
  1183.      (White (King a1))
  1184.      (Black (King a8))
  1185.   )
  1186.   (win-condition (White) (or (absolute-config King (f8)) (absolute-config King (h8))) )
  1187.   (win-condition (Black) repetition)
  1188.   (loss-condition (White) repetition)
  1189.   (loss-condition (White Black) (checkmated King) ) ; needed to keep kings from touching
  1190. )
  1191.  
  1192. ; **************************************************************************
  1193. (variant
  1194.   (title "Knight Hunting")
  1195.   (description "The object for White is to capture the Knight, which he should be
  1196.      able to do.  Black's object is to prevent this and Black wins if a 3-fold
  1197.       repetition occurs.  Black also wins if he captures White's Rook.\\Passing is
  1198.      allowed.")
  1199.   (history "This endgame training puzzle appears in `Winning Chess: Endings`
  1200.      (Microsoft Press 1999) by International Grandmaster Yasser Seirawan.  It is
  1201.      useful practice for King and Rook vs. King and Knight endings.")
  1202.   (strategy "White can force a win, though it can be tricky.  To solve this puzzle
  1203.      you'll need to gradually restrict the Knight's movement to force it to the
  1204.      edge of the board where it can be trapped.  Choose `Show Solution` under the
  1205.      Help menu to see possible play.  See how few moves you can use to trap the Knight.")
  1206.   (option "pass turn" true)
  1207.   (solution "Solutions\Chess\Knight_Hunting.zsg")
  1208.   (board-setup
  1209.      (White
  1210.         (Rook b2)
  1211.         (King a1)
  1212.      )
  1213.      (Black
  1214.         (Knight e5)
  1215.      )
  1216.   )
  1217.   (loss-condition (White) (captured Rook))
  1218.   (loss-condition (Black) (captured Knight))
  1219.   (loss-condition (White) (checkmated King) ) ; to force King away from Knight checks
  1220.   (loss-condition (White) repetition)
  1221.   (win-condition (Black) repetition)
  1222. )
  1223.  
  1224.  
  1225. ; **************************************************************************
  1226. ; ODDS GAMES
  1227. ; **************************************************************************
  1228. (variant
  1229.   (title "-") ; --------------------------------------------------------
  1230. )
  1231.  
  1232. ; **************************************************************************
  1233. (variant
  1234.   (title "Pawn-Odds Chess")
  1235.   (board-setup
  1236.      (White
  1237.         (Pawn a2 b2 c2 d2 e2 f2 g2 h2)
  1238.         (Knight b1 g1)
  1239.         (Bishop c1 f1)
  1240.         (Rook a1 h1)
  1241.         (Queen d1)
  1242.         (King e1)
  1243.      )
  1244.      (Black
  1245.         (Pawn a7 b7 c7 d7 e7 g7 h7)
  1246.         (Knight b8 g8)
  1247.         (Bishop c8 f8)
  1248.         (Rook a8 h8)
  1249.         (Queen d8)
  1250.         (King e8)
  1251.      )
  1252.   )
  1253. )
  1254.  
  1255. ; **************************************************************************
  1256. (variant
  1257.   (title "Knight-Odds Chess")
  1258.   (board-setup
  1259.      (White
  1260.         (Pawn a2 b2 c2 d2 e2 f2 g2 h2)
  1261.         (Knight b1)
  1262.         (Bishop c1 f1)
  1263.         (Rook a1 h1)
  1264.         (Queen d1)
  1265.         (King e1)
  1266.      )
  1267.      (Black
  1268.         (Pawn a7 b7 c7 d7 e7 f7 g7 h7)
  1269.         (Knight b8 g8)
  1270.         (Bishop c8 f8)
  1271.         (Rook a8 h8)
  1272.         (Queen d8)
  1273.         (King e8)
  1274.      )
  1275.   )
  1276. )
  1277.  
  1278. ; **************************************************************************
  1279. (variant
  1280.   (title "Rook-Odds Chess")
  1281.   (board-setup
  1282.      (White
  1283.         (Pawn a2 b2 c2 d2 e2 f2 g2 h2)
  1284.         (Knight b1 g1)
  1285.         (Bishop c1 f1)
  1286.         (Rook h1)
  1287.         (Queen d1)
  1288.         (King e1)
  1289.      )
  1290.      (Black
  1291.         (Pawn a7 b7 c7 d7 e7 f7 g7 h7)
  1292.         (Knight b8 g8)
  1293.         (Bishop c8 f8)
  1294.         (Rook a8 h8)
  1295.         (Queen d8)
  1296.         (King e8)
  1297.      )
  1298.   )
  1299. )
  1300.  
  1301.  
  1302.  
  1303. ; **************************************************************************
  1304. ; Other Different Starting Positions
  1305. ; **************************************************************************
  1306. (variant
  1307.   (title "-") ; --------------------------------------------------------
  1308. )
  1309.  
  1310. ; **************************************************************************
  1311. (variant
  1312.   (title "King and Pawns")
  1313.   (strategy "Try to promote a Pawn in order to checkmate, sacrificing Pawns
  1314.      if necessary to break through.  In order to win you'll need to make
  1315.       very active use of your King.  Avoid weaknesses where the opposing King
  1316.       might be allowed to invade your position and steal your Pawns.")
  1317.    (board-setup
  1318.       (White
  1319.          (Pawn a2 b2 c2 d2 e2 f2 g2 h2)
  1320.          (King e1)
  1321.      )
  1322.       (Black
  1323.          (Pawn a7 b7 c7 d7 e7 f7 g7 h7)
  1324.          (King e8)
  1325.       )
  1326.    )
  1327. )
  1328.  
  1329. ; **************************************************************************
  1330. (variant
  1331.    (title "Little (3 Pawn) Chess")
  1332.    (history "This game is commonly seen on Internet chess servers and there
  1333.       are even computer programs written to play it.")
  1334.    (strategy "Try to get a Queen to checkmate with.  Surprisingly, there is
  1335.       no simple solution to this variation.  You'll want to use your King
  1336.      to stop the enemy Pawns, while your opponent does likewise.  There
  1337.      are various patterns where a King can halt Pawns, but then one side
  1338.      will be in `zugzwang` and be forced to move.  If the Pawns have to move
  1339.      they will generally be lost, while if the King has to move, the Pawns
  1340.      will have an opportunity to advance further down the board.  Because
  1341.      of zugzwang, it is sometimes advantageous to keep a Pawn on its
  1342.      starting square, so it will have the option to moving one square instead
  1343.      of two in order to waste a tempo.  When the Pawns get to the sixth rank,
  1344.      there are often ways in which a Pawn may be sacrificed in order to gain promotion.")
  1345.   (board-setup
  1346.      (White
  1347.         (Pawn a2 b2 c2)
  1348.         (King d1)
  1349.      )
  1350.      (Black
  1351.         (Pawn f7 g7 h7)
  1352.         (King e8)
  1353.      )
  1354.   )
  1355. )
  1356.  
  1357. ; **************************************************************************
  1358. (variant
  1359.   (title "Trapeze")
  1360.   (board-setup
  1361.      (White
  1362.         (Pawn a2 b2 c2 d2 e2 f2 g2 h2
  1363.               b3 c3 c4 d4 e4 f3 f4 g3)
  1364.         (Knight b1 g1)
  1365.         (Bishop c1 f1)
  1366.         (Rook a1 h1)
  1367.         (King e1)
  1368.      )
  1369.      (Black
  1370.         (Pawn a7 b7 c7 d7 e7 f7 g7 h7)
  1371.         (Knight b8 g8)
  1372.         (Bishop c8 f8)
  1373.         (Rook a8 h8)
  1374.         (Queen d8)
  1375.         (King e8)
  1376.      )
  1377.   )
  1378. )
  1379.  
  1380. ; **************************************************************************
  1381. (variant
  1382.   (title "Shuffle #1")
  1383.   (board-setup
  1384.      (White
  1385.         (Pawn a2 b2 c2 d2 e2 f2 g2 h2)
  1386.         (Knight b1 e1)
  1387.         (Bishop a1 h1)
  1388.         (Rook d1 f1)
  1389.         (Queen c1)
  1390.         (King g1)
  1391.      )
  1392.      (Black
  1393.         (Pawn a7 b7 c7 d7 e7 f7 g7 h7)
  1394.         (Knight g8 d8)
  1395.         (Bishop h8 a8)
  1396.         (Rook e8 c8)
  1397.         (Queen f8)
  1398.         (King b8)
  1399.      )
  1400.   )
  1401. )
  1402.  
  1403. ; **************************************************************************
  1404. (variant
  1405.   (title "Shuffle #2")
  1406.   (board-setup
  1407.      (White
  1408.         (Pawn a2 b2 c2 d2 e2 f2 g2 h2)
  1409.         (Knight d1 f1)
  1410.         (Bishop e1 h1)
  1411.         (Rook a1 b1)
  1412.         (Queen c1)
  1413.         (King g1)
  1414.      )
  1415.      (Black
  1416.         (Pawn a7 b7 c7 d7 e7 f7 g7 h7)
  1417.         (Knight e8 c8)
  1418.         (Bishop d8 a8)
  1419.         (Rook h8 g8)
  1420.         (Queen f8)
  1421.         (King b8)
  1422.      )
  1423.   )
  1424. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement