Here's an oddity. I have been working on various things, and have been seeing some unexpected losses running with board. I decided to try a new opponent, and downloaded gaviota. It behaves VERY poorly. It dumps an absolute ton of garbage while it is playing. It displays multiple 8x8 boards of numbers, plus a couple of hundred array values, etc, after each move. The issue I see is that if it does that while Crafty is thinking, xboard is very sluggish in picking up Crafty's move, because it is handling all the garbage output. It becomes noticeable enough that the time updates just blank out in pretty fast games. If I turn pondering off, so that only one program displays stuff at a time, all is well.
I had not considered how a mis-behaving program can cause issues like this, and didn't notice since most of what I play is ponder off, or very long time controls where I watch the games. The misbehaving programs only dump this barrage of output either after it moves, or at the beginning of a search. I've only wasted 3 days chasing a loss in time issue that was not a real issue in my code. I wonder if it would be worthwhile to detect this since I am sure many are getting misleading results without knowing. IE perhaps an option that lets me set some counter and if a program produces more lines of output in 1 sec than that limit, I get notified "first/second program misbehaving, output rate limit exceeded" or something similar.
I limit this in crafty with the "noise setting" and setting appropriate display options to avoid sending a lot of crap to xboard. But some do not and go overboard. I found a similar problem with Scorpio, in that it starts at iteration 1 and displays every last PV. Not so bad in middle games, but in endgames? Not going to work when 50+ plies are not hard to reach. And flood xboard and introduce significant LAG in getting the moves from the other program...
In my own cluster referee, I sort of deal with this by giving priority to reading from the pipe connected to the side on move first, so that the opponent doesn't swamp things while it is my turn...
Ever run across this? How is your input/etc loop set up? Always check the programs in the same order or do you do as I do???
For Crafty, here is a sample output: (I entered these commands by hand, to make it easy to see)
Code: Select all
xboard
noise 1
level 0 1 1
post
e4
15 12 146 4309249 1. ... Nc6 2. Nf3 e5 3. Nc3 Nf6 4. Bc4 Bc5 5. d3 O-O 6. O-O d6 7. Bg5 h6 8. Be3 Be6 9. Bxe6 Bxe3
15 12 148 4398952 1. ... Nc6 2. Nf3 e5 3. Nc3 Nf6 4. Bc4 Bc5 5. d3 O-O 6. O-O d6 7. Bg5 h6 8. Be3 Be6 9. Bxe6 Bxe3
16 13 165 4904680 1. ... Nc6 2. Nf3 e5 3. Nc3 Nf6 4. Bb5 Bc5 5. O-O O-O 6. d3 d6 7. Na4 Nd4 8. Nxc5 Nxb5 9. a4
16 13 174 5140377 1. ... Nc6 2. Nf3 e5 3. Nc3 Nf6 4. Bb5 Bc5 5. O-O O-O 6. d3 d6 7. Na4 Nd4 8. Nxc5 Nxb5 9. a4
17 18 200 5890034 1. ... Nc6 2. Nf3 e5 3. Nc3 Nf6 4. Bb5 Bd6 5. O-O a6 6. Ba4 b5 7. Bb3 O-O 8. d3 Na5 9. Be3 Nxb3 10. axb3
17 18 226 6642123 1. ... Nc6 2. Nf3 e5 3. Nc3 Nf6 4. Bb5 Bd6 5. O-O a6 6. Ba4 b5 7. Bb3 O-O 8. d3 Na5 9. Be3 Nxb3 10. axb3
18 28 367 11026440 1. ... Nc6 2. Nf3 e5 3. Nc3 Nf6 4. Bc4 Bc5 5. d3 O-O 6. O-O d6 7. Na4 Na5 8. Nxc5 Nxc4 9. dxc4 dxc5 10. Be3
18 28 437 13114444 1. ... Nc6 2. Nf3 e5 3. Nc3 Nf6 4. Bc4 Bc5 5. d3 O-O 6. O-O d6 7. Na4 Na5 8. Nxc5 Nxc4 9. dxc4 dxc5 10. Be3
move Nc6
d3
16 9 100 3015480 2. ... e6 3. Nf3 Nf6 4. Be2 Bb4+ 5. c3 Be7 6. O-O O-O 7. Na3 d5 8. e5 Ng4 9. d4 Bd7 10. h3 Bxa3 11. bxa3
16 5 156 4714092 2. ... Nf6 3. Nf3 e5 4. Be2 Be7 5. Nc3 O-O 6. O-O d6 7. Bd2 Bd7 8. Nd5 Nxd5 9. exd5 Nd4 10. Nxd4 exd4
16 5 165 4966750 2. ... Nf6 3. Nf3 e5 4. Be2 Be7 5. Nc3 O-O 6. O-O d6 7. Bd2 Bd7 8. Nd5 Nxd5 9. exd5 Nd4 10. Nxd4 exd4
17 5 209 6269124 2. ... Nf6 3. Nf3 e5 4. Be2 Be7 5. Nc3 O-O 6. O-O d6 7. Bd2 Bd7 8. Nd5 Nxd5 9. exd5 Nd4 10. Nxd4 exd4
17 5 228 6881647 2. ... Nf6 3. Nf3 e5 4. Be2 Be7 5. Nc3 O-O 6. O-O d6 7. Bd2 Bd7 8. Nd5 Nxd5 9. exd5 Nd4 10. Nxd4 exd4
18 0 340 10380132 2. ... Nf6 3. Nf3 e5 4. Be2 Bb4+ 5. Nc3 d5 6. O-O Bxc3 7. bxc3 dxe4 8. Ng5 exd3 9. cxd3 Nd5 10. Ne4 O-O 11. Ba3 Re8
18 0 356 10867350 2. ... Nf6 3. Nf3 e5 4. Be2 Bb4+ 5. Nc3 d5 6. O-O Bxc3 7. bxc3 dxe4 8. Ng5 exd3 9. cxd3 Nd5 10. Ne4 O-O 11. Ba3 Re8
move Nf6
I don't understand why others have to dump so much garbage...
Here's debug from board for Gaviota, as an example (it only seems to get into chatty-kathy mode when pondering): Note this is just a snippet, there is MUCH more of this for one move.
Code: Select all
59423 <second: 14 -1027 248 1973294 :-(
Impossible move a1g1^A, type = 0
60101 <second: 14 -1349 316 2640242 Ng7 56.Rd6+ Kh5 57.Kf3 Nf5 58.Ng3+ Kg5 59.Rd5 Kf6 60.Rxf5+ Ke6 61.Ke4 Kd6 62.f4 Kc6 63.Ra5 Kd6 64.Rxa4
44 44 44 3 23 44 44 44
44 44 44 44 44 44 44 44
44 44 44 44 44 44 44 43
44 44 44 44 44 44 1 44
22 44 44 44 44 44 44 44
0 44 44 44 44 44 44 44
44 44 44 44 44 0 21 44
44 44 44 44 44 44 44 44
Impossible move a1g1^A, type = 24
60384 <second: 14 -1349 345 2935316 Ng7 56.Rd6+ Kh5 57.Kf3 Nf5 58.Ng3+ Kg5 59.Rd5 Kf6 60.Rxf5+ Ke6 61.Ke4 Kd6 62.f4 Kc6 63.Ra5 Kd6 64.Rxa4
44 44 44 3 23 44 44 44
44 44 44 44 44 44 44 44
44 44 44 44 44 44 44 43
44 44 44 44 44 44 1 44
22 44 44 44 44 44 44 44
0 44 44 44 44 44 44 44
44 44 44 44 44 0 21 44
44 44 44 44 44 44 44 44
Impossible move a1g1^A, type = 24
62145 <second: 15 -1349 521 4661556 Ng7 56.Rd6+ Kh5 57.Kf3 Nf5 58.Ng3+ Kg5 59.Rd5 Kf6 60.Rxf5+ Ke6 61.Ke4 Kd6 62.f4 Kc6 63.Ra5 Kd6 64.Rxa4
44 44 44 3 23 44 44 44
44 44 44 44 44 44 44 44
44 44 44 44 44 44 44 43
44 44 44 44 44 44 1 44
22 44 44 44 44 44 44 44
0 44 44 44 44 44 44 44
44 44 44 44 44 0 21 44
44 44 44 44 44 44 44 44
Impossible move a1g1^A, type = 24
62170 <second: 15 -1349 523 4687424 Ng7 56.Rd6+ Kh5 57.Kf3 Nf5 58.Ng3+ Kg5 59.Rd5 Kf6 60.Rxf5+ Ke6 61.Ke4 Kd6 62.f4 Kc6 63.Ra5 Kd6 64.Rxa4
Impossible move a1g1^A, type = 24
62170 <second: 15 -1349 523 4687424 Ng7 56.Rd6+ Kh5 57.Kf3 Nf5 58.Ng3+ Kg5 59.Rd5 Kf6 60.Rxf5+ Ke6 61.Ke4 Kd6 62.f4 Kc6 63.Ra5 Kd6 64.Rxa4
44 44 44 3 23 44 44 44
44 44 44 44 44 44 44 44
44 44 44 44 44 44 44 43
44 44 44 44 44 44 1 44
22 44 44 44 44 44 44 44
0 44 44 44 44 44 44 44
44 44 44 44 44 0 21 44
44 44 44 44 44 44 44 44
Impossible move a1g1^A, type = 24
66236 <second: 16 -1357 930 8677892 Ng7 56.Rd6+ Kh5 57.Kf3 Nf5 58.Ng3+ Kg5 59.Rd5 Kf6 60.Rxf5+ Ke6 61.Ke4 Kd6 62.f4 Kc6 63.Ra5 Kb6 64.Rxa4 Kc7 65.Ra7+ Kd6
44 44 44 3 23 44 44 44
44 44 44 44 44 44 44 44
44 44 44 44 44 44 44 43
44 44 44 44 44 44 1 44
22 44 44 44 44 44 44 44
0 44 44 44 44 44 44 44
44 44 44 44 44 0 21 44
44 44 44 44 44 44 44 44
Impossible move a1g1^A, type = 24
66993 <second: 16 -1357 1005 9441395 Ng7 56.Rd6+ Kh5 57.Kf3 Nf5 58.Ng3+ Kg5 59.Rd5 Kf6 60.Rxf5+ Ke6 61.Ke4 Kd6 62.f4 Kc6 63.Ra5 Kb6 64.Rxa4 Kc7 65.Ra7+ Kd6
44 44 44 3 23 44 44 44
44 44 44 44 44 44 44 44
44 44 44 44 44 44 44 43
44 44 44 44 44 44 1 44
22 44 44 44 44 44 44 44
0 44 44 44 44 44 44 44
44 44 44 44 44 0 21 44
44 44 44 44 44 44 44 44
Impossible move a1g1^A, type = 24
write FEN 50-move: 0 108 0
e0. p=-4
e1. p=-4
e2. p=-4
e3. p=-4
e4. p=-4
e5. p=-4
e6. p=-4
e7. p=-4
e8. p=-3
e9. p=-4
e10. p=-3
e11. p=-4
e12. p=-3
e13. p=-4
e14. p=-4
e15. p=-4
e16. p=-3
e17. p=-4
e18. p=-3
e19. p=-2
e20. p=-4
e21. p=-2
e22. p=-2
e23. p=-4
e24. p=-4
e25. p=-4
e26. p=-3
e27. p=-3
e28. p=-4
...etc...
This is a case where the protocol has an issue. It would be nice to specify EXACTLY what a program should send, and anything else results in a loss. One program should not be able to influence the results by dumping way too much stuff. At long time controls, this is not a problem, but at 1m + 1s, one can see the effect of playing such a program, where games like crafty vs crafty proceed exactly as expected.
Any ideas???