To Pradu

Discussions about Winboard/Xboard. News about engines or programs to use with these GUIs (e.g. tournament managers or adapters) belong in this sub forum.

Moderator: Andres Valverde

Re: To Pradu

Postby Roger Brown » 08 Nov 2008, 21:57

Guenther Simon wrote:Well an extensive example with unbelievable long PGN file/debug names ;-)
I only modified the loop through the pgn file out of lazyness, but I guess
you could deduce the idea how it should work from here?


Hello Guenther,

I can indeed figure it out but the question was posed for a friend of mine who I can assure you would be turned off by using that method outlined above.

The thing is, I am 150% for persons using Winboard but they are not going to spend time writing/modifying batch files (believe me, this person is by no means an idiot but would you relish going through that procedure to play a tournament?) to use it.

I do appreciate the research that you doubtlessly had to do though. I will make a note of it, never know when I might need this information.

Thanks.

Later.
Roger Brown
 
Posts: 346
Joined: 24 Sep 2004, 12:31

Re: To Pradu

Postby Pradu » 11 Nov 2008, 01:49

H.G.Muller wrote:Pradu, I know that this originally was intended behavior. But now that the rewind option exists, wouldn't it be more versatile to just let the game index run across pairings, like the gauntlet Roger proposes? The other behavior can always be reproduced by setting rewind = nr of games per pairing. But what Roger wanted in his example, can not be achieved with the current control logic.
Ok this makes sense. How about this. If rewind is checked, it will not rewind until the rewind number regardless of which pairing is being played. You can set the rewind value to like 9999 or something to simulate going through the PGN/FEN/EPD forever. If rewind is not checked, the same behavior as before will exist (rewinding for each pairing). I'll put up another compile later tomorrow with this behavior.
User avatar
Pradu
 
Posts: 343
Joined: 12 Jan 2005, 19:17
Location: Chandler, Arizona, USA

Re: To Pradu

Postby Gábor Szots » 11 Nov 2008, 07:43

Pradu wrote:
H.G.Muller wrote:Pradu, I know that this originally was intended behavior. But now that the rewind option exists, wouldn't it be more versatile to just let the game index run across pairings, like the gauntlet Roger proposes? The other behavior can always be reproduced by setting rewind = nr of games per pairing. But what Roger wanted in his example, can not be achieved with the current control logic.
Ok this makes sense. How about this. If rewind is checked, it will not rewind until the rewind number regardless of which pairing is being played. You can set the rewind value to like 9999 or something to simulate going through the PGN/FEN/EPD forever. If rewind is not checked, the same behavior as before will exist (rewinding for each pairing). I'll put up another compile later tomorrow with this behavior.


This method is going to confuse me at least, that's for sure. If I check rewind, it won't rewind, if I don't check it, it will.

My suggestion: One check box with 'start each pairing with position No1' and another box with 'reset to position No1 after this many games', where the second box is greyed out if the first box is checked (1st box has priority).
In fact the second box is not needed at all. Why rewind in the middle of a match? And if the PGN does not contain enough games (which can be true even if resetting it for each match), you stop the tournament with a message: 'not enough opening positions in file' (even better to check for number before starting).
Gábor Szőts

CCRL testing group
User avatar
Gábor Szots
 
Posts: 327
Joined: 26 Sep 2004, 21:26
Location: Szentendre, Hungary

Re: To Pradu

Postby H.G.Muller » 11 Nov 2008, 09:16

Actualy the second box is very important, and in fact the sole reason for adding the rewind parameter was to get this funcionality. I typically play matches of 500-1000 games per pairing, and I don't want to have to supply a file with 1000 opening position. I usually only supply 4 or 8 of them, (e.g. one where white starts, the other where black starts, and then the same wih reversed colors), and rewind after they are all played, so that I can continue using them over and over again.

I don't think the solution Pradu suggests is so bad. It allows one to do everything, witout adding any new control elements. (There already are so many, which is confusing in itself.)

Perhaps a less confusing way to operate them, would be to make that when you change the 'games per pairing' field, or tick the 'two games', it automatically fills in the 'rewind' field with the number after which it will rewind to start each pairing with the same game. This then gives Pradu's intended behavior. People that want something special can then change the 'rewind' field; Gabor would want to raise the numbr there, while I would usually want to strongly decrease it.

One caveat: having two games per position, and an odd number of games per pairing, would equire a half odd-integer number of positions to be played before rewinding to get the intended behavior. To keep the 'rewind' field integer, it sould specify the number of games after which rewind takes place, not the number of positions.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: To Pradu

Postby Gábor Szots » 11 Nov 2008, 09:56

H.G.Muller wrote:I typically play matches of 500-1000 games per pairing, and I don't want to have to supply a file with 1000 opening position. I usually only supply 4 or 8 of them, (e.g. one where white starts, the other where black starts, and then the same wih reversed colors), and rewind after they are all played, so that I can continue using them over and over again.


If you play 1000 games you have to supply at least 500 positions, haven't you? If you provide only 4 you will get 8x125 identical games.
What am I missing?
Gábor Szőts

CCRL testing group
User avatar
Gábor Szots
 
Posts: 327
Joined: 26 Sep 2004, 21:26
Location: Szentendre, Hungary

Re: To Pradu

Postby H.G.Muller » 11 Nov 2008, 12:58

The engines randomize their play. The default InitString of WinBoard does contain the 'random' command.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: To Pradu

Postby Pedro Castro » 11 Nov 2008, 16:24

H.G.Muller wrote:The engines randomize their play. The default InitString of WinBoard does contain the 'random' command.


I thought that the random command was not used by many engines, I thought that was made especially for gnuchess.

But even without the use of random is difficult to be repeated games, especially in times fast (bullet and blitz), small differences in milliseconds can make different games. I think that simply an antivirus program or a resident can make these small differences.
Best wishes,

Pedro Castro
User avatar
Pedro Castro
 
Posts: 180
Joined: 28 Jan 2005, 01:09
Location: Pays Basque (Spain)

Re: To Pradu

Postby H.G.Muller » 11 Nov 2008, 19:18

Well, 'random' is an official command from the WinBoard protocol, and engines should not ignore it. Both Joker and Fairy-Max randomize their play, and those are the engines I usually play. If one of the engines randomizes, and not the other, the games a still all different.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: To Pradu

Postby Pradu » 12 Nov 2008, 03:44

The debug version has been updated with the behavior mentioned. It is completely untested:
www.pradu.us/home/cc/PSWBTM/PSWBTM_debug.zip
User avatar
Pradu
 
Posts: 343
Joined: 12 Jan 2005, 19:17
Location: Chandler, Arizona, USA

Re: To Pradu

Postby Pradu » 12 Nov 2008, 03:48

Roger Brown wrote:Can it be done exactly this way using Winboard with/without PSWBTM?
It can be now. :mrgreen:
User avatar
Pradu
 
Posts: 343
Joined: 12 Jan 2005, 19:17
Location: Chandler, Arizona, USA

Re: To Pradu

Postby Gábor Szots » 12 Nov 2008, 10:13

H.G.Muller wrote:The engines randomize their play.


Does this mean that they deliberately refuse to play the best move?
Gábor Szőts

CCRL testing group
User avatar
Gábor Szots
 
Posts: 327
Joined: 26 Sep 2004, 21:26
Location: Szentendre, Hungary

Re: To Pradu

Postby Pedro Castro » 12 Nov 2008, 12:18

Gábor Szots wrote:
H.G.Muller wrote:The engines randomize their play.


Does this mean that they deliberately refuse to play the best move?


random
This command is specific to GNU Chess 4. You can either ignore it completely (that is, treat it as a no-op) or implement it as GNU Chess does. The command toggles "random" mode (that is, it sets random = !random). In random mode, the engine adds a small random value to its evaluation function to vary its play. The "new" command sets random mode off.


I think that you play your best move, you're only very slightly to change the evaluation (random), with a slight change is possible that games are no longer the same.

In addition it must be borne in mind that generally the evaluations are not perfect and that little change is not going to do better or worse, simply making the game variable.
Best wishes,

Pedro Castro
User avatar
Pedro Castro
 
Posts: 180
Joined: 28 Jan 2005, 01:09
Location: Pays Basque (Spain)

Re: To Pradu

Postby Gábor Szots » 12 Nov 2008, 12:25

Pedro Castro wrote:
Gábor Szots wrote:
H.G.Muller wrote:The engines randomize their play.


Does this mean that they deliberately refuse to play the best move?


random
This command is specific to GNU Chess 4. You can either ignore it completely (that is, treat it as a no-op) or implement it as GNU Chess does. The command toggles "random" mode (that is, it sets random = !random). In random mode, the engine adds a small random value to its evaluation function to vary its play. The "new" command sets random mode off.


I think that you play your best move, you're only very slightly to change the evaluation (random), with a slight change is possible that games are no longer the same.

In addition it must be borne in mind that generally the evaluations are not perfect and that little change is not going to do better or worse, simply making the game variable.


Thanks for the answer, Pedro.
Gábor Szőts

CCRL testing group
User avatar
Gábor Szots
 
Posts: 327
Joined: 26 Sep 2004, 21:26
Location: Szentendre, Hungary

Re: To Pradu

Postby Gábor Szots » 12 Nov 2008, 12:27

Pradu wrote:It is completely untested


This claim is false. :)

Thanks, it seems to behave as described.
Gábor Szőts

CCRL testing group
User avatar
Gábor Szots
 
Posts: 327
Joined: 26 Sep 2004, 21:26
Location: Szentendre, Hungary

Re: To Pradu

Postby H.G.Muller » 12 Nov 2008, 13:29

Pedro Castro wrote:random
This command is specific to GNU Chess 4. You can either ignore it completely (that is, treat it as a no-op) or implement it as GNU Chess does. The command toggles "random" mode (that is, it sets random = !random). In random mode, the engine adds a small random value to its evaluation function to vary its play. The "new" command sets random mode off.


I think that you play your best move, you're only very slightly to change the evaluation (random), with a slight change is possible that games are no longer the same.

In addition it must be borne in mind that generally the evaluations are not perfect and that little change is not going to do better or worse, simply making the game variable.

Well, I don't kow what they mean by 'specific to GNU Chess 4'. That GNU Chess 5 happened not to implement it? They can certainly not mean that no other engine than GNU Chess 4 does implement it, as they cannot know it, and it is indeed not true, as Joker does implement it. And they even suggest that other engines should implement it the same way, so it cannot be a complete surprise that there are other engines that implement it. Aren't all WB commands 'specific to GNU Chess'? For almost any command you can find engines that do not implement it. And most engines implement most WB commands exactly as GNU Chess 4 implements them.

There are actually 2 ways to do randomize: one is to add a small random quantity to the score the search returns for each move in the root (and pre-adjust the search window for this). I think this is what Rybka does.

The second way is to add a pseudo-random quantity to each score returned by Eval(). In that case you do not have to worry about the search window, but you should take care that the same positon get the same quantity added when it is evaluated a second time. In this case the random addition acts as a poor-man's mobility eval, and, if properly tuned, can even make the engine stronger.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: To Pradu

Postby Michael Sherwin » 01 Dec 2008, 06:03

H.G.Muller wrote:
Pedro Castro wrote:random
This command is specific to GNU Chess 4. You can either ignore it completely (that is, treat it as a no-op) or implement it as GNU Chess does. The command toggles "random" mode (that is, it sets random = !random). In random mode, the engine adds a small random value to its evaluation function to vary its play. The "new" command sets random mode off.


I think that you play your best move, you're only very slightly to change the evaluation (random), with a slight change is possible that games are no longer the same.

In addition it must be borne in mind that generally the evaluations are not perfect and that little change is not going to do better or worse, simply making the game variable.

Well, I don't kow what they mean by 'specific to GNU Chess 4'. That GNU Chess 5 happened not to implement it? They can certainly not mean that no other engine than GNU Chess 4 does implement it, as they cannot know it, and it is indeed not true, as Joker does implement it. And they even suggest that other engines should implement it the same way, so it cannot be a complete surprise that there are other engines that implement it. Aren't all WB commands 'specific to GNU Chess'? For almost any command you can find engines that do not implement it. And most engines implement most WB commands exactly as GNU Chess 4 implements them.

There are actually 2 ways to do randomize: one is to add a small random quantity to the score the search returns for each move in the root (and pre-adjust the search window for this). I think this is what Rybka does.

The second way is to add a pseudo-random quantity to each score returned by Eval(). In that case you do not have to worry about the search window, but you should take care that the same positon get the same quantity added when it is evaluated a second time. In this case the random addition acts as a poor-man's mobility eval, and, if properly tuned, can even make the engine stronger.


A third way is to 'assign' a random value to each root move in turn that is added/subtracted (computer/opponent) in the eval function during the entire search. This works with both fail_hard and fail_soft.
User avatar
Michael Sherwin
 
Posts: 168
Joined: 21 Jul 2005, 06:10
Location: USA

Re: Scripts for your friend

Postby Sven Schüle » 01 Dec 2008, 23:55

Hi Roger,

what about offering the following two batch scripts to your friend? Only the first one would require any editing, and (hopefully) the contents is the same as in Guenter's two lines, in fact I copied them and replaced most of the hard-coded stuff by variable names. Much longer indeed but maybe easier to change for people that aren't used to it. I don't know if it's of any value for you, if you think it isn't then hit DEL :-)

(Hopefully last EDIT: looks ok now after testing 8-) )


Code: Select all
rem -----------------------------------------------------------------------------
rem run_test.bat
rem -----------------------------------------------------------------------------
rem Edit as required
rem -----------------------------------------------------------------------------
set WB_EXE=winboard.exe
set WB_ROOT=C:\WB\General
set LGF=GS34.pgn
set SAVE_GAMES_DIR=.\Test
set ENG2_NAME=Rybka_10b-32
set MG=2
set TC=5
set MPS=40
set AUTO_FLAG=true
set PONDER=false
rem -----------------------------------------------------------------------------
rem no need to change this:
rem -----------------------------------------------------------------------------
set WB_OPTIONS=/mg=%MG% /tc=%TC% /mps=%MPS% /debug /autoCallFlag %AUTO_FLAG% /ponderNextMove %PONDER% /cp
rem -----------------------------------------------------------------------------

call run_test_opponent Hiarcs          a  1 10
call run_test_opponent Chess_Tiger     b 11 20
call run_test_opponent Deep_Shredder   c 21 30
call run_test_opponent Deep_Junior_UCI d 31 40
call run_test_opponent Fruit           e 41 50




rem ---- SNIP SNIP ---- put the remainder into "run_test_opponent.bat"
rem -----------------------------------------------------------------------------
rem run_test_opponent.bat
rem -----------------------------------------------------------------------------
rem no need to change this:
rem -----------------------------------------------------------------------------
set ENG1_NAME=%1
set PLAYER_OPTIONS=/fcp=%ENG1_NAME%.exe /fd=%WB_ROOT%\%ENG1_NAME% /scp=%ENG2_NAME%.exe /sd=%WB_ROOT%\%ENG2_NAME%
set SAVE_GAME_OPTIONS=/sgf=%SAVE_GAMES_DIR%\%ENG1_NAME%-%ENG2_NAME%_%LGF%%2.pgn
set OPTIONS=%WB_OPTIONS% %PLAYER_OPTIONS% %SAVE_GAME_OPTIONS%
FOR /L %%P IN (%3,1,%4) DO start /w %WB_EXE% %OPTIONS% /nameOfDebugFile M%%P-%ENG1_NAME%-%ENG2_NAME%_%LGF%%2.deb /lgf %LGF%.pgn /lgi %%P

Sven
User avatar
Sven Schüle
 
Posts: 240
Joined: 26 Sep 2004, 20:19
Location: Berlin, Germany

Previous

Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 15 guests