Skip to content

Releases: niklasf/python-chess

python-chess v0.8.0

25 Mar 16:42
Compare
Choose a tag to compare

New in this release:

  • Implement Syzygy endgame tablebase probing.
    https://syzygy-tables.info is an example project that provides a public API using the new features.
  • The interface for aynchronous UCI command has changed to mimic concurrent.futures. is_done() is now just done(). Callbacks will receive the command object as a single argument instead of the result. The result property and wait() have been removed in favor of a synchronously waiting result() method.
  • The result of the stop and go UCI commands are now named tuples (instead of just normal tuples).
  • Add alias Board for Bitboard.
  • Fixed race condition during UCI engine startup. Lines received during engine startup sometimes needed to be processed before the Engine object was fully initialized.

python-chess v0.7.0

21 Feb 14:41
Compare
Choose a tag to compare

New in this release:

  • Implement UCI engine communication.
  • Patch by Matthew Lai: Add caching for gameNode.board().

python-chess v0.6.0

08 Nov 13:03
Compare
Choose a tag to compare

New in this release:

  • If there are comments in a game before the first move, these are now assigned
    to Game.comment instead of Game.starting_comment. Game.starting_comment
    is ignored from now on. Game.starts_variation() is no longer true.
    The first child node of a game can no longer have a starting comment.
    It is possible to have a game with Game.comment set, that is otherwise
    completely empty.
  • Fix export of games with variations. Previously the moves were exported in
    an unusual (i.e. wrong) order.
  • Install gmpy2 or gmpy if you want to use slightly faster binary
    operations.
  • Ignore superfluous variation opening brackets in PGN files.
  • Add GameNode.san().
  • Remove sparse_pop_count(). Just use pop_count().
  • Remove next_bit(). Now use bit_scan().

python-chess v0.5.0

28 Oct 13:05
Compare
Choose a tag to compare

New in this release:

  • PGN parsing is now more robust: read_game() ignores invalid tokens.
    Still exceptions are going to be thrown on illegal or ambiguous moves, but
    this behaviour can be changed by passing an error_handler argument.

    >>> # Raises ValueError:
    >>> game = chess.pgn.read_game(file_with_illegal_moves)
    
    >>> # Silently ignores errors and continues parsing:
    >>> game = chess.pgn.read_game(file_with_illegal_moves, None)
    
    >>> # Logs the error, continues parsing:
    >>> game = chess.pgn.read_game(file_with_illegal_moves, logger.exception)
    

    If there are too many closing brackets this is now ignored.

    Castling moves like 0-0 (with zeros) are now accepted in PGNs.
    The Bitboard.parse_san() method remains strict as always, though.

    Previously the parser was strictly following the PGN spefification in that
    empty lines terminate a game. So a game like

    [Event "?"]
    
    { Starting comment block }
    
    1. e4 e5 2. Nf3 Nf6 *
    

    would have ended directly after the starting comment. To avoid this, the
    parser will now look ahead until it finds at least one move or a termination
    marker like *, 1-0, 1/2-1/2 or 0-1.

  • Introduce a new function scan_headers() to quickly scan a PGN file for
    headers without having to parse the full games.

  • Minor testcoverage improvements.

python-chess v0.4.2

10 Oct 22:30
Compare
Choose a tag to compare

New in this release:

  • Fix bug where pawn_moves_from() and consequently is_legal() weren't
    handling en-passant correctly. Thanks to Norbert Naskov for reporting.

python-chess v0.4.1

26 Aug 18:21
Compare
Choose a tag to compare

New in this release:

  • Fix is_fivefold_repitition(): The new fivefold repitition rule requires
    the repititions to occur on alternating consecutive moves.
  • Minor testing related improvements: Close PGN files, allow running via
    setuptools.
  • Add recently introduced features to README.

python-chess v0.4.0

19 Aug 13:58
Compare
Choose a tag to compare

New in this release:

  • Introduce can_claim_draw(), can_claim_fifty_moves() and
    can_claim_threefold_repitition().
  • Since the first of July 2014 a game is also over (even without claim by one
    of the players) if there were 75 moves without a pawn move or capture or
    a fivefold repitition. Let is_game_over() respect that. Introduce
    is_seventyfive_moves() and is_fivefold_repitition(). Other means of
    ending a game take precedence.
  • Threefold repitition checking requires efficient hashing of positions
    to build the table. So performance improvements were needed there. The
    default polyglot compatible zobrist hashes are now built incrementally.
  • Fix low level rotation operations l90(), l45() and r45(). There was
    no problem in core because correct versions of the functions were inlined.
  • Fix equality and inequality operators for Bitboard, Move and Piece.
    Also make them robust against comparisons with incompatible types.
  • Provide equality and inequality operators for SquareSet and
    polyglot.Entry.
  • Fix return values of incremental arithmetical operations for SquareSet.
  • Make polyglot.Entry a collections.namedtuple.
  • Determine and improve test coverage.
  • Minor coding style fixes.

python-chess v0.3.1

15 Aug 14:02
Compare
Choose a tag to compare

New in this release:

  • Bitboard.status() now correctly detects STATUS_INVALID_EP_SQUARE,
    instead of errors or false reports.
  • Polyglot opening book reader now correctly handles knight underpromotions.
  • Minor coding style fixes, including removal of unused imports.

python-chess v0.3.0

13 Aug 09:21
Compare
Choose a tag to compare

New in this release:

  • Rename property half_moves of Bitboard to halfmove_clock.

  • Rename property ply of Bitboard to fullmove_number.

  • Let PGN parser handle symbols like !, ?, !? and so on by converting
    them to NAGs.

  • Add a human readable string representation for Bitboards.

    >>> print(chess.Bitboard())
    r n b q k b n r
    p p p p p p p p
    . . . . . . . .
    . . . . . . . .
    . . . . . . . .
    . . . . . . . .
    P P P P P P P P
    R N B Q K B N R
    
  • Various documentation improvements.

python-chess v0.2.0

13 Aug 09:24
Compare
Choose a tag to compare

New in this release:

  • Implement PGN parsing and writing.
  • Hugely improve test coverage and use Travis CI for continuous integration and
    testing.
  • Create an API documentation.
  • Improve Polyglot opening-book handling.