bishbosh 0.0.0.6 → 0.0.0.7
raw patch · 36 files changed
+103/−86 lines, 36 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- BishBosh.Attribute.Direction: instance GHC.Arr.Ix BishBosh.Attribute.Direction.Direction
- BishBosh.Attribute.LogicalColour: instance GHC.Arr.Ix BishBosh.Attribute.LogicalColour.LogicalColour
- BishBosh.Attribute.Rank: instance GHC.Arr.Ix BishBosh.Attribute.Rank.Rank
- BishBosh.Cartesian.Coordinates: instance (GHC.Enum.Enum x, GHC.Enum.Enum y, GHC.Classes.Ord x, GHC.Classes.Ord y) => GHC.Arr.Ix (BishBosh.Cartesian.Coordinates.Coordinates x y)
- BishBosh.Component.Piece: instance GHC.Arr.Ix BishBosh.Component.Piece.Piece
- BishBosh.Component.Zobrist: instance (GHC.Arr.Ix x, Data.Bits.FiniteBits positionHash, GHC.Enum.Enum x, GHC.Enum.Enum y, GHC.Num.Num positionHash, GHC.Classes.Ord y, System.Random.Random positionHash) => Data.Default.Class.Default (BishBosh.Component.Zobrist.Zobrist x y positionHash)
- BishBosh.Component.Zobrist: instance (GHC.Enum.Enum x, GHC.Enum.Enum y, GHC.Classes.Ord y, GHC.Show.Show positionHash, GHC.Show.Show x, GHC.Show.Show y, GHC.Arr.Ix x) => GHC.Show.Show (BishBosh.Component.Zobrist.Zobrist x y positionHash)
- BishBosh.Model.Game: instance (GHC.Arr.Ix x, GHC.Enum.Enum x, GHC.Enum.Enum y, GHC.Classes.Ord y) => BishBosh.Component.Zobrist.Hashable2D BishBosh.Model.Game.Game x y
- BishBosh.State.EnPassantAbscissa: instance GHC.Arr.Ix x => BishBosh.Component.Zobrist.Hashable1D BishBosh.State.EnPassantAbscissa.EnPassantAbscissa x
- BishBosh.State.Position: instance (GHC.Arr.Ix x, GHC.Enum.Enum x, GHC.Enum.Enum y, GHC.Classes.Ord y) => BishBosh.Component.Zobrist.Hashable2D BishBosh.State.Position.Position x y
+ BishBosh.Attribute.Direction: instance GHC.Ix.Ix BishBosh.Attribute.Direction.Direction
+ BishBosh.Attribute.LogicalColour: instance GHC.Ix.Ix BishBosh.Attribute.LogicalColour.LogicalColour
+ BishBosh.Attribute.Rank: instance GHC.Ix.Ix BishBosh.Attribute.Rank.Rank
+ BishBosh.Cartesian.Coordinates: instance (GHC.Enum.Enum x, GHC.Enum.Enum y, GHC.Classes.Ord x, GHC.Classes.Ord y) => GHC.Ix.Ix (BishBosh.Cartesian.Coordinates.Coordinates x y)
+ BishBosh.Component.Piece: instance GHC.Ix.Ix BishBosh.Component.Piece.Piece
+ BishBosh.Component.Zobrist: instance (GHC.Enum.Enum x, GHC.Enum.Enum y, GHC.Classes.Ord y, GHC.Show.Show positionHash, GHC.Show.Show x, GHC.Show.Show y, GHC.Ix.Ix x) => GHC.Show.Show (BishBosh.Component.Zobrist.Zobrist x y positionHash)
+ BishBosh.Component.Zobrist: instance (GHC.Ix.Ix x, Data.Bits.FiniteBits positionHash, GHC.Enum.Enum x, GHC.Enum.Enum y, GHC.Num.Num positionHash, GHC.Classes.Ord y, System.Random.Random positionHash) => Data.Default.Class.Default (BishBosh.Component.Zobrist.Zobrist x y positionHash)
+ BishBosh.Model.Game: instance (GHC.Ix.Ix x, GHC.Enum.Enum x, GHC.Enum.Enum y, GHC.Classes.Ord y) => BishBosh.Component.Zobrist.Hashable2D BishBosh.Model.Game.Game x y
+ BishBosh.State.EnPassantAbscissa: instance GHC.Ix.Ix x => BishBosh.Component.Zobrist.Hashable1D BishBosh.State.EnPassantAbscissa.EnPassantAbscissa x
+ BishBosh.State.Position: instance (GHC.Ix.Ix x, GHC.Enum.Enum x, GHC.Enum.Enum y, GHC.Classes.Ord y) => BishBosh.Component.Zobrist.Hashable2D BishBosh.State.Position.Position x y
Files
- bishbosh.cabal +1/−1
- bishbosh.spec +1/−1
- changelog.markdown +4/−0
- man/man1/bishbosh.1 +7/−7
- man/man5/bishbosh.5 +16/−16
- src-exe/BishBosh/Concurrent/Pondering.hs +1/−1
- src-lib/BishBosh/Attribute/CaptureMoveSortAlgorithm.hs +2/−2
- src-lib/BishBosh/Attribute/MoveType.hs +1/−1
- src-lib/BishBosh/Attribute/PhysicalColour.hs +1/−1
- src-lib/BishBosh/Attribute/RankValues.hs +2/−2
- src-lib/BishBosh/Component/Turn.hs +1/−1
- src-lib/BishBosh/Component/Zobrist.hs +2/−2
- src-lib/BishBosh/ContextualNotation/PGN.hs +2/−2
- src-lib/BishBosh/ContextualNotation/PositionHashQualifiedMoveTree.hs +1/−1
- src-lib/BishBosh/Data/Ratio.hs +1/−1
- src-lib/BishBosh/Data/RoseTree.hs +6/−1
- src-lib/BishBosh/Evaluation/Fitness.hs +6/−6
- src-lib/BishBosh/Input/CriteriaWeights.hs +6/−6
- src-lib/BishBosh/Model/DrawReason.hs +1/−1
- src-lib/BishBosh/Model/Game.hs +1/−1
- src-lib/BishBosh/Model/GameTree.hs +1/−1
- src-lib/BishBosh/Model/Result.hs +1/−1
- src-lib/BishBosh/Notation/Coordinate.hs +1/−1
- src-lib/BishBosh/Notation/MoveNotation.hs +2/−2
- src-lib/BishBosh/Notation/Smith.hs +1/−1
- src-lib/BishBosh/Property/ForsythEdwards.hs +1/−1
- src-lib/BishBosh/Search/AlphaBeta.hs +2/−2
- src-lib/BishBosh/Search/KillerMoves.hs +2/−2
- src-lib/BishBosh/Search/Transpositions.hs +1/−3
- src-lib/BishBosh/State/EnPassantAbscissa.hs +20/−10
- src-lib/BishBosh/State/MaybePieceByCoordinates.hs +1/−1
- src-lib/BishBosh/State/Position.hs +2/−2
- src-test/BishBosh/Test/HUnit/Component/Zobrist.hs +1/−1
- src-test/BishBosh/Test/HUnit/Model/GameTree.hs +1/−1
- src-test/BishBosh/Test/HUnit/Search/Search.hs +1/−1
- src-test/BishBosh/Test/QuickCheck/State/Position.hs +2/−2
bishbosh.cabal view
@@ -14,7 +14,7 @@ -- along with BishBosh. If not, see <http://www.gnu.org/licenses/>. Name: bishbosh-Version: 0.0.0.6+Version: 0.0.0.7 Cabal-version: >= 1.10 Copyright: (C) 2018 Dr. Alistair Ward License: GPL
bishbosh.spec view
@@ -24,7 +24,7 @@ Summary: BishBosh is a chess-game. Name: bishbosh-Version: 0.0.0.6+Version: 0.0.0.7 Release: 1 License: GPLv3 # From '/usr/share/doc/packages/rpm/GROUPS'.
changelog.markdown view
@@ -20,3 +20,7 @@ Fixed failure to persist game-state after requesting that the game be restarted. Fixed parsing of **TextEncoding** in **PGNOptions**. Replaced module **Distribution.Verbosity** with **BishBosh.Input.Verbosity**.++## 0.0.0.7+Rewrote function **BishBosh.Data.RoseTree.countTerminalNodes** in accordance with the suggestions of David Feuer.+Amended function **BishBosh.State.EnPassantAbscissa.mkMaybeEnPassantAbscissa** to guard against exposing one's King after En-passant capture.
man/man1/bishbosh.1 view
@@ -24,14 +24,14 @@ Configurable <\fBhttps://en.wikipedia.org/wiki/Chess_notation\fR>. .IP \(bu The ability to read PGN-databases of standard openings & archived games,-in which it can match both <\fBhttps://chessprogramming.wikispaces.com/Transposition\fR>s & colour-flipped (<\fBhttps://chessprogramming.wikispaces.com/Color+Flipping\fR>) positions.+in which it can match both <\fBhttps://www.chessprogramming.org/Transposition\fR>s & colour-flipped (<\fBhttps://www.chessprogramming.org/Color_Flipping\fR>) positions. .IP \(bu Automation of the moves for either, neither, or both players. Both the evaluation of moves & the search for the optimum, are highly configurable; see \fBsection-5\fR of the man-pages. .IP \(bu Optional hints for manual players. .IP \(bu-<\fBhttps://chessprogramming.wikispaces.com/Pondering\fR>.+<\fBhttps://www.chessprogramming.org/Pondering\fR>. .SS Implementation Some understanding of the algorithm used to automatically select moves, is useful either when configuring this application or when interpreting the esoteric feedback available after move-selection (given "\fB--verbosity=Deafening\fR"). The algorithm first compares the position with those in the referenced PGN-databases; a looser criterion than whether a matching move-sequence exists.@@ -39,14 +39,14 @@ The next move will be selected randomly from the subset of victorious matching positions, in preference to the non-victorious subset. .PP On failure to match the position with an archived game, the tree of all possible moves until the end of the game, is constructed & statically sorted to advance the subsequent evaluation of capture-moves,-using either <\fBhttps://chessprogramming.wikispaces.com/MVV-LVA\fR> or <\fBhttps://chessprogramming.wikispaces.com/Static+Exchange+Evaluation\fR>.-On each move, this tree's non-capture moves are dynamically sorted using the <\fBhttps://chessprogramming.wikispaces.com/Killer+Heuristic\fR> & the <\fBhttps://chessprogramming.wikispaces.com/History+Heuristic\fR>.+using either <\fBhttps://www.chessprogramming.org/MVV-LVA\fR> or <\fBhttps://www.chessprogramming.org/Static_Exchange_Evaluation\fR>.+On each move, this tree's non-capture moves are dynamically sorted using the <\fBhttps://www.chessprogramming.org/Killer_Heuristic\fR> & the <\fBhttps://www.chessprogramming.org/History_Heuristic\fR>. .br-This tree is then searched using a <\fBhttps://chessprogramming.wikispaces.com/Negamax\fR> algorithm with <\fBhttps://chessprogramming.wikispaces.com/Alpha-Beta\fR> pruning,+This tree is then searched using a <\fBhttps://www.chessprogramming.org/Negamax\fR> algorithm with <\fBhttps://www.chessprogramming.org/Alpha-Beta\fR> pruning, over a constant configurable number of plies, to find the optimal move according to the weighted-mean of various criteria described in \fBsection-5\fR of the man-pages. .br-Shortcuts in the search for the optimal move are taken on encountering either <\fBhttps://chessprogramming.wikispaces.com/Repetitions\fR> in the move-sequence,-or transpositions (<\fBhttps://chessprogramming.wikispaces.com/Transposition\fR>) of sibling games.+Shortcuts in the search for the optimal move are taken on encountering either <\fBhttps://www.chessprogramming.org/Repetitions\fR> in the move-sequence,+or transpositions (<\fBhttps://www.chessprogramming.org/Transposition\fR>) of sibling games. .SH OPTIONS .SS "Input" .TP
man/man5/bishbosh.5 view
@@ -16,7 +16,7 @@ Whether to incrementally generate position-hashes & evaluate the piece-square value, from the previous values; otherwise these quantities are evaluated from scratch. This option slightly reduces memory-requirement, but doesn't affect the result. .IP \(bu-\fBrankValues\fR: defines the value within the closed unit interval "\fB[0, 1]\fR", of each type of piece, defaulting (ref. <\fBhttps://chessprogramming.wikispaces.com/Point+Value\fR>) to:+\fBrankValues\fR: defines the value within the closed unit interval "\fB[0, 1]\fR", of each type of piece, defaulting (ref. <\fBhttps://www.chessprogramming.org/Point_Value\fR>) to: .TS lb lb l l@@ -39,14 +39,14 @@ lb l lb l . Criterion Metric Ref Notes ========= ====== === =====-material Quantifies the value of the pieces remaining per side. <https://chessprogramming.wikispaces.com/Material> This is dependent on the value of each type of piece; see "\fBrankValues\fR".-mobility The difference between the number of moves available per side. <https://chessprogramming.wikispaces.com/Mobility> Actually the reciprocal is measured, to emphasis the reduction caused by checking one's opponent.-pieceSquareValue Quantifies the position held by the pieces per side. <https://chessprogramming.wikispaces.com/Piece-Square+Tables> This metric includes aspects of both "\fBmaterial\fR" & "\fBmobility\fR". The value can be made linearly dependent on progress through the game.+material Quantifies the value of the pieces remaining per side. <https://www.chessprogramming.org/Material> This is dependent on the value of each type of piece; see "\fBrankValues\fR".+mobility The difference between the number of moves available per side. <https://www.chessprogramming.org/Mobility> Actually the reciprocal is measured, to emphasis the reduction caused by checking one's opponent.+pieceSquareValue Quantifies the position held by the pieces per side. <https://www.chessprogramming.org/Piece-Square_Tables> This metric includes aspects of both "\fBmaterial\fR" & "\fBmobility\fR". The value can be made linearly dependent on progress through the game. castlingPotential Whether each player has been permanently prevented from castling. Reflects the disadvantage of moving one's King, thus preventing subsequent castling. defence The difference between the number of pieces defending one's own, per side. There's neither any penalty for gaps in this defence nor account made of the value of the defended piece; it's just the total number of defenders.-doubledPawns The difference between the total number of doubled Pawns per side. <https://chessprogramming.wikispaces.com/Doubled+Pawn> Reflects the reduced mobility of such Pawns.-isolatedPawns The difference between the total number of isolated Pawns per side. <https://chessprogramming.wikispaces.com/Isolated+Pawn> Reflects the lack of defence from adjacent Pawns.-passedPawns The difference between the total number of passed Pawns per side. <https://chessprogramming.wikispaces.com/Passed+Pawn> Reflects improved promotion-prospects.+doubledPawns The difference between the total number of doubled Pawns per side. <https://www.chessprogramming.org/Doubled_Pawn> Reflects the reduced mobility of such Pawns.+isolatedPawns The difference between the total number of isolated Pawns per side. <https://www.chessprogramming.org/Isolated_Pawn> Reflects the lack of defence from adjacent Pawns.+passedPawns The difference between the total number of passed Pawns per side. <https://www.chessprogramming.org/Passed_Pawn> Reflects improved promotion-prospects. .TE .IP Other criteria could be measured, but orthogonality is problematic.@@ -86,35 +86,35 @@ lb l . Value Meaning ===== =======-MVVLVA moves are advanced depending on the value of rank of the piece they capture, but where this is equal, those which achieve this using a less valuable piece are preferred; <\fBhttps://chessprogramming.wikispaces.com/MVV-LVA\fR>. This is highly effective.-SEE moves are advanced depending on the net material gain resulting from any battle at the destination; <\fBhttps://chessprogramming.wikispaces.com/Static+Exchange+Evaluation\fR>. This is not currently competitive.+MVVLVA moves are advanced depending on the value of rank of the piece they capture, but where this is equal, those which achieve this using a less valuable piece are preferred; <\fBhttps://www.chessprogramming.org/MVV-LVA\fR>. This is highly effective.+SEE moves are advanced depending on the net material gain resulting from any battle at the destination; <\fBhttps://www.chessprogramming.org/Static_Exchange_Evaluation\fR>. This is not currently competitive. .TE .IP Neither of these sort-algorithms affects the relative order of non-capture moves; cf. \fBpreferMovesTowardsCentre\fR & \fBsortOnStandardOpeningMoveFrequency\fR. This is performed after \fBsortOnStandardOpeningMoveFrequency\fR. .IP \(bu-\fBminimumHammingDistance\fR \fIInt\fR: the optional positive lower bound on the Hamming-distance between any of the random numbers used to generate Zobrist hashes from positions; <\fBhttps://chessprogramming.wikispaces.com/Zobrist+Hashing\fR>.+\fBminimumHammingDistance\fR \fIInt\fR: the optional positive lower bound on the Hamming-distance between any of the random numbers used to generate Zobrist hashes from positions; <\fBhttps://www.chessprogramming.org/Zobrist_Hashing\fR>. .br CAVEAT: linear independence of the bit-vectors is a better measure than Hamming-distance, of the quality of the selected random numbers. .IP \(bu-\fBretireKillerMovesAfter\fR \fIInt\fR: the optional non-negative number of full moves (one by each player) after which killer-moves are retired; <\fBhttps://chessprogramming.wikispaces.com/Killer+Move\fR>.+\fBretireKillerMovesAfter\fR \fIInt\fR: the optional non-negative number of full moves (one by each player) after which killer-moves are retired; <\fBhttps://www.chessprogramming.org/Killer_Move\fR>. If unspecified, killer-moves won't even be recorded. .br N.B.: this is highly effective up to about \fB3\fR, beyond which returns diminish. .br-Killer-moves are used to dynamically sort the moves available from a position, based on whether similar moves previously triggered beta-cutoff; <\fBhttps://chessprogramming.wikispaces.com/Beta-Cutoff\fR>.+Killer-moves are used to dynamically sort the moves available from a position, based on whether similar moves previously triggered beta-cutoff; <\fBhttps://www.chessprogramming.org/Beta-Cutoff\fR>. .IP \(bu-\fBtrapRepeatedPositions\fR: whether to short-circuit the fitness-evaluation of \fIposition\fRs which have been visited before in the current game; <\fBhttps://chessprogramming.wikispaces.com/Repetitions\fR>.+\fBtrapRepeatedPositions\fR: whether to short-circuit the fitness-evaluation of \fIposition\fRs which have been visited before in the current game; <\fBhttps://www.chessprogramming.org/Repetitions\fR>. These situations result from loops of consecutive reversible moves, in the move-tree which defines the game of chess. The fitness of such \fIposition\fRs can be derived by induction, since were one to search from this \fIposition\fR, one would ultimately arrive back another time, so the fitness of this future \fIposition\fR equals the current fitness. .br N.B.: this doesn't typically improve performance in either space or time. .IP \(bu-\fBusePondering\fR: whether an automated player should plan their next move, based on a prediction of the opponent's response, & thus make use their opponent's thinking-time; <\fBhttps://chessprogramming.wikispaces.com/Pondering\fR>.+\fBusePondering\fR: whether an automated player should plan their next move, based on a prediction of the opponent's response, & thus make use their opponent's thinking-time; <\fBhttps://www.chessprogramming.org/Pondering\fR>. .IP \(bu \fBtranspositions\fR: these can be used to reorder the evaluation of moves,-based on the results previously found for identical \fIposition\fRs in sibling games reached by an alternative sequence of arbitrary moves; <\fBhttps://chessprogramming.wikispaces.com/Transposition\fR>.+based on the results previously found for identical \fIposition\fRs in sibling games reached by an alternative sequence of arbitrary moves; <\fBhttps://www.chessprogramming.org/Transposition\fR>. .TS lb lb lb l l l@@ -134,7 +134,7 @@ ========= ==== ======= ======= tryToMatchMoves Bool True whether to attempt to exactly match the moves already made, with a standard opening; i.e. without matching transpositions. tryToMatchViaJoiningMove Bool True whether to attempt to join the current position (irrespective of the means by which it was achieved) to a standard opening that's only one move away.-tryToMatchColourFlippedPosition Bool True whether to attempt to match a colour-flipped (<\fBhttps://chessprogramming.wikispaces.com/Color+Flipping\fR>) version of the current position with a standard opening.+tryToMatchColourFlippedPosition Bool True whether to attempt to match a colour-flipped (<\fBhttps://www.chessprogramming.org/Color_Flipping\fR>) version of the current position with a standard opening. .TE .IP \(bu \fBsearchDepth\fR \fIInt\fR, defaulting to "\fB4\fR" (minimum "\fB1\fR"): the number of plies (half moves) to search ahead, when selecting the next move.
src-exe/BishBosh/Concurrent/Pondering.hs view
@@ -21,7 +21,7 @@ [@DESCRIPTION@] - * Implements <https://chessprogramming.wikispaces.com/Pondering> by an automatic player during a manual player's move.+ * Implements <https://www.chessprogramming.org/Pondering> by an automatic player during a manual player's move. * Using the last move one can predict the opponent's response, & consequently one's counter-move. If the opponent makes the expected response, then this speculative result can be used,
src-lib/BishBosh/Attribute/CaptureMoveSortAlgorithm.hs view
@@ -42,8 +42,8 @@ -- | The algorithm by which moves are sorted. data CaptureMoveSortAlgorithm- = MVVLVA -- ^ <https://chessprogramming.wikispaces.com/MVV-LVA>.- | SEE -- ^ <https://chessprogramming.wikispaces.com/Static+Exchange+Evaluation>.+ = MVVLVA -- ^ <https://www.chessprogramming.org/MVV-LVA>.+ | SEE -- ^ <https://www.chessprogramming.org/Static_Exchange_Evaluation>. deriving (Eq, Read, Show) instance Control.DeepSeq.NFData CaptureMoveSortAlgorithm where
src-lib/BishBosh/Attribute/MoveType.hs view
@@ -199,7 +199,7 @@ isPromotion (Normal _ (Just _)) = True isPromotion _ = False --- | <https://chessprogramming.wikispaces.com/Quiet+Moves>.+-- | <https://www.chessprogramming.org/Quiet_Moves>. isQuiet :: MoveType -> Bool isQuiet (Normal Nothing Nothing) = True isQuiet moveType = isCastle moveType
src-lib/BishBosh/Attribute/PhysicalColour.hs view
@@ -113,7 +113,7 @@ range :: [PhysicalColour] range = [minBound .. maxBound] --- | A colour-code, as used by terminal-emulators; <https://en.wikipedia.org/wiki/ANSI_escape_code ANSI escape-codes>.+-- | A colour-code, as used by terminal-emulators; <https://en.wikipedia.org/wiki/ANSI_escape_code>. type ANSIColourCode = Int -- | Offset the specified colour-code, so that it applies to the foreground.
src-lib/BishBosh/Attribute/RankValues.hs view
@@ -23,7 +23,7 @@ * The relative values of the various /rank/s of chess-piece. - * <https://en.wikipedia.org/wiki/Chess_piece_relative_value#Hans_Berliner.27s_system Chess-piece relative values>+ * <https://en.wikipedia.org/wiki/Chess_piece_relative_value#Hans_Berliner.27s_system%20Chess-piece%20relative%20values> -} module BishBosh.Attribute.RankValues(@@ -72,7 +72,7 @@ instance Real rankValue => Property.ShowFloat.ShowFloat (RankValues rankValue) where showsFloat fromDouble = Text.ShowList.showsAssociationList' . map (show *** fromDouble . realToFrac) . Data.Array.IArray.assocs . deconstruct --- Derived from Larry Kaufman's values; <https://chessprogramming.wikispaces.com/Point+Value>.+-- Derived from Larry Kaufman's values; <https://www.chessprogramming.org/Point_Value>. instance ( Fractional rankValue, Ord rankValue,
src-lib/BishBosh/Component/Turn.hs view
@@ -146,7 +146,7 @@ compareByLVA evaluateRank MkTurn { getRank = rankL } MkTurn { getRank = rankR } = Attribute.Rank.compareByLVA evaluateRank rankL rankR {- |- * Compares /turn/s by <https://chessprogramming.wikispaces.com/MVV-LVA>.+ * Compares /turn/s by <https://www.chessprogramming.org/MVV-LVA>. * This orders the most valuable victim of an attack first, but when victims are of equal rank, orders the least valuable aggressor first.
src-lib/BishBosh/Component/Zobrist.hs view
@@ -22,7 +22,7 @@ [@DESCRIPTION@] - * <https://chessprogramming.wikispaces.com/Zobrist+Hashing>.+ * <https://www.chessprogramming.org/Zobrist_Hashing>. * Defines the random-numbers required to construct a hash of a chess-position. @@ -110,7 +110,7 @@ def = mkZobrist Nothing $ System.Random.mkStdGen 0 {- |- * <https://chessprogramming.wikispaces.com/Population+Count#HammingDistance>.+ * <https://www.chessprogramming.org/Population_Count#HammingDistance>. * Quantifies the Hamming distance between all combinations of pairs of the random numbers used to compose hashes.
src-lib/BishBosh/ContextualNotation/PGN.hs view
@@ -20,7 +20,7 @@ {- | [@AUTHOR@] Dr. Alistair Ward - [@DESCRIPTION@] Defines a parser for PGN; <https://www.chessclub.com/user/help/pgn-spec>.+ [@DESCRIPTION@] Defines a parser for PGN; <https://www.chessclub.com/help/pgn-spec>. -} module BishBosh.ContextualNotation.PGN(@@ -359,7 +359,7 @@ ] {- |- * Represents the specified /game/ in /Portable Game Notation/; <https://www.chessclub.com/user/help/pgn-spec>.+ * Represents the specified /game/ in /Portable Game Notation/; <https://www.chessclub.com/help/pgn-spec>. * This function is only responsible for the line defining the numbered sequence of /move/s represented in SAN. -}
src-lib/BishBosh/ContextualNotation/PositionHashQualifiedMoveTree.hs view
@@ -181,7 +181,7 @@ {- | * For all matching /position/s, return the subsequent /qualifiedMove/. - * By matching the /position/ rather than the precise sequence of /move/s, transpositions <https://chessprogramming.wikispaces.com/Transposition> can also be identified.+ * By matching the /position/ rather than the precise sequence of /move/s, transpositions <https://www.chessprogramming.org/Transposition> can also be identified. * CAVEAT: a null list can result from either match-failure, or a match with the final /move/ of a /game/. -}
src-lib/BishBosh/Data/Ratio.hs view
@@ -25,7 +25,7 @@ [@CAVEAT@] 'Rational' numbers are converted imprecisely to floating-point for representation as XML.- To remedy the loss of precision on reading from XML, they're rounded to the /epsilon/ for IEEE double-precision <https://en.wikipedia.org/wiki/Machine_epsilon Machine epsilon>.+ To remedy the loss of precision on reading from XML, they're rounded to the /epsilon/ for IEEE double-precision <https://en.wikipedia.org/wiki/Machine_epsilon>. -} module BishBosh.Data.Ratio(
src-lib/BishBosh/Data/RoseTree.hs view
@@ -41,12 +41,17 @@ import qualified Data.List import qualified Data.Tree --- | Counts the number of terminal nodes.+-- Counts the number of terminal nodes. countTerminalNodes :: Num nodes => Data.Tree.Tree a -> nodes+{- countTerminalNodes Data.Tree.Node { Data.Tree.subForest = [] } = 1 countTerminalNodes Data.Tree.Node { Data.Tree.subForest = forest } = Data.List.foldl' ( \acc -> (+ acc) . countTerminalNodes {-recurse-} ) 0 forest+-}+countTerminalNodes = go 0 where+ go acc Data.Tree.Node { Data.Tree.subForest = [] } = acc + 1+ go acc Data.Tree.Node { Data.Tree.subForest = forest } = Data.List.foldl' go acc forest -- | Returns a string which graphically represents the tree. drawTree :: (a -> String) -> Data.Tree.Tree a -> String
src-lib/BishBosh/Evaluation/Fitness.hs view
@@ -142,7 +142,7 @@ Just turn = Model.Game.maybeLastTurn game qualifiedMove = Component.Turn.getQualifiedMove turn --- | Measure the arithmetic difference between the total /rank-value/ of the /piece/s currently held by either side; <https://chessprogramming.wikispaces.com/Material>.+-- | Measure the arithmetic difference between the total /rank-value/ of the /piece/s currently held by either side; <https://www.chessprogramming.org/Material>. measureValueOfMaterial :: ( Fractional criterionValue, Fractional rankValue,@@ -166,7 +166,7 @@ ) 0 . Data.Array.IArray.assocs . State.Board.getNPiecesDifferenceByRank {-which arbitrarily counts White pieces as positive & Black as negative-} $ Model.Game.getBoard game {- |- * Count the difference between the reciprocals (cf. <https://chessprogramming.wikispaces.com/Mobility>), of the total number of /move/s available to each player.+ * Count the difference between the reciprocals (cf. <https://www.chessprogramming.org/Mobility>), of the total number of /move/s available to each player. * Using the reciprocal facilitates mapping into the /closed unit-interval/, & also emphasises the difference between having just one available move & having zero (i.e. mate). In consequence, it is more about restricting the opponent's mobility (particularly the @King@) rather than increasing one's own.@@ -223,7 +223,7 @@ ) {- |- * Measure the arithmetic difference between the number of /doubled/ @Pawn@s on either side; <https://chessprogramming.wikispaces.com/Doubled+Pawn>.+ * Measure the arithmetic difference between the number of /doubled/ @Pawn@s on either side; <https://www.chessprogramming.org/Doubled_Pawn>. * N.B.: measures tripled @Pawn@s as equivalent to two doubled @Pawn@s. @@ -244,7 +244,7 @@ ) $ State.Board.getNPawnsByFileByLogicalColour (Model.Game.getBoard game) ! logicalColour {- |- * Measure the arithmetic difference between the number of /isolated/ @Pawn@s on either side; <https://chessprogramming.wikispaces.com/Isolated+Pawn>.+ * Measure the arithmetic difference between the number of /isolated/ @Pawn@s on either side; <https://www.chessprogramming.org/Isolated_Pawn>. * CAVEAT: this is a negative attribute, so the weighted normalised value shouldn't exceed the reduction due to 'measureValueOfMaterial' resulting from a @Pawn@-sacrifice. -}@@ -270,7 +270,7 @@ ) 0 nPawnsByFile where nPawnsByFile = State.Board.getNPawnsByFileByLogicalColour (Model.Game.getBoard game) ! logicalColour --- | Measure the arithmetic difference between the number of /passed/ @Pawn@s on either side; <https://chessprogramming.wikispaces.com/Passed+Pawn>.+-- | Measure the arithmetic difference between the number of /passed/ @Pawn@s on either side; <https://www.chessprogramming.org/Passed_Pawn>. measureValueOfPassedPawns :: forall x y criterionValue. ( Enum y, Fractional criterionValue,@@ -328,7 +328,7 @@ {- | * Evaluates the fitness of the /board/ from the perspective of the last player to move. If the game has ended, the fitness is maximum for checkmate or zero for a draw,- but otherwise is the /weighted mean/ of various criteria; <https://chessprogramming.wikispaces.com/Evaluation>.+ but otherwise is the /weighted mean/ of various criteria; <https://www.chessprogramming.org/Evaluation>. * Also returns the break-down of those /criterion-value/s with a non-zero /criterion-weight/.
src-lib/BishBosh/Input/CriteriaWeights.hs view
@@ -114,14 +114,14 @@ & this value shouldn't be less than their weighted normalised /rank-value/, otherwise sacrifice would be beneficial. -} data CriteriaWeights criterionWeight = MkCriteriaWeights {- getWeightOfMaterial :: Attribute.CriterionWeight.CriterionWeight criterionWeight, -- ^ The arithmetic difference between the total /rank-value/ of the /piece/s currently in play on either side; <https://chessprogramming.wikispaces.com/Material>.- getWeightOfMobility :: Attribute.CriterionWeight.CriterionWeight criterionWeight, -- ^ The arithmetic difference between the reciprocal of the number of destinations available to the /piece/s of either side. N.B. this weight can be derived from 'getWeightOfMaterial' since losing a @Queen@ is less significant than reducing mobility to zero; <https://chessprogramming.wikispaces.com/Mobility>.+ getWeightOfMaterial :: Attribute.CriterionWeight.CriterionWeight criterionWeight, -- ^ The arithmetic difference between the total /rank-value/ of the /piece/s currently in play on either side; <https://www.chessprogramming.org/Material>.+ getWeightOfMobility :: Attribute.CriterionWeight.CriterionWeight criterionWeight, -- ^ The arithmetic difference between the reciprocal of the number of destinations available to the /piece/s of either side. N.B. this weight can be derived from 'getWeightOfMaterial' since losing a @Queen@ is less significant than reducing mobility to zero; <https://www.chessprogramming.org/Mobility>. getWeightOfPieceSquareValue :: Attribute.CriterionWeight.CriterionWeight criterionWeight, -- ^ The arithmetic difference in the values of the squares occupied by the pieces of either side. getWeightOfCastlingPotential :: Attribute.CriterionWeight.CriterionWeight criterionWeight, -- ^ Whether each player has been permanently prevented from /Castling/. getWeightOfDefence :: Attribute.CriterionWeight.CriterionWeight criterionWeight, -- ^ The arithmetic difference between the number of /piece/s defending each of one's own, compared with the opponent.- getWeightOfDoubledPawns :: Attribute.CriterionWeight.CriterionWeight criterionWeight, -- ^ The arithmetic difference between the total number of /doubled/ @Pawn@s on either side; <https://chessprogramming.wikispaces.com/Doubled+Pawn>.- getWeightOfIsolatedPawns :: Attribute.CriterionWeight.CriterionWeight criterionWeight, -- ^ The arithmetic difference between the total number of /isolated/ @Pawn@s on either side; <https://chessprogramming.wikispaces.com/Isolated+Pawn>.- getWeightOfPassedPawns :: Attribute.CriterionWeight.CriterionWeight criterionWeight -- ^ The arithmetic difference between the total number of /passed/ @Pawn@s on either side; <https://chessprogramming.wikispaces.com/Passed+Pawn>.+ getWeightOfDoubledPawns :: Attribute.CriterionWeight.CriterionWeight criterionWeight, -- ^ The arithmetic difference between the total number of /doubled/ @Pawn@s on either side; <https://www.chessprogramming.org/Doubled_Pawn>.+ getWeightOfIsolatedPawns :: Attribute.CriterionWeight.CriterionWeight criterionWeight, -- ^ The arithmetic difference between the total number of /isolated/ @Pawn@s on either side; <https://www.chessprogramming.org/Isolated_Pawn>.+ getWeightOfPassedPawns :: Attribute.CriterionWeight.CriterionWeight criterionWeight -- ^ The arithmetic difference between the total number of /passed/ @Pawn@s on either side; <https://www.chessprogramming.org/Passed_Pawn>. } deriving (Eq, Show) -- | Smart-constructor.@@ -240,7 +240,7 @@ xpickle' = HXT.xpDefault Data.Default.def . (`HXT.xpAttr` HXT.xpickle) {- |- * Returns the weighted sum of the specified criteria, divided by the sum of the weights; <https://chessprogramming.wikispaces.com/evaluation>+ * Returns the weighted sum of the specified criteria, divided by the sum of the weights; <https://www.chessprogramming.org/evaluation> * Each criterion increases in proportion to some desirable attribute of the proposed /game/.
src-lib/BishBosh/Model/DrawReason.hs view
@@ -50,7 +50,7 @@ data DrawReason = ByAgreement -- ^ Both players have agreed to a draw. | FiftyMoveRule -- ^ A draw can be claimed if fifty consecutive full /move/s have occured without any capture or any @Pawn@ being moved.- | SeventyFiveMoveRule -- ^ Seventy-five consecutive full /move/s have occured without either capture or @Pawn@-movement; <https://chessprogramming.wikispaces.com/Repetitions#Rules-Fide Rule>.+ | SeventyFiveMoveRule -- ^ Seventy-five consecutive full /move/s have occured without either capture or @Pawn@-movement; <https://www.chessprogramming.org/Repetitions#Fide_Rule>. | InsufficientMaterial -- ^ Neither player as the fire-power to force /check-mate/. | StaleMate -- ^ The next player hasn't any legal moves, but isn't /in check/. | ThreeFoldRepetition -- ^ A draw can be claimed if the same /position/ has been reached on any three occasions.
src-lib/BishBosh/Model/Game.hs view
@@ -409,7 +409,7 @@ isNull MkGame { getTurnsByLogicalColour = turnsByLogicalColour } = Property.Null.isNull turnsByLogicalColour {- |- * Create an alternative game in which @Black@ moved first; <https://chessprogramming.wikispaces.com/Color+Flipping>+ * Create an alternative game in which @Black@ moved first; <https://www.chessprogramming.org/Color_Flipping>. * N.B.: 'Property.Reflectable.ReflectableOnY' isn't implemented, since /reflectOnY/ produces a mirror-image /board/ in which the royal /piece/s start in a non-standard position & castling occurs the wrong way.
src-lib/BishBosh/Model/GameTree.hs view
@@ -99,7 +99,7 @@ getLastMove Data.Tree.Node { Data.Tree.rootLabel = game } = Component.QualifiedMove.getMove . Component.Turn.getQualifiedMove . Data.Maybe.fromJust $ Model.Game.maybeLastTurn game {- |- * <https://chessprogramming.wikispaces.com/Static+Exchange+Evaluation>.+ * <https://www.chessprogramming.org/Static_Exchange_Evaluation>. * Returns the net /rankValue/-difference in the /piece/s lost by either side, after a continuous battle at the specified coordinates.
src-lib/BishBosh/Model/Result.hs view
@@ -54,7 +54,7 @@ rnf (VictoryBy logicalColour) = Control.DeepSeq.rnf logicalColour rnf Draw = () --- | Convert a game-termination reason into PGN's @Result@ field; <https://www.chessclub.com/user/help/pgn-spec>.+-- | Convert a game-termination reason into PGN's @Result@ field; <https://www.chessclub.com/help/pgn-spec>. instance Show Result where showsPrec _ result = ( \(showsWhiteResult, showsBlackResult) -> showsWhiteResult . showChar '-' . showsBlackResult
src-lib/BishBosh/Notation/Coordinate.hs view
@@ -21,7 +21,7 @@ [@DESCRIPTION@] - * <https://chessprogramming.wikispaces.com/Algebraic+Chess+Notation#Pure coordinate notation>.+ * <https://www.chessprogramming.org/Algebraic_Chess_Notation#Pure_coordinate_notation>. * CAVEAT: <https://en.wikipedia.org/wiki/Chess_notation> defined a variant of this notation.
src-lib/BishBosh/Notation/MoveNotation.hs view
@@ -19,7 +19,7 @@ {- | [@AUTHOR@] Dr. Alistair Ward - [@DESCRIPTION@] Implements various move-notations <https://en.wikipedia.org/wiki/Chess_notation Chess-notation>.+ [@DESCRIPTION@] Implements various move-notations <https://en.wikipedia.org/wiki/Chess_notation_Chess-notation>. -} module BishBosh.Notation.MoveNotation(@@ -72,7 +72,7 @@ data MoveNotation = Coordinate -- ^ As used for communication with /xboard/. | ICCFNumeric -- ^ <https://en.wikipedia.org/wiki/ICCF_numeric_notation>.- | Smith -- ^ <https://www.chessclub.com/user/chessviewer/smith.html>.+ | Smith -- ^ <https://www.chessprogramming.org/Warren_D._Smith>. deriving (Eq, Read, Show) instance Control.DeepSeq.NFData MoveNotation where
src-lib/BishBosh/Notation/Smith.hs view
@@ -19,7 +19,7 @@ {- | [@AUTHOR@] Dr. Alistair Ward - [@DESCRIPTION@] <https://www.chessclub.com/user/chessviewer/smith.html Smith-notation>+ [@DESCRIPTION@] <https://www.chessprogramming.org/Warren_D._Smith>. -} module BishBosh.Notation.Smith(
src-lib/BishBosh/Property/ForsythEdwards.hs view
@@ -21,7 +21,7 @@ [@DESCRIPTION@] - * <https://chessprogramming.wikispaces.com/Forsyth-Edwards+Notation>.+ * <https://www.chessprogramming.org/Forsyth-Edwards_Notation>. * <https://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation>. -}
src-lib/BishBosh/Search/AlphaBeta.hs view
@@ -22,11 +22,11 @@ [@DESCRIPTION@] - * Performs an <https://chessprogramming.wikispaces.com/Alpha-Beta> search, implemented using <https://chessprogramming.wikispaces.com/Negamax>.+ * Performs an <https://www.chessprogramming.org/Alpha-Beta> search, implemented using <https://www.chessprogramming.org/Negamax>. * Moves are dynamically re-ordering using the killer-heuristic. - * <https://chessprogramming.wikispaces.com/Repetitions> & <https://chessprogramming.wikispaces.com/Transposition>s are detected.+ * <https://www.chessprogramming.org/Repetitions> & <https://www.chessprogramming.org/Transposition>s are detected. -} module BishBosh.Search.AlphaBeta(
src-lib/BishBosh/Search/KillerMoves.hs view
@@ -19,7 +19,7 @@ {- | [@AUTHOR@] Dr. Alistair Ward - [@DESCRIPTION@] <https://chessprogramming.wikispaces.com/Killer+Heuristic>.+ [@DESCRIPTION@] <https://www.chessprogramming.org/Killer_Heuristic>. -} module BishBosh.Search.KillerMoves (@@ -99,7 +99,7 @@ else Attribute.LogicalColour.White -- White makes the first move. ] -- Singleton. --- | Sorts an arbitrary list using the History-heuristic; <https://chessprogramming.wikispaces.com/History+Heuristic>.+-- | Sorts an arbitrary list using the History-heuristic; <https://www.chessprogramming.org/History_Heuristic>. sortByHistoryHeuristic :: Ord killerMove => Attribute.LogicalColour.LogicalColour
src-lib/BishBosh/Search/Transpositions.hs view
@@ -21,11 +21,9 @@ [@DESCRIPTION@] - * <https://chessprogramming.wikispaces.com/Transposition+Table>.+ * <https://www.chessprogramming.org/Transposition_Table>. * <https://en.wikipedia.org/wiki/Transposition_table>.-- * <http://www.chessbin.com/post/Transposition-Table-and-Zobrist-Hashing>. * Valid move-sequences can be recorded against the hash of the position from which they start. -}
src-lib/BishBosh/State/EnPassantAbscissa.hs view
@@ -32,7 +32,9 @@ mkMaybeEnPassantAbscissa ) where +import qualified BishBosh.Attribute.Direction as Attribute.Direction import qualified BishBosh.Attribute.LogicalColour as Attribute.LogicalColour+import qualified BishBosh.Attribute.Rank as Attribute.Rank import qualified BishBosh.Cartesian.Coordinates as Cartesian.Coordinates import qualified BishBosh.Component.Move as Component.Move import qualified BishBosh.Component.Piece as Component.Piece@@ -43,6 +45,7 @@ import qualified BishBosh.State.MaybePieceByCoordinates as State.MaybePieceByCoordinates import qualified Control.DeepSeq import qualified Data.Array.IArray+import qualified Data.Maybe -- | Defines the file on which an En-passant option currently exists. newtype EnPassantAbscissa x = MkEnPassantAbscissa {@@ -62,19 +65,26 @@ Ord x, Ord y )- => Attribute.LogicalColour.LogicalColour -- ^ The player who moves next, & who may have an En-passant option.+ => Attribute.LogicalColour.LogicalColour -- ^ The player who moves next, & who may have an En-passant capture-option. -> State.MaybePieceByCoordinates.MaybePieceByCoordinates x y -> Component.Turn.Turn x y -- ^ The last /turn/ taken. -> Maybe (EnPassantAbscissa x) mkMaybeEnPassantAbscissa nextLogicalColour maybePieceByCoordinates lastTurn | Component.Turn.isPawnDoubleAdvance (Property.Opposable.getOpposite nextLogicalColour) lastTurn- , let destination = Component.Move.getDestination . Component.QualifiedMove.getMove $ Component.Turn.getQualifiedMove lastTurn- , any (- (- == Just (Component.Piece.mkPawn nextLogicalColour)- ) . (- `State.MaybePieceByCoordinates.dereference` maybePieceByCoordinates- )- ) $ Cartesian.Coordinates.getAdjacents destination = Just . MkEnPassantAbscissa $ Cartesian.Coordinates.getX destination- | otherwise = Nothing+ , let lastMoveDestination = Component.Move.getDestination . Component.QualifiedMove.getMove $ Component.Turn.getQualifiedMove lastTurn+ , not $ null [+ passedPawn |+ adjacentCoordinates <- Cartesian.Coordinates.getAdjacents lastMoveDestination,+ passedPawn <- filter (== Component.Piece.mkPawn nextLogicalColour) . Data.Maybe.maybeToList $ State.MaybePieceByCoordinates.dereference adjacentCoordinates maybePieceByCoordinates,+ all (+ /= Component.Piece.mkKing nextLogicalColour -- Will I expose my King ?+ ) [+ blockingPiece |+ threatDirection <- Attribute.Direction.range, -- Consider all directions.+ (_, attackerRank) <- Data.Maybe.maybeToList $ State.MaybePieceByCoordinates.findAttackerInDirection nextLogicalColour threatDirection adjacentCoordinates maybePieceByCoordinates, -- Find discovered attacks.+ attackerRank `notElem` Attribute.Rank.fixedAttackRange, -- Any viable attack through the vacated square must be long-range.+ (_, blockingPiece) <- Data.Maybe.maybeToList $ State.MaybePieceByCoordinates.findBlockingPiece (Property.Opposable.getOpposite threatDirection) adjacentCoordinates maybePieceByCoordinates -- Find any discovered attack.+ ] -- Confirm that the En-passant capture doesn't expose my King.+ ] = Just . MkEnPassantAbscissa $ Cartesian.Coordinates.getX lastMoveDestination+ | otherwise = Nothing
src-lib/BishBosh/State/MaybePieceByCoordinates.hs view
@@ -113,7 +113,7 @@ ) } deriving (Eq, Ord) --- | Used to separate the /ranks/ of the /board/ as represented by the IO-format <https://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation Forsyth-Edwards notation>.+-- | Used to separate the /ranks/ of the /board/ as represented by the IO-format <https://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation>. rankSeparator :: Char rankSeparator = '/'
src-lib/BishBosh/State/Position.hs view
@@ -22,7 +22,7 @@ [@DESCRIPTION@] - * Defines the state of the game, without regard to how it arrived there; <https://chessprogramming.wikispaces.com/Chess+Position>.+ * Defines the state of the game, without regard to how it arrived there; <https://www.chessprogramming.org/Chess_Position>. * Games with the same /position/ have the same opportunities. @@ -58,7 +58,7 @@ import qualified Data.Maybe {- |- * The state of the game, without regard to how it arrived there; <https://chessprogramming.wikispaces.com/Chess+Position>.+ * The state of the game, without regard to how it arrived there; <https://www.chessprogramming.org/Chess_Position>. * Games with the same /position/ may be considered to have converged, since they now have equal opportunity. -}
src-test/BishBosh/Test/HUnit/Component/Zobrist.hs view
@@ -45,6 +45,6 @@ testCases = Test.HUnit.test [ "'BishBosh.Component.Zobrist.Zobrist' contains the wrong number of random numbers." ~: length ( Data.Foldable.toList (Data.Default.def :: Zobrist)- ) ~?= 781 -- <https://chessprogramming.wikispaces.com/Zobrist+Hashing>+ ) ~?= 781 -- <https://www.chessprogramming.org/Zobrist_Hashing> ]
src-test/BishBosh/Test/HUnit/Model/GameTree.hs view
@@ -50,7 +50,7 @@ testCases = Test.HUnit.test [ let maxDepth = 4- in "'BishBosh.Model.GameTree.countGames' failed" ~: map Model.GameTree.countGames [0 .. maxDepth] ~?= take (succ maxDepth) [1, 20, 400, 8902, 197281, 4865609, 119060324, 3195901860, 84998978956], -- <https://oeis.org/A019319>.+ in "'BishBosh.Model.GameTree.countGames' failed" ~: map Model.GameTree.countGames [0 .. maxDepth] ~?= take (succ maxDepth) [1, 20, 400, 8902, 197281, 4865609], -- <https://oeis.org/A048987> "'BishBosh.Model.GameTree.countMoves' failed" ~: map ( \searchDepth -> Model.GameTree.countMoves searchDepth ~?= foldr ( (+) . Model.GameTree.countGames
src-test/BishBosh/Test/HUnit/Search/Search.hs view
@@ -19,7 +19,7 @@ {- | [@AUTHOR@] Dr. Alistair Ward - [@DESCRIPTION@] Static tests based on <https://chessprogramming.wikispaces.com/Bratko-Kopec+Test>.+ [@DESCRIPTION@] Static tests based on <https://www.chessprogramming.org/Bratko-Kopec_Test>. -} module BishBosh.Test.HUnit.Search.Search (
src-test/BishBosh/Test/QuickCheck/State/Position.hs view
@@ -46,11 +46,11 @@ f :: Test.QuickCheck.Model.Game.Game -> Test.QuickCheck.Property f = Test.QuickCheck.label "Position.prop_getMaybeEnPassantAbscissa" . uncurry (==) . ( fmap (- Cartesian.Coordinates.getX . Component.Move.getDestination . Component.QualifiedMove.getMove -- Extract the ordinate.+ Cartesian.Coordinates.getX . Component.Move.getDestination . Component.QualifiedMove.getMove -- Extract the abscissa. ) . Data.List.find ( Attribute.MoveType.isEnPassant . Component.QualifiedMove.getMoveType ) . Model.Game.findQualifiedMovesAvailableToNextPlayer &&& fmap State.EnPassantAbscissa.getAbscissa . State.Position.getMaybeEnPassantAbscissa . Model.Game.mkPosition )- in Test.QuickCheck.quickCheckWithResult Test.QuickCheck.stdArgs { Test.QuickCheck.maxSuccess = 1024 } f+ in Test.QuickCheck.quickCheckWithResult Test.QuickCheck.stdArgs { Test.QuickCheck.maxSuccess = 4096 } f ]