Changes in winboard

Discussions about the WinBoard protocol. Here you can also report bugs and request new features.

Moderators: hgm, Andres Valverde

Changes in winboard

Postby rigao » 29 Dec 2008, 16:57

This post is primary for HGMuller, as is he who is releasing winboard.

I implemented a menu in winboard to be able to play against a engine with fixed depth (it was already implemented, just there was no menu to make this option available through menu in windows). I put it in the Time Control menu, as it is primary a feature of time control.

I also enabled what i think must be the best way to play against a fixed depth: the machine spents at least the time it would use in case that it was not playing in fixed depth. I've done this just before the call of HandleMachineMove. I intercept all the messages from the engine where appears the string move. This way, the first time the engine move at normal depth, i intercept it, undo this move, and ask the engine to play at a fixed depth. The next time i receive a move instruction, it is from fixed depth thinking, i set back the depth to 100 (to be sure it plays again as strong as always) and send the instruction to HandleMachineMove.

Why do i do this? I could put just a delay in HandleMachineMove, but doing this this way, i get the score of the position with a good thinking in it, and i will have a good display score, plus i can calculate how well the user is playing comparing the score of a position before and after the user move.

All this will be usefull when the depth is not high, so the machine takes no time reaching it. Maybe it can be bad when the user asks for a big depth... but i think that almost all ppl who wants to play at fixed depth but the engine playing at a normal rate, would want low depths, so they have a chance to win.

Maybe there could be an option to let the user decide if they want the computer to ask as fast as it reach this depth, or if they rather prefer to let it think normally...

I would want to know if HGMuller is interested in this implementation, possibly with some changes, or if he has no interest at all, so i dont improve it any further (as it makes the trick for me).

Another change i would love to have is about the training mode. ATM u can load a game and set training mode on (beware, not always work!). A problem there is that u can see the history of the game up to the end, this makes no sense, because then u can just look at it and do the correct move. It would be great to display just the moves up to the current position.

Another change that must be done is about loading the next game: it makes no sense that when u load a new game, the training mode is automatically set to off. If im training a lot of positions, then i want to load one after another but remain in training until i decide i dont want to train more, isn't it?

And another change that would make this mode better is to have a window that ask u to input the move u think is the best.

Oh, and last, and maybe not so important, but that will make the training mode better than other chess software, it would be great to have a button in the same window that tells u that the move is not correct which was called "refutation", and when u make a mistake, u can push it and then automatically an engine is loaded and answer your incorrect move, as a normal game. When you understand why your move is not correct (because the engine is smashing you in the game), you push a button that can be called "return to the position", and then the game is set back to the initial position where u made a bad move.

It happened to me to made a bad move, and i wanted to know why it was a bad move, and CT-Art does not allow you to see the evaluation of the engine while you are training.

If some1 is interested in help me programing all this, or if it is interesting to have it in winboard and Muller wants me to do all this things in a certain way compatible with everything else in winboard, let me know.
rigao
 
Posts: 63
Joined: 14 Dec 2008, 17:33

Re: Changes in winboard

Postby H.G.Muller » 29 Dec 2008, 18:02

I already changed the Time-Control menu by putting the time-odds factors in there, and you probably did not start from that version (as I only put it on the web very recently). So if there is interest to put the fixed depth (and fixed time) into this menu, it would be quicker for me to start from the version I have now. When I was adding the time-odds factors I actually did consider adding menu support for the sd and st commands, but decided against it. The problem with fixed depth is that it is hardly useful: if you limit the depth enough to avoid the engine from crushing you in the middle-game, it plays like a total idiot in the end-game.

For this reason it is much more useful to limit the number of nodes. This is why I added the nodes-based time control. I also considered putting the NPS values in the menu, but it seemed too unlikely that people needed to control those interactively. Of course a modification similar to what you propose can also be based on nodes, rather than depth. That would be much more useful than fixed depth, and as you plan to have the engine think past the point where you want to take the move anyway, it would even work on engines that do not suppordt the WB nps command.

I have no experience with training mode; I never use it, and am only vaguely aware what it does. I know there is an option /initialMode (or something like that), which determines in which mode WinBoard starts up. Perhaps a useful modification would be to make WB use the value of this option not only at startup, but on every new game. Or perhaps only upto the point where someone explicitly uses the "mode" menu to set another mode (which would then be non-sticky).
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Changes in winboard

Postby rigao » 29 Dec 2008, 20:28

If there is a menu-based option to fix the nodes searched, it is no problem for me to make the same changes with it, and not with depth, being true that it makes more sense. The core of the changes will be there, u just need to tell me how it is said to the engine to reduce its node (oh, and i need this to work for UCI engines, as i want to play against UCI engines mainly).

And about the training mode, i can change things by myself, and then let u know if ur interested, or we can try to do some thing more collaborative, so what i do dont go to waste.
rigao
 
Posts: 63
Joined: 14 Dec 2008, 17:33

Re: Changes in winboard

Postby H.G.Muller » 03 Jan 2009, 09:42

Now that I have the WinBoard 4.3.15 released, I have again time to look into these matters.

Your idea of having the engine search deeper than you really want it to for deciding upon its move is interesting, because it would allow you to select a move from its earlier thinking output based on any criterion. So you could play based on nr of nodes without the engine supporting any kind of nps command, as long as it prints its nodes for each iteration (as WB protocol prescribes it should).

What is not clear to me is in what form you will relay the move that the program finally picked at its largest depth to the user. Will it be put in the PGN file, as a comment?
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Changes in winboard

Postby rigao » 04 Jan 2009, 21:27

The idea in principle is not to show him the best move, i would use it just to calculate how the position has deteriorated in the last human move (so calculate how well the human is playing). Anyhow, it is straight forward (i supose) to put it in the pgn once we know the move. Indeed maybe this is the best way, just put the best move for the machine in the pgn as a variation, with its evaluation.

I tried to do so, but crafty do not show the best move in each iteration, just starts to do so starting with depth 10 or so. So i couldnt pick up any weak move... :( this is why i make it play twice, one to know the good move and its evaluation (so i would know the position evaluation too) and another time just the move up to some depth (or NPS).

Oh, and rybka works buggy in winboard, the score that winboard show is always from rybka point of view. I supose it is a problem of rybka or polyglot, but i just say it in case it can be fixed easyly in winboard.
rigao
 
Posts: 63
Joined: 14 Dec 2008, 17:33

Re: Changes in winboard

Postby H.G.Muller » 04 Jan 2009, 21:45

Engines are supposed to show the score from their own POV in WinBoard. But if they show the score for white, there are the /...scoreIsAbs options (also setable from the Options -> Engine menu) that you can use to have WB flip it.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL


Return to WinBoard development and bugfixing

Who is online

Users browsing this forum: No registered users and 12 guests

cron