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.
- Host: GitHub
- URL: https://github.com/realcyguy/chessengines
- Owner: RealCyGuy
- License: mit
- Created: 2022-06-26T01:14:27.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-26T01:18:47.000Z (almost 4 years ago)
- Last Synced: 2024-12-30T22:32:42.660Z (over 1 year ago)
- Language: Python
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)!!!