Closed tamirha2530 closed 3 years ago
There is no built-in possibility to play as black. But you can easily change several parts of the code to do this. Firstly, you'll need to make a computer to make the first turn. Secondly, you should change the rule of the first pawn move; you can do this by modifying 147's line in the sunfish.py. The point is this line controls if a black pawn is on the 7'th rank when it wants to move on 2 squares with the first move. So if the computer plays as white you should check not the 7'th rank, but the second. Also this question has already been discussed earlier: https://github.com/thomasahle/sunfish/issues/14. Hope this will be useful
You can now play as black by running python fancy.py
instead of sunfish.py
.
the newest "version 2023" seems to be able to play with Black !? And it supports UCI .. nice !
Can anyone give an explanation about how to play as black with the engine? Thank you.