An open API service indexing awesome lists of open source software.

https://github.com/realcyguy/chessengines

Some bad UCI chess engines in python.
https://github.com/realcyguy/chessengines

Last synced: 4 months ago
JSON representation

Some bad UCI chess engines in python.

Awesome Lists containing this project

README

          

# chessengines

Some bad UCI chess engines in python.

Inspired from [Elo World](http://tom7.org/chess/weak.pdf/) and the [YouTube video](https://youtu.be/DpXy041BIlA).

## Engine list

Unless otherwise stated, ties are broken randomly.
This is generated by `scripts/showengines.py`!

[`random`](https://github.com/RealCyGuy/chessengines/blob/main/engines.py#L18-L22): Plays random moves.
[`randomcheck`](https://github.com/RealCyGuy/chessengines/blob/main/engines.py#L23-L31): Plays random moves, prioritizing checks.
[`randomcapture`](https://github.com/RealCyGuy/chessengines/blob/main/engines.py#L32-L40): Plays random moves, prioritizing captures.
[`samepiece`](https://github.com/RealCyGuy/chessengines/blob/main/engines.py#L41-L52): Tries to move the same piece from the last move, playing a random move.
[`copy`](https://github.com/RealCyGuy/chessengines/blob/main/engines.py#L53-L65): Tries to copy the opponents move.
[`minimizeopponentmoves`](https://github.com/RealCyGuy/chessengines/blob/main/engines.py#L66-L81): Play the move that minimizes opponents legal moves.
[`maximizeopponentmoves`](https://github.com/RealCyGuy/chessengines/blob/main/engines.py#L82-L97): Play the move that maximizes opponents legal moves.
[`minimizeownmoves`](https://github.com/RealCyGuy/chessengines/blob/main/engines.py#L98-L114): Play the move that minimize its own legal moves if it was its turn again.
[`maximizeownmoves`](https://github.com/RealCyGuy/chessengines/blob/main/engines.py#L115-L131): Play the move that maximizes its own legal moves if it was its turn again.

## Running

I use poetry as a package manager, but you just need the [`chess`](https://github.com/niklasf/python-chess) package.

`engine.py` is a [Universal Chess Interface](https://en.wikipedia.org/wiki/Universal_Chess_Interface) that can be used with chess GUIs.

You can choose an engine from the list above with the parameter `--engine ` or use UCI's `setoption name Engine value `.

## License

[MIT](https://RealCyGuy/chessengines/blob/main/LICENSE)!!!