Sunfish
Sunfish: a Python Chess Engine in 111 lines of code
...The project is often used as an educational tool for understanding game AI, search algorithms, and evaluation functions without the complexity of larger engines. It includes a simple UCI-compatible interface, allowing it to be integrated with graphical chess interfaces or used in terminal-based gameplay. The codebase is intentionally minimal, making it ideal for experimentation, modification, and learning purposes.