sunfish
sunfish copied to clipboard
Sunfish: a Python Chess Engine in 111 lines of code
Increase performance by saving the result of pos.value(move) instead of computing it multiple times
pos.value(move) gets called with the same arguments three times on lines 274, 276 and 278 By just making making pos.gen_moves() return a list of tuples of the form (value, move)...
This draw comes up all the time when sunfish is winning, and it always jump straights in, giving away the victory. Also the stalemate draw is still not well tested....
Tempo
Sunfish currently doesn't do 'tempo'. A mate in 6 is considered the same as a mate in 1.
The current build manages nearly none of the tests when running `python3 test.py quickdraw tests/stalemate2.fen"`.
``` My move: b5a5 8 ♖ · ♗ · ♔ ♖ · · 7 ♙ ♙ · · · · ♜ ♜ 6 · · · · · · ·...
Since the xboard code is not trying to be small in the same way as the main module, we might as well add a few lines for trying to figure...
Is it documented anywhere? I was thinking about writing an engine myself and wondering how I could implement UCI stateless protocol, including `stop` / `go infinite`. I thought I either...
I was impressed by the strong opening and middle game, but not so much by the end game. I guess PST for endgames is needed and some interpolation. KRK is...
Added a brief overview of how algebraic notation works in addition to clarifying the format of algebraic notation that the terminal interface expects with examples of the proper format.
I am using base python interpreter to run sunfinsh. With ``` position rnb1kbnr/pp2pppp/8/8/2pNP3/8/PP3PPP/RNB1KB1R b KQkq - 0 1 go movetime 25000 ``` the engine says ``` bestmove g1f3 ``` which...