Stockfish Crazyhouse Engine

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
hgm
Posts: 27894
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Stockfish Crazyhouse Engine

Post by hgm »

Guenther wrote:Ok it's getting better, but it is not completely solved yet.
Now it works normal in analyse mode as long as I only analyse forward,
but as soon as I start to move backwards, all is completely stopped
and UCI2WB hangs again and crashes and WB can only be closed when killing WB2UCI.
Ah, stupid me! :oops: 'undo' is of course also a command that can come during analysis mode, and should not be blocked from starting a new search. I will fix it.
BTW the first time I tried this I had another program as 2nd in the beginning
and this was suddenly started when I moved backward.
Are you sure you did not inadvertantly hit 'Analysis Mode' again? Hitting this menu item while already in analyze mode toggles the second engine on and off.
User avatar
Guenther
Posts: 4636
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: Stockfish Crazyhouse Engine

Post by Guenther »

hgm wrote:
Guenther wrote:Ok it's getting better, but it is not completely solved yet.
Now it works normal in analyse mode as long as I only analyse forward,
but as soon as I start to move backwards, all is completely stopped
and UCI2WB hangs again and crashes and WB can only be closed when killing WB2UCI.
Ah, stupid me! :oops: 'undo' is of course also a command that can come during analysis mode, and should not be blocked from starting a new search. I will fix it.
BTW the first time I tried this I had another program as 2nd in the beginning
and this was suddenly started when I moved backward.
Are you sure you did not inadvertantly hit 'Analysis Mode' again? Hitting this menu item while already in analyze mode toggles the second engine on and off.
Oh yes that could be true, I remember now I wanted to force it again to start analysing!
Thus if you if you allow 'undo' again we are finished with analysis and crazyhouse with UCI2WB :)

Thanks for the quick updates!
User avatar
hgm
Posts: 27894
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Stockfish Crazyhouse Engine

Post by hgm »

OK, I posted a new UCI2WB version at the same link, which should fix the 'undo' issue. I also made it suppress the 'setup' command in the standard CECP variants Stockfish plays, so that these can be safely played with legality testing off. One of the problems here is that the CECP 'setup' command not only has to define an initial position, but also a board and holdings size, a parent variant and and a pieceToCharTable. The 'info string variant' command as now implemented by Stockfish only provides the FEN, so I made UCI2WB assume standard values for the other items (i.e. 8x8 board without holdings, with the normal FIDE pieces). This spoiled things for Crazyhouse, though.
styx
Posts: 338
Joined: Tue Mar 13, 2012 9:59 pm
Location: Germany

Re: Stockfish Crazyhouse Engine

Post by styx »

thank you. will the source be available?
User avatar
Guenther
Posts: 4636
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: Stockfish Crazyhouse Engine

Post by Guenther »

hgm wrote:OK, I posted a new UCI2WB version at the same link, which should fix the 'undo' issue. I also made it suppress the 'setup' command in the standard CECP variants Stockfish plays, so that these can be safely played with legality testing off. One of the problems here is that the CECP 'setup' command not only has to define an initial position, but also a board and holdings size, a parent variant and and a pieceToCharTable. The 'info string variant' command as now implemented by Stockfish only provides the FEN, so I made UCI2WB assume standard values for the other items (i.e. 8x8 board without holdings, with the normal FIDE pieces). This spoiled things for Crazyhouse, though.
Just a short feedback:
Analysing with SF8-ZH works compeletely now with WB2UCI!

BTW can you imagine a reason meanwhile why it seemed to work at your side?
Is it possible (after reading your last post) it had to do with my piecetoChar setting which is not default?
User avatar
hgm
Posts: 27894
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Stockfish Crazyhouse Engine

Post by hgm »

I guess the way WinBoard steps through loaded games (whether it advances the engine in lockstep or sends a 'new' command and all moves at once) is dependent on how exactly you do this (e.g. if auto-playing the loaded game was on or not). This error only occurs if there is no delay between the 'new' command (which triggers restarting of the engine, because UCI2WB specifies feature reuse=0) and setting it to analyze.

The true remedy would be for WinBoard to truly ignore the engine's feature commands when it restarts it without waiting (rather than replyig with acceptedor rejected). I didnot bother to do that, because I figured they would have stayed the same, so that processing them again would not alter anything. This bit me before with option features, as these acumumlate. So after each restart the Settings dialog would display an extra set of engine options! So I put logic in place to ignore option features in case of a restart.It just never occurred to me to also apply this logic to the other features.

Of course UCI2WB would have had a problem anyway when you would have changed the MultiPV setting during analysis, so it is good that this issue attracted attention. Stockfish apparently does support 'searchmoves', so excusion of moves from analysis does work.

BTW, the source code of this latest UCI2WB is now also available in the winboard.nl repository.
Carlos777
Posts: 1771
Joined: Sun Dec 13, 2009 6:09 pm

Re: Stockfish Crazyhouse Engine

Post by Carlos777 »

hgm wrote:
Another question, is it possible to run a FRC tournament under winboard with UCI engines (most of the FRC engines are UCI compatible)? How could it be done?
This, at least, should be easy. You run it like any other tournament, except that before entering the tournament parameters, you switch WinBoard to FRC. A tournament will always be run in the variant that was selected when you created it.
It works, thank you.

I have an epd file with the 960 possible positions, so I loaded it into "File with start positions". I select the option "Use each line/position twice", but Winboard always use the X position set in "Position number". How do I set winboard to choose randomly any of these positions?
User avatar
hgm
Posts: 27894
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Stockfish Crazyhouse Engine

Post by hgm »

You can step through them sequentially, but you cannot have WinBoard select them randomly.

I never thought of implementing that. For random opening lines one normally uses the GUI book, which does support the'"use each line twice". For positions this does not work, though. There is an option -shuffleOpenings true|false that can be used to turn any variant into a shuffle variant, where WinBoard itself would shuffle the opening position. (And an option -fischerCastling true|false that would affect whether the King and Rooks are immune to such shuffling.) But there the "use each position twice" tournament option doesn't have any effect. I guess it should have... I never gave shuffle games much thought.
styx
Posts: 338
Joined: Tue Mar 13, 2012 9:59 pm
Location: Germany

Re: Stockfish Crazyhouse Engine

Post by styx »

Thank you! As usual, the Linux version of the latest uci2wb can be found here
Vinvin
Posts: 5230
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

Re: Stockfish Crazyhouse Engine

Post by Vinvin »

JannLee, the very top zh player, challenged SF level 8 with comments ! And won 8-2.
Level 8 is around 0.6 second per move.
https://www.youtube.com/watch?v=VTNAHmlQDXA