Thanks Lucas. Yes - Jim had found this code and (a slight variation of) it is in phalanx subversion - but we have related bug somewhere else in the code.
When one makes a move in Scid/Scid vs PC with the "+" sign, the engine does not see the updated line/the IO is not working properly, and Phalanx continues to give PV for the old position. .. This bug is described in this thread somewhere above.
I'm not an engine programmer or win32 coder and i don't have a windows dev environement (i cross compile), so finding it is tough for me.
I just tried applying your slightly different code (patch) and it doesn't make any diff to phalanx.
And i just gave Discocheck 3.6.2 a quick cross compile,
but it works fine, and doesn't evidence our bug.
Diff for Lucas implementation (no change)
Code: Select all
--- evaluate.c 2012-08-30 18:05:44.000000000 +1000
+++ evaluate.c.lucas 2012-08-30 18:05:39.000000000 +1000
@@ -305,9 +305,6 @@
/* If we're running under XBoard then we can't use _kbhit() as the input commands
* are sent to us directly over the internal pipe */
if (Flag.xboard) {
-#if defined(FILE_CNT)
- if (stdin->_cnt > 0) return stdin->_cnt;
-#endif
if (!init) {
init = 1;
inh = GetStdHandle(STD_INPUT_HANDLE);
@@ -317,13 +314,17 @@
FlushConsoleInputBuffer(inh);
}
}
+
+ if (stdin->_cnt > 0) return stdin->_cnt;
+
if (pipe) {
if (!PeekNamedPipe(inh, NULL, 0, NULL, &dw, NULL)) return 1;
return dw;
}
else {
- GetNumberOfConsoleInputEvents(inh, &dw);
- return dw <= 1 ? 0 : dw;
+ return _kbhit();
+ // GetNumberOfConsoleInputEvents(inh, &dw);
+ // return dw <= 1 ? 0 : dw;
}
}
else return _kbhit();
Existing phalanx win32-only bug:
Code: Select all
These four commands don't reset the analysis under windows, though they are fine under Linux
Engine: 8 -1 91 384451 Pf5xe4 Pd2-d4 Ng8-f6
Engine: 9 1 233 919440 Pf5xe4 Pd2-d3 Ng8-f6 Pd3xe4 Pe7-e6 Bc1-g5 Ph7-h6 Bg5xf6 Qd8xf6 Nb1-c3 Bf8-a3
Engine: 9 1 350 1357705 Pf5xe4 Pd2-d3 Ng8-f6 Pd3xe4 Pe7-e6 Bc1-g5 Ph7-h6 Bg5xf6 Qd8xf6 Nb1-c3 Bf8-a3
Scid : exit
Scid : force
Scid : setboard rnbqkbnr/ppppp1pp/8/8/4p3/7P/PPPP1PP1/RNBQKBNR w KQkq - 0 3
Scid : analyze
Engine: 10 10 712 3127860 Pf5xe4 Pd2-d3 Pe4xd3 Bf1xd3 Ng8-f6 Ng1-f3 Nb8-c6 O-O Pd7-d5 Bc1-f4 Pe7-e6
Engine: 10 10 937 3885625 Pf5xe4 Pd2-d3 Pe4xd3 Bf1xd3 Ng8-f6 Ng1-f3 Nb8-c6 O-O Pd7-d5 Bc1-f4 Pe7-e6