Mk-Chan / WyldChess

A UCI/Xboard compatible chess engine in C
GNU General Public License v3.0
6 stars 0 forks source link

Feature Request: implement some missing uci (or xboard) features #45

Closed LocutusOfPenguin closed 6 years ago

LocutusOfPenguin commented 6 years ago

Hi, im only interested in uci - but they seem to be missing on xboard too.

Can y implement the following too:

Thanks for consideration. Jürgen

Mk-Chan commented 6 years ago

I was not planning to implement ponder and ponder hit but I'm not against trying it out.

The go searchmoves is very easy, I can get that quite fast. Surprisingly I didn't even notice that option in the protocol (shh don't tell anyone) :p

LocutusOfPenguin commented 6 years ago

Main reason i changed my mind is, i also overlooked "ponder" flag. Please keep it secret too :-) :-) Now picochess only allows to enter these (=several) analytics modes, if the engine supports that (i check "ponder" flag for that) and the new "permanent brain" mode, needs "ponderhit" (internally im using python-chess, a name y know already, ha).

Alternative move is a quite nice feature to have. But not having "ponder" is alot more restriction in usage with newer versions. Perhaps checking for this flag is "too big jump", hmm

I took a short(!) look inside yr code, and since y have transistions, dont y just need to transfer from "analysis" to "thinking" in case of a ponderhit (putting the time management in charge again). Ponder is this (your) analysis mode, and you just need to provide this flag to the outside, no? Forgive me, if im saying nonsense! => looks for me, you only need to do most of work on the uci.c (& xboard.c)

Jürgen

Mk-Chan commented 6 years ago

Yes, it is almost as simple as transitioning to analysis mode the only difference is to not print bestmove that I can do with a ponder flag

Mk-Chan commented 6 years ago

For ponderhit actually I have to read up on ponder, I don't know how it works in UCI

Mk-Chan commented 6 years ago

go searchmoves is done, please test it if you can.

LocutusOfPenguin commented 6 years ago

youre awsome quick. Sadly it seems to not work see (also not on picochess):

uci id name WyldChess id author Manik Charan option name SyzygyPath type string default option name Hash type spin default 128 min 1 max 1048576 option name MoveOverhead type spin default 30 min 1 max 5000 option name Threads type spin default 1 min 1 max 64 uciok go searchmoves a2a3 movetime 10 info depth 1 seldepth 0 tbhits 0 score cp 67 nodes 25 time 1 pv b1c3 info depth 2 seldepth 1 tbhits 0 score cp 0 nodes 110 time 1 pv b1c3 b8c6 info depth 3 seldepth 2 tbhits 0 ebf 3.117691 score cp 60 nodes 243 time 1 pv b1c3 b8c6 e2e3 info depth 4 seldepth 4 tbhits 0 ebf 3.819805 score cp 0 nodes 1605 time 3 pv b1c3 b8c6 e2e3 e7e6 info depth 5 seldepth 4 tbhits 0 ebf 2.878185 score cp 10 nodes 2013 time 3 pv b1c3 b8c6 e2e3 e7e6 bestmove b1c3 go movetime 10 searchmoves e2e4 d2d4 info depth 1 seldepth 0 tbhits 0 score cp 67 nodes 21 time 0 pv b1c3 info depth 2 seldepth 1 tbhits 0 score cp 0 nodes 61 time 0 pv b1c3 b8c6 info depth 3 seldepth 2 tbhits 0 ebf 2.488067 score cp 60 nodes 130 time 0 pv b1c3 b8c6 e2e3 info depth 4 seldepth 3 tbhits 0 ebf 1.881750 score cp 0 nodes 216 time 0 pv b1c3 b8c6 e2e3 e7e6 info depth 5 seldepth 4 tbhits 0 ebf 1.566476 score cp 10 nodes 319 time 0 pv b1c3 b8c6 e2e3 e7e6 info depth 5 seldepth 5 tbhits 0 ebf 1.849675 score cp 35 nodes 739 time 1 pv b1c3 b8c6 e2e3 e7e6 bestmove b1c3

Mk-Chan commented 6 years ago

I thought searchmoves had to be the last option in UCI. I'll have to change a little bit if that is not so. (I just went by the example in wbec-ridderkerk)

LocutusOfPenguin commented 6 years ago

see last example => also doesnt work

Mk-Chan commented 6 years ago

That's interesting... last example works for me. Maybe I didn't push the commit?

LocutusOfPenguin commented 6 years ago

ok, my error....i still struggle with yr "build.sh" ..SORRY

Mk-Chan commented 6 years ago

Ok, I think I fixed it now

LocutusOfPenguin commented 6 years ago

tested it on picochess (now). e4, d5 ...whats to play e5, alot of alt moves, produce alternatives not always the alternative in order (often give up the e4 pawn), but the stuff itself works.

Mk-Chan commented 6 years ago

What do you mean often gives up the e4 pawn! Maybe I didn't understand clearly.

The alternatives are not in order because of the move sorting.

LocutusOfPenguin commented 6 years ago

if i forbit e5, exd5 , nc3, d3 ...i should come up with another e4 safe move, like Bd3 , Qe2,f3 .. But i get Nh3, a3, h3 and so on => i looses the pawn then.

Youre searching arent y?

Mk-Chan commented 6 years ago

Can you join me here in this chat please, this wall is a bit annoying

Mk-Chan commented 6 years ago

I've implemented pondering and searchmoves, if you test them and they're working fine, do comment and close the issue please. Thanks.

LocutusOfPenguin commented 6 years ago

it works. Thanks.