Moderators: hgm, Andres Valverde
andMiguel A. Ballicora wrote:These games are ALWAYS in a row.
Miguel A. Ballicora wrote:This happens for several games in a row, and then the behavior disappears.
Eric Mullins wrote:andMiguel A. Ballicora wrote:These games are ALWAYS in a row.Miguel A. Ballicora wrote:This happens for several games in a row, and then the behavior disappears.
I know you said you didn't have any background processes causing it. Still, my inclination is towards external factors. The eventual self-correction, and the different versions make me suspect that.
Miguel A. Ballicora wrote:I decide to set up a testing procedure in xboard (Linux Ubuntu 7.04) and I found this behavior: If I play a match between two engines with 140 positions (Nunn + Noomen + Silver, B&W = 280 games) at 20 seconds/40 moves, I always find 32-34 games (16-17 positions x 2 black&white) in which the game is decided by one of the engines losing on time. These games are ALWAYS in a row. In a couple of occasions, I found two of these ~30-game streaks in 280-games match.
I assume the engines were not pondering....
H.G.Muller wrote:If this occurs so consistently, best would be to make a debug file, to see what time commands are sent to the engine, and look at the time stamps and engine-reported thinking time at the last move of a game that was forfeited.
xinix wrote:Do you have a screensaver running ?
Tony
Eric Mullins wrote:But why is this only happening sometimes? I can appreciate the value of turning off animatemove to clear up the issue. But I have a feeling it is a symptom of something else rather than the core problem.
def isfile x
x=='a'||x=='b'||x=='c'||x=='d'||x=='e'||x=='f'||x=='g'||x=='h'
end
def isrank x
x=='1'||x=='2'||x=='3'||x=='4'||x=='5'||x=='6'||x=='7'||x=='8'
end
def there_is_a_move s
arr = s.split(':')
b = arr[1].strip
return b.length == 4 && isfile(b[0..0]) && isrank(b[1..1]) && isfile(b[2..2]) && isrank(b[3..3])
end
def get_ms s
arr = s.split(' ')
arr[0].to_i
end
filedebug = ARGV[0]
File.open filedebug, "r" do |f|
lines = f.readlines
i = 0
lines.each do|line|
if line != nil
line = line.chomp
if (line["otim"] != nil)
a = lines[i+1].chomp
if (a["usermove"] != nil || there_is_a_move(a))
b = lines[i+2].chomp
if (b["AnimateMove"] != nil)
b = lines[i+3].chomp
end
m = b.split(' ')[1]
if (m == '<first' || m == '<second')
delay = get_ms(b) - get_ms(line)
puts delay
end
end
end
end
i += 1
end
end
Miguel A. Ballicora wrote:Eric Mullins wrote:But why is this only happening sometimes? I can appreciate the value of turning off animatemove to clear up the issue. But I have a feeling it is a symptom of something else rather than the core problem.
I wrote a script in Ruby that calculates the delay from the xboard debug file every time xboard sends a move and gets the first response (generally engines respond quickly after the first ply is analyzed). Once I got that, I plot all the delays in milliseconds from two fragments of matches. Red is with AnimateMove, Blue is without. You can see that animates chews 150 ms each move, but once in a while, a disaster happens. Without animate, only ~10 ms per move or so.
This does not answer what the problem is, but it gives a better picture. Some external thing may interact badly with animate. Maybe it is the screen saver. In any case, animate move gives a delay that is not good for fast games (150 ms each ply means 6 seconds per player/40 moves).
This is the ruby script if anybody wants to run it. In fact, I am going to use is systematically to track possible problems. You can run it, after installing Ruby in your computer
http://www.ruby-lang.org/en/downloads/
Save this code as a text file with the name "debugdelay.rb" and run it from the terminal as
ruby debugdelay.rb nameofthedebugfile > output.txt
"output.txt" can be imported from any spreadsheet. Several debugs can be concatenated into one file if needed before processing it.
- Code: Select all
def isfile x
x=='a'||x=='b'||x=='c'||x=='d'||x=='e'||x=='f'||x=='g'||x=='h'
end
def isrank x
x=='1'||x=='2'||x=='3'||x=='4'||x=='5'||x=='6'||x=='7'||x=='8'
end
def there_is_a_move s
arr = s.split(':')
b = arr[1].strip
return b.length == 4 && isfile(b[0..0]) && isrank(b[1..1]) && isfile(b[2..2]) && isrank(b[3..3])
end
def get_ms s
arr = s.split(' ')
arr[0].to_i
end
filedebug = ARGV[0]
File.open filedebug, "r" do |f|
lines = f.readlines
i = 0
lines.each do|line|
if line != nil
line = line.chomp
if (line["otim"] != nil)
a = lines[i+1].chomp
if (a["usermove"] != nil || there_is_a_move(a))
b = lines[i+2].chomp
if (b["AnimateMove"] != nil)
b = lines[i+3].chomp
end
m = b.split(' ')[1]
if (m == '<first' || m == '<second')
delay = get_ms(b) - get_ms(line)
puts delay
end
end
end
end
i += 1
end
end
H.G.Muller wrote:Is this with or without ponder, and on how many CPUs?
I could imagine that running a ponder-on match on a dual would drive up the unpredictability, and perhaps average duration of the delay, because of scheduling delays. After an engine produces a move, it does not relinguish the CPU, but starts pondering. As the other engine was also pondering at that point, it means there is no free CPU available for the GUI, so it might have to wait until a clock interrupt ends the time-slice of one of the engines and switches task. I am not sure how this works in Windows, if a process that is woken up because it was waiting for input and the input becomes available gets a higher priority than processes that were already running. The sanme problem could occur in a ponder-off match on a dual when some background task became active.
In this case it might be helpful to lrun the engines at lower priority than the GUI. The winbaord.exe in my ICSclient.zip package of my website supports the command-line option /niceEngines=10 that could implement this. The GUI, after its iput becomes available, should then immediately receive CPU attention. Even on a WinBoard that does not support this, you could try to raise the GUI priority to "above normal" in the task manager.
Anyway, your advice of raising the priority of the GUI is a very good idea.
Miguel A. Ballicora wrote:xinix wrote:Do you have a screensaver running ?
Tony
Yes, but I have a dual processors running a match with no pondering. I assumed that the extra processor should be able to take care of that.
Do you think that the AnimateMove() call may badly interact with the screen saver?
Miguel
Michel wrote:Anyway, your advice of raising the priority of the GUI is a very good idea.
I already suggested this in the beginning of this thread....
I always find 32-34 games (16-17 positions x 2 black&white) in which the game is decided by one of the engines losing on time. This is not ok because these engines do not lose on time so easily.
Return to WinBoard development and bugfixing
Users browsing this forum: No registered users and 29 guests