Chess player: Difference between revisions

Content added Content deleted
Line 956: Line 956:


==={{libheader|python-chess}}===
==={{libheader|python-chess}}===
A very simple chess engine using [https://github.com/niklasf/python-chess python-chess]. The computer plays Black. The program is based on a two-ply search that computes material value for both sides and its own piece mobility after Black and White have made their moves.
A very simple chess engine using [https://github.com/niklasf/python-chess python-chess]. The computer plays Black. The program uses a two-ply search which computes material value for both sides and its own piece mobility after Black and White have made their moves.


The default Unicode board may look wonky and misaligned with certain terminal fonts. To use an ASCII board instead (like shown below), replace "print(board.unicode())" with "print(board)".
The default Unicode board may look wonky and misaligned with certain terminal fonts. To use an ASCII board instead (like in the output shown below), replace "print(board.unicode())" with "print(board)".
<lang python># Simple Python chess engine
<lang python># Simple Python chess engine
# Computer plays Black
# Computer plays Black