MitchelPaulin / Walleye

A chess engine written from scratch in Rust ♞
MIT License
121 stars 6 forks source link

no output in CuteChess (but plays ok) #2

Closed tissatussa closed 3 years ago

tissatussa commented 3 years ago

while Walleye is calculating i see no pv line output in the CuteChess panel .. i have no troubles using Walleye on Linux, but it seems Walleye is simple ?

MitchelPaulin commented 3 years ago

Hello Roelof, thanks for the issue. The evaluation line turned out to be a pretty simple thing to implement, just one additional line to send some evaluation info to the GUI. As of this commit you should now see the evaluation line in the CuteChess GUI.

tissatussa commented 3 years ago

i saw your adjustment in the code .. it seems logical but it still gives no result .. CuteChess gives no output in these columns : Depth Time Nodes Score PV .. compare it to eg. the Engine Debug lines of another engine (Drofa) which gives full stats in CuteChess :

<Walleye(66): info score cp 55 <Walleye(66): bestmove d3c4

<Drofa-dev v3.1.27(67): info depth 26 seldepth 45 nodes 24734785 score cp 59 nps 2113000 time 11702 pv a2c3 c4f7 c3e4 g1f1 e4c5 f1e2 a7a5 <Drofa-dev v3.1.27(67): bestmove a2c3

please test in CuteChess yourself.

MitchelPaulin commented 3 years ago

Ok, I see what you mean now. Stats were added to the bottom of the GUI in the evaluation history but not in the right panel. image

I can look into adding these stats, some should be easy like Nodes and Score. Some like Pondermove and Depth don't really work because Walleye (at least not yet) doesn't take advantage of iterativate deepening, but if I do enhance the engine I'll keep it in mind.

tissatussa commented 3 years ago

hi, i just discovered the new open source chess engine MinimalChess at https://github.com/lithander/MinimalChessEngine .. the author is new to chess engine programming and learns by some pragmatic approach, which he shows in 4 YouTube videos at https://www.youtube.com/playlist?list=PL6vJSkTaZuBtTokp8-gnTsP39GCaRS3du ! Here you will see his handling of the UCI protocol in a minimalistic manner .. i hope this can help you in any form, or be an inspiration ! -- also see https://www.chessprogramming.org/MinimalChess

MitchelPaulin commented 3 years ago

I've put a good chunk of effort into improving Walleye over the weekend, it should now be a much stronger opponent. I also implemented some of the UCI reporting. It doesn't report on everything but I implemented the low hanging fruit along with what I think is the most important info, move and score. Give it a shot and let me know if it works for you!

Animation

tissatussa commented 3 years ago

after compiling i get a binary with same size (1.1 Mb) .. also the version (by --version) is 1.0.0 which is same as previous .. did i compile properly ? Btw. i used cargo build --release

tissatussa commented 3 years ago

indeed, i see these stats eval/depth time ..so i guess it is the newer version !

tissatussa commented 3 years ago

why do i see "depth 5" at every move ? Often Walleye thinks only a few seconds (or less ! esp. at start) but sometimes it thinks more than half a minute and still gives depth 5 !?

walley_minimalchessengine

MitchelPaulin commented 3 years ago

Like mentioned above Walleye does not yet implement any iterative deepening strategies, so right now it always searches to a depth of 5 using alpha-beta then switches to a depth of 10 using quiescence search for a total possible depth of 15 (to keep things simple I always just print the alpha-beta depth). As to why some moves are found quickly and some take a while thats due to the nature of alpha-beta cutoff, sometimes we get a good move ordering allowing for significant pruning of the search space and sometimes we dont. A transposition table would also likely speed this up drastically, but again thats on the to-do list.

There is still more work to do in this area to more effectively allow it to use its time and search to a deeper depth, letting it go further into alpha-beta if it finds a great move right away or cut off a longer search that is taking too long. Happy to see the UCI stats are working for you though.