Winboard. Load position but no setboard

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
Henk
Posts: 5653
Joined: Mon May 27, 2013 8:31 am

Winboard. Load position but no setboard

Post by Henk » Mon Jan 28, 2019 12:30 pm

I loaded a position: r1b2rk1/pp4bp/1q4n1/3pN1p1/3Pp3/1P4P1/PB1Q1P1P/R3RBK1 w - - 1 22

But it did not work for my engine for it started analyzing inititial position.
I don't see a setboard in the debug file.

So what do I need to implement to make it work.

Code: Select all

recognized 'normal' (-1) as variant normal
recognized 'normal' (-1) as variant normal
shuffleOpenings = 0
Version: WinBoard 4.7.3a + dotnet
Reset(1, 0) from gameMode 0
recognized 'normal' (-1) as variant normal
GameEnds(0, (null), 2)
shuffleOpenings = 0
StartChildProcess (dir=".") dotnet C:\Users\gebruiker\Source\Repos\Skipper\bin\Release\netcoreapp2.0\SchaakMachine.dll
nice engine proc to 10
657 >first : xboard
protover 2
703 <first : feature myname="SchaakMachine"  done=1
703 >first : accepted myname
703 >first : accepted done
719 >first : new
random
719 >first : level 0 3 0
719 >first : post
719 >first : hard
719 >first : easy
Impossible move , type = 0
FEN castling rights: 45 45 45 45 45 45
11678 >first : force
11678 >first : edit
11678 >first : #
11678 >first : Ne5
11678 >first : Pd4
11678 >first : Pb3
11678 >first : Pg3
11678 >first : Pa2
11678 >first : Bb2
11678 >first : Qd2
11678 >first : Pf2
11678 >first : Ph2
11678 >first : Ra1
11678 >first : Re1
11678 >first : Bf1
11678 >first : Kg1
11678 >first : c
11678 >first : Ra8
11678 >first : Bc8
11678 >first : Rf8
11678 >first : Kg8
11678 >first : Pa7
11678 >first : Pb7
11678 >first : Bg7
11678 >first : Ph7
11678 >first : Qb6
11678 >first : Ng6
11678 >first : Pd5
11678 >first : Pg5
11678 >first : Pe4
11678 >first : .
 45 45 45 45 45 45
 45 45 45 45 45 45
 7 0 4 7 0 4
Load Position
15397 >first : analyze
17413 >first : .
17413 <first : 1 83 7 21  b1c3 
17413 <first : 2 59 8 160  b1c3  d7d5 
17413 <first : 3 83 17 1411  g1f3  b8c6  b1c3 
17413 <first : 4 59 35 3542  g1f3  b8c6  b1c3  d7d5 
17413 <first : 5 63 77 15870  g1f3  b8c6  b1c3  d7d5  d2d4 
19429 <first : 1 83 7 21  b1c3 
19429 <first : 2 59 8 160  b1c3  d7d5 
19429 <first : 3 83 17 1411  g1f3  b8c6  b1c3 
19429 <first : 4 59 35 3542  g1f3  b8c6  b1c3  d7d5 
19429 <first : 5 63 77 15870  g1f3  b8c6  b1c3  d7d5  d2d4 
19429 <first : 6 40 340 324730  g1f3  b8c6  b1c3  d7d5  d2d4  g8f6 
19444 <first : 7 59 513 383726  g1f3  b8c6  c2c4  g8f6  b1c3  d7d5  c4c5 
21445 <first : 1 83 7 21  b1c3 
21445 <first : 2 59 8 160  b1c3  d7d5 
21445 <first : 3 83 17 1411  g1f3  b8c6  b1c3 
21445 <first : 4 59 35 3542  g1f3  b8c6  b1c3  d7d5 
21445 <first : 5 63 77 15870  g1f3  b8c6  b1c3  d7d5  d2d4 
21445 <first : 6 40 340 324730  g1f3  b8c6  b1c3  d7d5  d2d4  g8f6 
21445 <first : 7 59 513 383726  g1f3  b8c6  c2c4  g8f6  b1c3  d7d5  c4c5 
23460 <first : 1 83 7 21  b1c3 
23460 <first : 2 59 8 160  b1c3  d7d5 
23460 <first : 3 83 17 1411  g1f3  b8c6  b1c3 
23460 <first : 4 59 35 3542  g1f3  b8c6  b1c3  d7d5 
23460 <first : 5 63 77 15870  g1f3  b8c6  b1c3  d7d5  d2d4 
23460 <first : 6 40 340 324730  g1f3  b8c6  b1c3  d7d5  d2d4  g8f6 
23460 <first : 7 59 513 383726  g1f3  b8c6  c2c4  g8f6  b1c3  d7d5  c4c5 
GameEnds(28, xboard exit, 2)
24570 >first : exit
24570 >first : quit
Process 17908 still alive after timeout, killing... result=1
name = '%APPDATA%\winboard47.ini', expanded name = 'C:\Users\gebruiker\AppData\Roaming\winboard47.ini'

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

Re: Winboard. Load position but no setboard

Post by hgm » Mon Jan 28, 2019 12:43 pm

By default (for reasons of backward compatibility) WinBoard uses the "edit" command to load a position. If you want it to use 'setboard', you should have the engine print

feature setboard=1 done=1

in response to the "protover 2" command. (The "done=1" is not strictly needed for making WinBoar use 'setboard', but you should really always send that in response to "protover 2" (as last feature), even if you did not want to enable any features at all. If you do not send it, WinBoard will wait for it for several seconds until it times out and continues by using the engine.

Henk
Posts: 5653
Joined: Mon May 27, 2013 8:31 am

Re: Winboard. Load position but no setboard

Post by Henk » Thu Jan 31, 2019 8:46 am

To implement 'analyze' command I used a Cancellation token and a Task in .NET core.

I also had to implement 'undo' and 'exit' command.

Henk
Posts: 5653
Joined: Mon May 27, 2013 8:31 am

Re: Winboard. Load position but no setboard

Post by Henk » Thu Jan 31, 2019 11:35 am

Output for initial position. No need to improve user interface when engine searching inefficient.
Actually I only need to implement extra features for finding bugs when source code inspection fails.
It would be better to write extra test cases.

But what am I talking about. Users already have Stockfish so any development useless.

Code: Select all

 
exclude: none best +tail                                          
 10	+0.48	32.3M	3:38.78	d2d4  d7d5  b1c3  f7f5  g1f3  g8f6  c1f4  b8d7  d1d3  e7e6 
  9	+0.58	5.3M	0:37.09	g1f3  b8c6  c2c4  g8f6  b1c3  e7e5  d2d4  e5e4  f3e5  c6e5 
  8	+0.48	3.1M	0:21.55	d2d4  d7d5  c1f4  a7a6  b1c3  b8c6  g1f3  g8f6 
  7	+0.48	351539	0:02.53	b1c3  d7d5  g1f3  b8c6  d2d4  g8f6  c1e3 
  6	+0.40	226614	0:01.60	b1c3  d7d5  g1f3  b8c6  d2d4  g8f6 
  5	+0.63	25608	0:00.17	g1f3  b8c6  b1c3  d7d5  d2d4 
  4	+0.59	3581	0:00.02	b1c3  g8f6  g1f3  d7d5 
  3	+0.83	1287	0:00.00	b1c3  g8f6  g1f3 
  2	+0.59	190	0:00.00	b1c3  d7d5 
  1	+0.83	21	0:00.00	b1c3 
  

Post Reply