Phalanx source code

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
Jim Ablett
Posts: 1418
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: Phalanx source code

Post by Jim Ablett »

Elorejano wrote:Thanks Jim!
But seems that Phalanx have time management bug. When is outoff book, its think too much, made a move, another "eternity" and loses on time.
Im using winboard and Arena
I dont know if is related to polling issues but in my computer (AMD, 2 cores, windowaXP).
Tell me if a winboard or Arena debug are needed
Hi Carlos,

it would be helpful if you could post winboard debug output.

Jim.
stevenaaus
Posts: 608
Joined: Wed Oct 13, 2010 9:44 am
Location: Australia

Re: Phalanx source code

Post by stevenaaus »

Yes - time management is very weak (so if anyone wants to do this as i'm sure JA has better things to do).
BTW, i still have the previously mentioned bug. But Olithink does not have this bug, so the answer is somewhere in Phalanx's code and will have a look when i get the time.
User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: Phalanx source code

Post by michiguel »

stevenaaus wrote:Yes - time management is very weak (so if anyone wants to do this as i'm sure JA has better things to do).
BTW, i still have the previously mentioned bug. But Olithink does not have this bug, so the answer is somewhere in Phalanx's code and will have a look when i get the time.
A while ago, when Phalanx was at the level of Gaviota, I used it as a partner. The TM was very bad and I modified it. I just checked and it looks like the only file it was updated by me was levels.c
Here it is, I think I changed the lines followed by my comment MAB

Miguel

Code: Select all

#include "phalanx.h"

long T1, T2;

long Time = 600*100;
long Otim = 600*100;


/* return time in centiseconds */
long ptime(void)
{
	if( Flag.easy ) return Nodes;
	else
	if( Flag.cpu ) return ((double)clock())*100/CLOCKS_PER_SEC;
	else
	{
#ifdef _WIN32
		return GetTickCount()/10;
#else
		struct timeval t;
		gettimeofday( &t, NULL );
		return t.tv_sec*100 + t.tv_usec/10000;
#endif
	}
}



void l_level( char * l )
{
	int moves, seconds, minutes, increment;

	while( *l == ' ' ) l++;
	moves = atoi(l);

	while( isdigit(*l) ) l++;
	while( *l == ' ' ) l++;

	if( *l == '\n' || *l == '\0' )
	if( ! Flag.easy )
	{
		printf("fixed time %i seconds\n", moves );
		Flag.level = fixedtime; Flag.centiseconds = moves*100;
		return;
	}

	minutes = atoi(l);

	while( isdigit(*l) ) l++;
	if( *l == ':' )
	{
		l++;
		seconds = atoi(l);
		while( isdigit(*l) ) l++;
	}
	else seconds = 0;

	while( isdigit(*l) ) l++;
	while( *l == ' ' ) l++;
	increment = atoi(l);

	if( moves==0 )
		printf(
		 "level: all moves in %i:%02i, increment %i seconds\n",
		 minutes, seconds, increment );
	else
		printf(
		 "level: %i moves in %i:%02i, increment %i seconds\n",
		 moves, minutes, seconds, increment );

	if( Flag.easy )
	{
		if( moves == 0 ) moves = 80;
		Flag.level = fixedtime;
		Flag.centiseconds =
			(increment+minutes*60/moves)
			* (150-Flag.easy);
		if( Flag.post )
		printf( "setting avg time to %i cs\n", Flag.centiseconds );
	}
	else
	{
		Flag.level = timecontrol;
		Flag.moves = moves;
		Flag.centiseconds = minutes*6000+seconds*100;
		Flag.increment = increment;
		Time = Flag.centiseconds;
	}
}



void l_startsearch(void)
{
	int moves;
	T1 = ptime();

	switch( Flag.level )
	{
	case timecontrol:
		if( Flag.moves > 0 ) moves = 2*Flag.moves;
		else
		{
			moves = Counter +
			        (G[Counter].mtrl+G[Counter].xmtrl)/800;
			if&#40; Counter < 120 )
				moves += 60 - Counter/4;
			else	moves += 30;
		&#125;

		if&#40; Flag.increment == 0 ) T2 = 0;
		else
		if&#40; Time/Flag.increment >= 1600 )
			T2 = Flag.increment * 60;
		else
		if&#40; Time/Flag.increment <= 400 )
			T2 = Flag.increment * 10;
		else
			T2 = Flag.increment * &#40;Time/Flag.increment/8-20&#41;/3;

		if&#40; Flag.post && T2 && Flag.xboard<2 )
		printf&#40; "    -> increment adds %g s to soft time limit\n",
			(&#40;float&#41;T2&#41; / &#40;float&#41;100 );

		T2 += Time / ( moves - Counter%moves + 4 ); 
															/* MAB&#58; commented out a zero in the next lines */

		if&#40; Flag.ponder ) T2 += T2/8;

		if&#40; Flag.increment==0 && Flag.level==timecontrol )
		&#123;
			if&#40; Time<150/*0*/ ) T2 -= T2/2;
			else if&#40; Time<600/*0*/ ) T2 -= T2/4;
		&#125;

		if&#40; Flag.post && Flag.xboard<2 )
		printf&#40; "    -> soft time limit %g s\n",
			(&#40;float&#41;T2&#41; / &#40;float&#41;100 );

		/*** Now, set up the hard limit ***/
		     if&#40; Time < 150/*0*/) Flag.centiseconds = Time/&#40;moves+1&#41;*3;
		else if&#40; Time < 300/*0*/) Flag.centiseconds = Time/&#40;moves+1&#41;*6;
		else if&#40; Time < 600/*0*/) Flag.centiseconds = Time/&#40;moves+1&#41;*12;
		else                  Flag.centiseconds = Time/&#40;moves+1&#41;*18;

		Flag.centiseconds += 400*Flag.increment;

		if&#40; Flag.centiseconds > Time-Flag.increment*100 )
		&#123;
			if&#40; Time > 200*Flag.increment )
			      Flag.centiseconds = Time-100*Flag.increment;
			else  Flag.centiseconds = Time/2;
		&#125;

		if&#40; Flag.centiseconds < 25 ) Flag.centiseconds = 25;

		if&#40; Flag.post && Flag.xboard<2 )
		printf&#40; "    -> hard time limit %g s\n",
			(&#40;float&#41;Flag.centiseconds&#41; / &#40;float&#41;100 );

	break;
	case averagetime&#58;
		T2 = Flag.centiseconds/3;
	break;
	default&#58; break;
	&#125;

	if&#40; T2 < 1 ) T2 = 1;
&#125;



int l_iterate&#40;void&#41;
&#123;
	if&#40; Flag.level == fixeddepth )
	&#123;
		return ( Depth < Flag.depth );
	&#125;
	else
	if&#40; Flag.level == averagetime || Flag.level == timecontrol )
	&#123;
		long t = ptime&#40;);
		switch&#40; EasyMove )
		&#123;
			case 1&#58;  return ( t <= T1 + T2/3 );
			case 2&#58;  return ( t <= T1 + T2/6 );
			default&#58;
				if&#40; Turns==0 ) return ( t <= T1 + T2 );
				else return ( t <= T1 + T2*&#40;8+Turns&#41;/8 );
		&#125;
	&#125;
	else
	return 1;
&#125;
User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: Phalanx source code

Post by michiguel »

Elorejano wrote:Thanks Jim!
But seems that Phalanx have time management bug. When is outoff book, its think too much, made a move, another "eternity" and loses on time.
Im using winboard and Arena
I dont know if is related to polling issues but in my computer (AMD, 2 cores, windowaXP).
Tell me if a winboard or Arena debug are needed
I do not remember the problem I saw, but It was fine with me after I fixed something. If you are compiling it yourself (as I see you asked for the source code) replace the text in levels.c with the one I posted in the previous message.

Saludos,
Miguel
EDIT

Yes, I just confirmed with a "diff" comparing it with the file that JA provided. What I changed was the following section (the actual change was /*0*/ removing a zero.

Code: Select all

															/* MAB&#58; commented out a zero in the next lines */

		if&#40; Flag.ponder ) T2 += T2/8;

		if&#40; Flag.increment==0 && Flag.level==timecontrol )
		&#123;
			if&#40; Time<150/*0*/ ) T2 -= T2/2;
			else if&#40; Time<600/*0*/ ) T2 -= T2/4;
		&#125;

		if&#40; Flag.post && Flag.xboard<2 )
		printf&#40; "    -> soft time limit %g s\n",
			(&#40;float&#41;T2&#41; / &#40;float&#41;100 );

		/*** Now, set up the hard limit ***/
		     if&#40; Time < 150/*0*/) Flag.centiseconds = Time/&#40;moves+1&#41;*3;
		else if&#40; Time < 300/*0*/) Flag.centiseconds = Time/&#40;moves+1&#41;*6;
		else if&#40; Time < 600/*0*/) Flag.centiseconds = Time/&#40;moves+1&#41;*12;
		else                  Flag.centiseconds = Time/&#40;moves+1&#41;*18;
jdart
Posts: 4368
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: polling

Post by jdart »

Arasan used to to do polling, prior to version 11.3, but I found it was not completely reliable. So I switched to doing a blocking read in a separate thread. If you want the old polling code, you can look at 11.2 source.

--Jon
Elorejano
Posts: 101
Joined: Sat Mar 20, 2010 3:31 am

Re: polling

Post by Elorejano »

Here it is, sorry for the long post:

recognized 'normal' (-1) as variant normal
recognized 'normal' (-1) as variant normal
WinBoard 4.5.1 + Phalanx
Reset(1, 0) from gameMode 0
recognized 'normal' (-1) as variant normal
GameEnds(0, (null), 2)
shuffleOpenings = 0
TC string = ':300'
mps=0 tc=300000 inc=0
TC string = ':300'
mps=0 tc=300000 inc=0
StartChildProcess (dir="e:\winboard\engines\phalanx23") Phalanx -l+ -t131072 -r900
625 >first : xboard
protover 2
625 <first : Phalanx XXIII JA
625 <first : primary book ./pbook.phalanx, 50577 bytes
625 <first : secondary book ./sbook.phalanx, 4831506 bytes
625 <first : learning file ./learn.phalanx, 262144 bytes
625 <first : tellics set 1 Phalanx XXIII JA, 131072 kB hashtable, 49/4718 kB P/S opening book
625 <first : [ white, 1 ]
625 <first : xboard mode on
625 <first : feature myname="Phalanx XXIII JA" analyze=1 setboard=1 sigint=1 time=1 draw=0 reuse=0
625 >first : accepted myname
625 >first : accepted analyze
625 >first : accepted setboard
625 >first : accepted sigint
625 >first : accepted time
625 >first : accepted draw
625 >first : accepted reuse
625 <first : Illegal move: accepted myname
625 <first : Illegal move: accepted analyze
625 <first : Illegal move: accepted setboard
625 <first : Illegal move: accepted sigint
625 <first : Illegal move: accepted time
625 <first : Illegal move: accepted draw
625 <first : Illegal move: accepted reuse
10625 >first : new
random
10625 >first : level 0 5 0
10625 >first : post
10625 >first : hard
10625 <first : initial position set, machine plays black
10625 <first : level: all moves in 5:00, increment 0 seconds
10625 <first : post on
10625 <first : pondering on
14297 >first : force
StartChildProcess (dir="e:\winboard\engines\alaric") AlaricWB
14813 >second: xboard
protover 2
14813 <second: Alaric 707 by Peter Fendrich
14813 <second:
14813 <second: KPK bitbase found
14813 <second:
14813 <second: DBG: Alloc Hash 4194304 entries using 67108864 bytes
14813 <second:
14813 <first : you play both
14813 <second:
14813 <second: feature ping=1 setboard=1 playother=1 usermove=1 sigint=0 reuse=0 colors=0 ics=1
14813 >second: accepted ping
14813 >second: accepted setboard
14813 >second: accepted playother
14828 >second: accepted usermove
14828 >second: accepted sigint
14828 >second: accepted reuse
14828 >second: accepted colors
14828 >second: accepted ics
14828 <second: feature myname="Alaric 707"
14828 >second: accepted myname
14828 <second: feature done=1
14828 >second: accepted done
14828 <second:
14828 <second:
14828 <second:
14828 <second:
14828 <second:
14828 <second:
14828 <second:
14828 <second:
14828 <second:
14828 <second:
14828 <second:
14844 >second: new
random
14844 >second: ics -
14844 >second: level 0 5 0
14844 >second: post
14844 >second: hard
14844 >second: ping 1
14844 >second: force
14844 >first : computer
14844 >second: computer
TC string = ':300'
mps=0 tc=300000 inc=0
TC string = ':300'
mps=0 tc=300000 inc=0
14844 >first : black
time odds: 1.000000 1.000000
14844 >first : time 30000
14844 >first : otim 30000
14844 >first : white
book hit = (NULL)
14844 >first : go
nps: w=-1, b=-1
14844 <first : Illegal move: computer
14844 <first : you do not play both
14844 <first : you do not play both
14844 <first : 0 0 0 0Pe2-e4 Pd2-d4 Pc2-c4 Ng1-f3 Pf2-f4 , book1
14844 <first : my move is Pe2-e4
14860 <first : 1. ... e2e4
machine move 0, castling = 7 0 4 7 0 4
7 0 4 7 0 4 Legality test? e2e4
7 0 4 7 0 4 Legality test? e2e4
(7,0) (0,0) (4,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=0 (4,1)-(4,3) -
7 0 4 7 0 4 Legality test? e2e4
movetype=21, promochar=0=-
MateTest: K=1, my=16, his=16
move: e2e4
, parse: e4 (
)
MateTest: K=1, my=16, his=16
repeat test fmm=1 bmm=0 ep=-4, reps=6
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
14860 >second: time 30000
14860 >second: otim 29998
book hit = (NULL)
14860 >second: usermove 14860 >second: e2e4
14860 >second: go
15000 <first : No move to ponder from PV.
15000 <first : Looking for a move to ponder.
15000 <first : 0 0 0 0Pe7-e5 Pc7-c5 Pe7-e6 Pc7-c6 Ng8-f6 Pd7-d5 , book1
15000 <first : Found in book.
15000 <first : Done.
15000 <first : Hint: Pc7-c5
15000 <first : 0 0 0 0Ng1-f3 Pc2-c3 Nb1-c3 , book1
15000 <second: DBG: Alloc Hash 8388608 entries using 134217728 bytes
15547 <second: DBG: OwnBook=true with GS_Alaric_3.book
15547 <second: DBG: Draw=1
15547 <second: DBG: Resign=1
15547 <second: DBG: LazyEval =1
15547 <second: DBG: LazyNull=0
15547 <second: DBG: LMRresearch=1
15547 <second: DBG: NullEval=1
15547 <second: DBG: OwnBook=1
15547 <second: DBG: Ponder=1
15547 <second: DBG: Log=0
15547 <second: DBG: Tell=0
15547 <second: DBG: ResignScore=-800
15547 <second: DBG: ResignNumber=3
15547 <second: DBG: DrawScore=0
15547 <second: DBG: DrawNumber=6
15547 <second: DBG: Hash=128
15547 <second: DBG: HistoryValue=60
15547 <second: DBG: LazyEvalLimit=200
15547 <second: DBG: LearnDepth=8
15547 <second: DBG: LMRMoveNumber=3
15547 <second: DBG: LMRreduction=50
15547 <second: DBG: LMRStartDepth=250
15547 <second: DBG: NullReduction=250
15547 <second: DBG: NullStartDepth=150
15547 <second:
15547 <second:
15547 <second: Error (unknown command): random
15547 <second:
15547 <second:
15547 <second:
15547 <second:
15547 <second: Error (unknown command): post
15547 <second:
15547 <second:
15547 <second: pong 1
15547 <second:
15547 <second:
15547 <second:
15547 <second:
15547 <second: dbg: otim ok
15547 <second:
15547 <second:
15563 <second: move e7e5
machine move 1, castling = 7 0 4 7 0 4
7 0 4 7 0 4 Legality test? e7e5
7 0 4 7 0 4 Legality test? e7e5
(7,0) (0,0) (4,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=22 (4,6)-(4,4) -
7 0 4 7 0 4 Legality test? e7e5
movetype=21, promochar=0=-
MateTest: K=1, my=16, his=16
move: e7e5
, parse: e5 (
)
MateTest: K=1, my=16, his=16
repeat test fmm=2 bmm=0 ep=-4, reps=6
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
Interrupting first
15563 >first : time 29998
15563 >first : otim 29929
book hit = (NULL)
15563 >first : e7e5
15641 <second:
15641 <first :
15656 <first : your move is Pe7-e5
15656 <first : 0 0 0 0Ng1-f3 Nb1-c3 Bf1-c4 Pf2-f4 Pd2-d4 , book1
15656 <first : my move is Ng1-f3
15656 <first : 2. ... g1f3
machine move 2, castling = 7 0 4 7 0 4
7 0 4 7 0 4 Legality test? g1f3
7 0 4 7 0 4 Legality test? g1f3
(7,0) (0,0) (4,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=1 (6,0)-(5,2) -
MateTest: K=1, my=16, his=16
move: g1f3
, parse: Nf3 (
)
MateTest: K=1, my=16, his=16
repeat test fmm=3 bmm=0 ep=-4, reps=6
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
15656 >second: time 29929
15656 >second: otim 29989
book hit = (NULL)
15656 >second: usermove 15656 >second: g1f3
15766 <first : No move to ponder from PV.
15766 <first : Looking for a move to ponder.
15766 <first : 0 0 0 0Nb8-c6 Ng8-f6 , book1
15766 <first : Found in book.
15766 <first : Done.
15781 <first : Hint: Ng8-f6
15781 <first : 0 0 0 0Nf3xe5 Pd2-d4 Nb1-c3 Bf1-c4 , book1
15781 <second:
15781 <second: dbg: otim ok
15781 <second:
15781 <second: move b8c6
machine move 3, castling = 7 0 4 7 0 4
7 0 4 7 0 4 Legality test? b8c6
7 0 4 7 0 4 Legality test? b8c6
(7,0) (0,0) (4,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=23 (1,7)-(2,5) -
MateTest: K=1, my=16, his=16
move: b8c6
, parse: Nc6 (
)
MateTest: K=1, my=16, his=16
repeat test fmm=4 bmm=0 ep=-4, reps=6
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
Interrupting first
15781 >first : time 29989
15781 >first : otim 29917
book hit = (NULL)
15781 >first : b8c6
15891 <second:
15891 <first :
15891 <first : your move is Nb8-c6
15891 <first : 0 0 0 0Bf1-b5 Bf1-c4 Pd2-d4 Nb1-c3 Pc2-c3 , book1
15891 <first : my move is Pd2-d4
15891 <first : 3. ... d2d4
machine move 4, castling = 7 0 4 7 0 4
7 0 4 7 0 4 Legality test? d2d4
7 0 4 7 0 4 Legality test? d2d4
(7,0) (0,0) (4,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=0 (3,1)-(3,3) -
7 0 4 7 0 4 Legality test? d2d4
movetype=21, promochar=0=-
MateTest: K=1, my=16, his=16
move: d2d4
, parse: d4 (
)
MateTest: K=1, my=16, his=16
repeat test fmm=5 bmm=0 ep=-4, reps=6
5 ep=-3
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
15906 >second: time 29917
15906 >second: otim 29976
book hit = (NULL)
15906 >second: usermove 15906 >second: d2d4
15985 <first : No move to ponder from PV.
15985 <first : Looking for a move to ponder.
15985 <first : 0 0 0 0Pe5xd4 , book2
15985 <first : Found in book.
15985 <first : Done.
15985 <first : Hint: Pe5xd4
15985 <first : 0 0 0 0Nf3xd4 Bf1-c4 , book1
15985 <second:
16000 <second: dbg: otim ok
16000 <second:
16000 <second: move e5d4
machine move 5, castling = 7 0 4 7 0 4
7 0 4 7 0 4 Legality test? e5d4
7 0 4 7 0 4 Legality test? e5d4
(7,0) (0,0) (4,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=22 (4,4)-(3,3) -
7 0 4 7 0 4 Legality test? e5d4
movetype=21, promochar=0=-
MateTest: K=1, my=15, his=16
move: e5d4
, parse: exd4 (
)
MateTest: K=1, my=15, his=16
repeat test fmm=6 bmm=0 ep=-4, reps=6
6 ep=-3
5 ep=-3
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
Interrupting first
16000 >first : time 29976
16000 >first : otim 29907
book hit = (NULL)
16000 >first : e5d4
16078 <second:
16078 <first :
16094 <first : your move is Pe5xd4
16094 <first : 0 0 0 0Nf3xd4 Bf1-c4 , book1
16094 <first : my move is Nf3xd4
16094 <first : 4. ... f3d4
machine move 6, castling = 7 0 4 7 0 4
7 0 4 7 0 4 Legality test? f3d4
7 0 4 7 0 4 Legality test? f3d4
(7,0) (0,0) (4,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=1 (5,2)-(3,3) -
MateTest: K=1, my=15, his=15
move: f3d4
, parse: Nxd4 (
)
MateTest: K=1, my=15, his=15
repeat test fmm=7 bmm=0 ep=-4, reps=6
7 ep=-2
6 ep=-3
5 ep=-3
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
16094 >second: time 29907
16094 >second: otim 29967
book hit = (NULL)
16094 >second: usermove 16094 >second: f3d4
16203 <first : No move to ponder from PV.
16203 <first : Looking for a move to ponder.
16203 <first : 0 0 0 0Bf8-c5 Ng8-f6 , book2
16203 <first : Found in book.
16203 <first : Done.
16203 <first : Hint: Ng8-f6
16203 <first : 0 0 0 0Nb1-c3 Nd4xc6 , book1
16203 <second:
16219 <second: dbg: otim ok
16219 <second:
16219 <second: move g8f6
machine move 7, castling = 7 0 4 7 0 4
7 0 4 7 0 4 Legality test? g8f6
7 0 4 7 0 4 Legality test? g8f6
(7,0) (0,0) (4,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=23 (6,7)-(5,5) -
MateTest: K=1, my=15, his=15
move: g8f6
, parse: Nf6 (
)
MateTest: K=1, my=15, his=15
repeat test fmm=8 bmm=0 ep=-4, reps=6
8 ep=-4
7 ep=-2
6 ep=-3
5 ep=-3
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
Interrupting first
16219 >first : time 29967
16219 >first : otim 29895
book hit = (NULL)
16219 >first : g8f6
16313 <second:
16313 <first :
16328 <first : your move is Ng8-f6
16328 <first : 0 0 0 0Nb1-c3 Nd4xc6 , book1
16328 <first : my move is Nb1-c3
16328 <first : 5. ... b1c3
machine move 8, castling = 7 0 4 7 0 4
7 0 4 7 0 4 Legality test? b1c3
7 0 4 7 0 4 Legality test? b1c3
(7,0) (0,0) (4,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=1 (1,0)-(2,2) -
MateTest: K=1, my=15, his=15
move: b1c3
, parse: Nc3 (
)
MateTest: K=1, my=15, his=15
repeat test fmm=9 bmm=0 ep=-4, reps=6
9 ep=-4
8 ep=-4
7 ep=-2
6 ep=-3
5 ep=-3
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
16344 >second: time 29895
16344 >second: otim 29956
book hit = (NULL)
16344 >second: usermove 16344 >second: b1c3
16438 <first : No move to ponder from PV.
16453 <first : Looking for a move to ponder.
16453 <first : 0 0 0 0Bf8-b4 , book2
16453 <first : Found in book.
16453 <first : Done.
16453 <first : Hint: Bf8-b4
16453 <first : 0 0 0 0Nd4xc6 , book2
16453 <second:
16453 <second: dbg: otim ok
16453 <second:
16453 <second: move d7d6
machine move 9, castling = 7 0 4 7 0 4
7 0 4 7 0 4 Legality test? d7d6
7 0 4 7 0 4 Legality test? d7d6
(7,0) (0,0) (4,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=22 (3,6)-(3,5) -
7 0 4 7 0 4 Legality test? d7d6
movetype=21, promochar=0=-
MateTest: K=1, my=15, his=15
move: d7d6
, parse: d6 (
)
MateTest: K=1, my=15, his=15
repeat test fmm=10 bmm=0 ep=-4, reps=6
10 ep=-3
9 ep=-4
8 ep=-4
7 ep=-2
6 ep=-3
5 ep=-3
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
Interrupting first
16453 >first : time 29956
16453 >first : otim 29882
book hit = (NULL)
16453 >first : d7d6
16531 <second:
16531 <first :
16547 <first : your move is Pd7-d6
16547 <first : 0 0 0 0Bf1-b5 Bf1-e2 , book2
16547 <first : my move is Bf1-b5
16547 <first : 6. ... f1b5
machine move 10, castling = 7 0 4 7 0 4
7 0 4 7 0 4 Legality test? f1b5
7 0 4 7 0 4 Legality test? f1b5
(7,0) (0,0) (4,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=2 (5,0)-(1,4) -
MateTest: K=1, my=15, his=15
move: f1b5
, parse: Bb5 (
)
MateTest: K=1, my=15, his=15
repeat test fmm=11 bmm=0 ep=-4, reps=6
11 ep=-4
10 ep=-3
9 ep=-4
8 ep=-4
7 ep=-2
6 ep=-3
5 ep=-3
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
16547 >second: time 29882
16547 >second: otim 29946
book hit = (NULL)
16547 >second: usermove 16547 >second: f1b5
16656 <first : No move to ponder from PV.
16656 <first : Looking for a move to ponder.
16656 <first : 0 0 0 0Bc8-d7 , book2
16656 <first : Found in book.
16656 <first : Done.
16656 <first : Hint: Bc8-d7
16656 <first : 0 0 0 0O-O , book2
16656 <second:
16672 <second: dbg: otim ok
16672 <second:
16672 <second: move c8d7
machine move 11, castling = 7 0 4 7 0 4
7 0 4 7 0 4 Legality test? c8d7
7 0 4 7 0 4 Legality test? c8d7
(7,0) (0,0) (4,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=24 (2,7)-(3,6) -
MateTest: K=1, my=15, his=15
move: c8d7
, parse: Bd7 (
)
MateTest: K=1, my=15, his=15
repeat test fmm=12 bmm=0 ep=-4, reps=6
12 ep=-4
11 ep=-4
10 ep=-3
9 ep=-4
8 ep=-4
7 ep=-2
6 ep=-3
5 ep=-3
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
Interrupting first
16672 >first : time 29946
16672 >first : otim 29870
book hit = (NULL)
16672 >first : c8d7
16750 <second:
16750 <first :
16766 <first : your move is Bc8-d7
16766 <first : 0 0 0 0O-O , book2
16766 <first : my move is O-O
16766 <first : 7. ... o-o
machine move 12, castling = 7 0 4 7 0 4
short castling 4 6
7 0 4 7 0 4 Legality test? e1g1
7 0 4 7 0 4 Legality test? e1g1
(7,0) (0,0) (4,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=21 (4,0)-(6,0) -
7 0 4 7 0 4 Legality test? e1g1
MateTest: K=1, my=15, his=15
move: e1g1
, parse: O-O (
)
MateTest: K=1, my=15, his=15
repeat test fmm=13 bmm=0 ep=-4, reps=6
13 ep=-4
12 ep=-4
11 ep=-4
10 ep=-3
9 ep=-4
8 ep=-4
7 ep=-2
6 ep=-3
5 ep=-3
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
16766 >second: time 29870
16766 >second: otim 29937
book hit = (NULL)
16766 >second: usermove 16766 >second: e1g1
16860 <first : No move to ponder from PV.
16860 <first : Looking for a move to ponder.
16860 <first : 0 0 0 0Bf8-e7 , book2
16860 <first : Found in book.
16860 <first : Done.
16860 <first : Hint: Bf8-e7
16860 <first : 0 0 0 0Bb5xc6 Rf1-e1 , book2
16860 <second:
16875 <second: dbg: otim ok
16875 <second:
16969 <second: 9 -46 20 119327 c6d4 d1d4 f8e7 b5d7 d8d7 c1g5 e8g8 e4e5 f6h5 g5e7 d7e7 e5d6 e7d6 d4d6 c7d6
17125 <second: 10 -46 36 224628 c6d4 d1d4 f8e7 c1e3 e8g8 d4a4 b7b6 b5d7 d8d7 a4c4
17485 <second: 11 -44 72 469043 c6d4 d1d4 f8e7 c1e3 e8g8 b5d7 d8d7 f2f3 d7c6 d4b4 b7b6
17906 <second: 12 -49 114 771344 c6d4 d1d4 f8e7 c1e3 e8g8 b5d7 d8d7 f2f3 d7c6 d4d3 a7a5 a2a3
19594 <second: 12 -42 283 1900399 f8e7 d4c6 b7c6 b5c4 e8g8 c1f4 f6g4 d1c1 g4e5 f4e5 d6e5 f1d1
21985 <second: 13 -43 522 3512964 f8e7 f1e1 e8g8 d4f5 a7a6 b5c6 b7c6 d1d3 g7g6 c1h6 g6f5 h6f8 d8f8 e4f5
27203 <second: 14 -53 1044 7072152 f8e7 d4c6 b7c6 b5c4 e8g8 h2h3 d8c8 c1f4 d7e6 c4e6 c8e6 d1d4 a8b8
30500 <second: 14 -46 1372 9345973 c6d4 d1d4 f8e7 b5d7 d8d7 f1d1 d7c6 e4e5 d6e5 d4e5 c6c5 c1f4 c5e5 f4e5 a8c8
31875 <second: info string Q2 break
31875 <second: 15 -46 1511 10337986 c6d4 d1d4 f8e7 b5d7 d8d7 f1d1 d7c6 e4e5 d6e5 d4e5 c6c5 c1f4 c5e5 f4e5 a8c8
31875 <second: move c6d4
machine move 13, castling = 7 0 45 7 0 4
7 0 45 7 0 4 Legality test? c6d4
7 0 45 7 0 4 Legality test? c6d4
(7,0) (0,0) (45,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=23 (2,5)-(3,3) -
MateTest: K=1, my=14, his=15
move: c6d4
, parse: Nxd4 (
)
MateTest: K=1, my=14, his=15
repeat test fmm=14 bmm=0 ep=-4, reps=6
14 ep=-2
13 ep=-4
12 ep=-4
11 ep=-4
10 ep=-3
9 ep=-4
8 ep=-4
7 ep=-2
6 ep=-3
5 ep=-3
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
Interrupting first
31875 >first : time 29937
31875 >first : otim 28359
book hit = (NULL)
31875 >first : c6d4
31985 <second: Hint: d1d4
31985 <first :
31985 <first : your move is Nc6xd4
31985 <first : 0 0 0 0Qd1xd4 Bb5xd7 , book2
32000 <first : my move is Bb5xd7
32000 <first : 8. ... b5d7
machine move 14, castling = 7 0 45 7 0 4
7 0 45 7 0 4 Legality test? b5d7
7 0 45 7 0 4 Legality test? b5d7
(7,0) (0,0) (45,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=2 (1,4)-(3,6) -
MateTest: K=1, my=14, his=14
move: b5d7
, parse: Bxd7+ (
)
MateTest: K=1, my=14, his=14
repeat test fmm=15 bmm=0 ep=-4, reps=6
15 ep=-2
14 ep=-2
13 ep=-4
12 ep=-4
11 ep=-4
10 ep=-3
9 ep=-4
8 ep=-4
7 ep=-2
6 ep=-3
5 ep=-3
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
32000 >second: time 28359
32000 >second: otim 29925
book hit = (NULL)
32000 >second: usermove 32000 >second: b5d7
32094 <first : No move to ponder from PV.
32094 <first : Looking for a move to ponder.
32094 <first : 0 0 0 0Qd8xd7 , book2
32094 <first : Found in book.
32094 <first : Done.
32094 <first : Hint: Qd8xd7
32094 <first : 0 0 0 0Qd1xd4 , book2
32110 <second: 9 -46 13 75986 f8e7 b5d7 d8d7 f2f3 d7c6 d4d3 f6d7 c3d5 d7e5 d3b5
32110 <second: dbg: otim ok
32110 <second: info string Break set from 'stop'
32110 <second: 9 -44 3 26911 d8d7 d1d4 f8e7 f2f3 e8g8 c1e3 d7c6 d4b4 a7a5
32110 <second: 10 -46 5 37955 d8d7 d1d4 f8e7 f2f3 d7c6 d4d3 f6d7 c3d5 d7e5 d3b5
32110 <second: 11 -48 8 61819 d8d7 d1d4 f8e7 f1d1 d7c6 d1d3 e8g8 c1f4 f6g4 c3d5 e7f6
32250 <second: 12 -50 25 170665 d8d7 d1d4 f8e7 f1d1 d7e6 c3b5 e7d8 c1f4 a7a6 b5c3 e8g8
32469 <second: 13 -46 47 327821 d8d7 d1d4 f8e7 f1d1 d7c6 e4e5 d6e5 d4e5 c6c5 c1f4 c5e5 f4e5 a8c8
34922 <second: 14 -49 292 2028935 d8d7 d1d4 f8e7 f1d1 f6g4 h2h3 g4e5 f2f4 c7c5 d4d5 e5c6 c1e3 c6b4 d5b3
40656 <second: 15 -57 866 6003304 d8d7 d1d4 f8e7 f1d1 d7e6 c3b5 e7d8 c1f4 a7a6 b5c3 e8g8 e4e5 d6e5 d4e5 f8e8
42875 <second: info string Q2 break
42875 <second: 16 -57 1088 7552691 d8d7 d1d4 f8e7 f1d1 d7e6 c3b5 e7d8 c1f4 a7a6 b5c3 e8g8 e4e5 d6e5 d4e5 f8e8
42875 <second: move d8d7
machine move 15, castling = 7 0 45 7 0 4
7 0 45 7 0 4 Legality test? d8d7
7 0 45 7 0 4 Legality test? d8d7
(7,0) (0,0) (45,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=26 (3,7)-(3,6) -
MateTest: K=1, my=13, his=14
move: d8d7
, parse: Qxd7 (
)
MateTest: K=1, my=13, his=14
repeat test fmm=16 bmm=0 ep=-4, reps=6
16 ep=-2
15 ep=-2
14 ep=-2
13 ep=-4
12 ep=-4
11 ep=-4
10 ep=-3
9 ep=-4
8 ep=-4
7 ep=-2
6 ep=-3
5 ep=-3
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
Interrupting first
42875 >first : time 29925
42875 >first : otim 27271
book hit = (NULL)
42875 >first : d8d7
42953 <second: Hint: d1d4
42953 <first :
42969 <first : your move is Qd8xd7
42969 <first : 0 0 0 0Qd1xd4 , book2
42969 <first : my move is Qd1xd4
42969 <first : 9. ... d1d4
machine move 16, castling = 7 0 45 7 0 4
7 0 45 7 0 4 Legality test? d1d4
7 0 45 7 0 4 Legality test? d1d4
(7,0) (0,0) (45,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=4 (3,0)-(3,3) -
MateTest: K=1, my=13, his=13
move: d1d4
, parse: Qxd4 (
)
MateTest: K=1, my=13, his=13
repeat test fmm=17 bmm=0 ep=-4, reps=6
17 ep=-2
16 ep=-2
15 ep=-2
14 ep=-2
13 ep=-4
12 ep=-4
11 ep=-4
10 ep=-3
9 ep=-4
8 ep=-4
7 ep=-2
6 ep=-3
5 ep=-3
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
42969 >second: time 27271
42969 >second: otim 29915
book hit = (NULL)
42969 >second: usermove 42969 >second: d1d4
43078 <first : No move to ponder from PV.
43078 <first : Looking for a move to ponder.
43078 <first : 0 0 0 0Bf8-e7 , book2
43078 <first : Found in book.
43078 <first : Done.
43078 <first : Hint: Bf8-e7
43078 <first : 0 0 0 0Bc1-g5 , book2
43094 <second: dbg: otim ok
43094 <second: 9 -50 11 55297 f8e7 f1d1 d7e6 c3b5 e7d8 c1f4 a7a6 b5c3 e8g8
43094 <second: 10 -57 19 114447 f8e7 f1d1 d7c6 e4e5 d6e5 d4e5 c6c5 e5e2 e8g8 c1f4
43235 <second: 11 -46 36 231352 f8e7 f1d1 d7c6 e4e5 d6e5 d4e5 c6c5 c1f4 c5e5 f4e5 a8c8
43735 <second: 12 -45 86 580456 f8e7 f1d1 d7e6 c3b5 e6d7 d4c4 e8g8 c1f4 a7a6 b5c3 b7b5 c4b4
44141 <second: 13 -57 125 851210 f8e7 f1d1 d7e6 c3b5 e7d8 c1f4 a7a6 b5c3 e8g8 e4e5 d6e5 d4e5 f8e8
53328 <second: info string Q2 break
53328 <second: 14 -57 1045 7036257 f8e7 f1d1 d7e6 c3b5 e7d8 c1f4 a7a6 b5c3 e8g8 e4e5 d6e5 d4e5 f8e8
53328 <second: move f8e7
machine move 17, castling = 7 0 45 7 0 4
7 0 45 7 0 4 Legality test? f8e7
7 0 45 7 0 4 Legality test? f8e7
(7,0) (0,0) (45,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=24 (5,7)-(4,6) -
MateTest: K=1, my=13, his=13
move: f8e7
, parse: Be7 (
)
MateTest: K=1, my=13, his=13
repeat test fmm=18 bmm=0 ep=-4, reps=6
18 ep=-4
17 ep=-2
16 ep=-2
15 ep=-2
14 ep=-2
13 ep=-4
12 ep=-4
11 ep=-4
10 ep=-3
9 ep=-4
8 ep=-4
7 ep=-2
6 ep=-3
5 ep=-3
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
Interrupting first
53328 >first : time 29915
53328 >first : otim 26236
book hit = (NULL)
53328 >first : f8e7
53406 <second: Hint: f1d1
53406 <first :
53422 <first : your move is Bf8-e7
53422 <first : 0 0 0 0Bc1-g5 , book2
53422 <first : my move is Bc1-g5
53422 <first : 10. ... c1g5
machine move 18, castling = 7 0 45 7 0 4
7 0 45 7 0 4 Legality test? c1g5
7 0 45 7 0 4 Legality test? c1g5
(7,0) (0,0) (45,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=2 (2,0)-(6,4) -
MateTest: K=1, my=13, his=13
move: c1g5
, parse: Bg5 (
)
MateTest: K=1, my=13, his=13
repeat test fmm=19 bmm=0 ep=-4, reps=6
19 ep=-4
18 ep=-4
17 ep=-2
16 ep=-2
15 ep=-2
14 ep=-2
13 ep=-4
12 ep=-4
11 ep=-4
10 ep=-3
9 ep=-4
8 ep=-4
7 ep=-2
6 ep=-3
5 ep=-3
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
53422 >second: time 26236
53422 >second: otim 29906
book hit = (NULL)
53422 >second: usermove 53422 >second: c1g5
53531 <first : No move to ponder from PV.
53531 <first : Looking for a move to ponder.
53531 <first : Trying search.
53531 <first : Done.
53531 <first : Hint: Ke8-f8
53531 <second: 9 -42 5 34640 d7e6 f2f3 e8g8 c1e3 c7c6 d4b4 b7b6 a2a3 d6d5
53531 <second: dbg: otim ok
53531 <second: info string Break set from 'stop'
53563 <second: 9 -42 14 87516 h7h6 g5f4 e8g8 f2f3 b7b6 a1d1 d7c6 e4e5 d6e5 d4e5
53766 <second: 10 -44 34 225581 h7h6 g5f4 e8g8 f2f3 a7a6 a2a3 d7e6 b2b3 f6h5 f4e3
54031 <first : 5 115 68 60869 Ra1-e1 Qd7-g4
54094 <first : 6 89 75 82523 Ra1-e1 Qd7-g4 Bg5-d2 Pc7-c6
54125 <first : 6 94 79 97279 Pf2-f3 !
54203 <first : 6 97 87 128265 Pf2-f3 Kf8-g8 Ra1-d1 Ph7-h6 Bg5-f4 Kg8-h7
54578 <first : 6 97 125 286267 Pf2-f3 Kf8-g8 Ra1-d1 Ph7-h6 Bg5-f4 Kg8-h7
54797 <first : 7 107 147 387505 Pf2-f3 Nf6-e8 Bg5-f4 Pc7-c6 Ra1-d1 Kf8-g8 Qd4-c4
54875 <second: 11 -41 145 955074 h7h6 g5f4 e8g8 d4c4 a7a6 a2a4 f6h5 f4e3 e7f6 f2f3 f8e8
55000 <first : 7 110 167 473021 Ra1-e1 Qd7-g4 Bg5-d2 Pc7-c6 Qd4-b4 Ra8-b8 Pf2-f3
55219 <first : 7 114 189 567594 Ra1-d1 Nf6-e8 Bg5xe7
56047 <first : 7 114 270 952225 Ra1-d1 Nf6-e8 Bg5xe7
56125 <second: 12 -41 270 1809961 h7h6 g5f4 e8g8 d4c4 a8b8 a2a4 d7c6 c4b5 c6b5 a4b5 b8a8
56750 <first : 8 120 342 1250824 Ra1-d1 Nf6-e8 Bg5xe7 Qd7xe7 Pf2-f4 Kf8-g8 Pf4-f5 Pc7-c6
57469 <first : 8 120 414 1610415 Ra1-d1 Nf6-e8 Bg5xe7 Qd7xe7 Pf2-f4 Kf8-g8 Pf4-f5 Pc7-c6
59094 <second: 13 -37 567 3800992 h7h6 g5f4 e8g8 f2f3 d7c6 d4d3 a7a5 f4e3 a5a4 d3b5 c6b5 c3b5 c7c6
59735 <first : 9 115 640 2634037 Ra1-d1 Nf6-e8 Bg5-f4 Pc7-c6 Rf1-e1 Kf8-g8 Pe4-e5
63250 <first : 9 118 990 4181587 Ra1-e1 Qd7-g4 Bg5-e3 Pc7-c6 Qd4-a4 Pa7-a6 Qa4-b4 Ra8-b8 Pf2-f3
63469 <second: info string Q2 break
63469 <second: 14 -37 1005 6888858 h7h6 g5f4 e8g8 f2f3 d7c6 d4d3 a7a5 f4e3 a5a4 d3b5 c6b5 c3b5 c7c6
63469 <second: move h7h6
machine move 19, castling = 7 0 45 7 0 4
7 0 45 7 0 4 Legality test? h7h6
7 0 45 7 0 4 Legality test? h7h6
(7,0) (0,0) (45,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=22 (7,6)-(7,5) -
7 0 45 7 0 4 Legality test? h7h6
movetype=21, promochar=0=-
MateTest: K=1, my=13, his=13
move: h7h6
, parse: h6 (
)
MateTest: K=1, my=13, his=13
repeat test fmm=20 bmm=0 ep=-4, reps=6
20 ep=-3
19 ep=-4
18 ep=-4
17 ep=-2
16 ep=-2
15 ep=-2
14 ep=-2
13 ep=-4
12 ep=-4
11 ep=-4
10 ep=-3
9 ep=-4
8 ep=-4
7 ep=-2
6 ep=-3
5 ep=-3
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
Interrupting first
63469 >first : time 29906
63469 >first : otim 25231
book hit = (NULL)
63469 >first : h7h6
63547 <second: Hint: g5f4
63563 <second: 9 -37 5 37220 e8g8 f2f3 d7c6 d4d3 a7a5 f4e3 a5a4 d3b5 c6b5 c3b5
63563 <second: 10 -37 5 37628 e8g8 f2f3 d7c6 d4d3 a7a5 f4e3 a5a4 d3b5 c6b5 c3b5
63563 <second: 11 -37 5 38076 e8g8 f2f3 d7c6 d4d3 a7a5 f4e3 a5a4 d3b5 c6b5 c3b5 c7c6
63906 <second: 12 -37 44 286168 e8g8 f2f3 d7c6 d4d3 a7a5 f4e3 a5a4 d3b5 c6b5 c3b5 c7c6 b5c3
69719 <first : 9 118 1639 7140822 Ra1-e1 Qd7-g4 Bg5-e3 Pc7-c6 Qd4-a4 Pa7-a6 Qa4-b4 Ra8-b8 Pf2-f3
72235 <second: 13 -46 875 5754501 e8g8 a1d1 d7c6 d1d3 f8e8 f1d1 f6d7 d4d5 c6b6 c3a4 b6a6 d5d4 e7f6
76969 <first : 10 106 2364 10255335 Ra1-e1 Qd7-g4 Bg5-e3 Pc7-c6 Pf2-f3 Qg4-h4 Qd4-a4 Pa7-a6 Be3-b6 Nf6-d7
81266 <first : 10 111 2793 12095184 Ra1-d1 !
84188 <second: 14 -40 2070 13582791 e8g8 a1d1 d7c6 f2f3 f6h5 c3d5 e7f6 d4f6 c6d5 d1d5 h5f6 d5b5 g7g5 f4e3
88735 <first : 10 119 3540 15025211 Ra1-d1 Nf6-e8 Bg5xe7 Qd7xe7 Rf1-e1 Pc7-c6 Rd1-d3 Kf8-g8
97453 <first : 10 119 4412 18172860 Ra1-d1 Nf6-e8 Bg5xe7 Qd7xe7 Rf1-e1 Pc7-c6 Rd1-d3 Kf8-g8
103594 <second: 15 -40 4013 26408359 e8g8 a1d1 d7c6 f2f3 f8e8 f4e3 a7a5 d4d3 a8a6 c3b5 e8a8 b5d4 c6d7 d4f5 d7e6
109281 <first : 11 115 5595 23462247 Ra1-d1 Nf6-e8 Bg5xe7 Qd7xe7 Rf1-e1 Pc7-c6 Pe4-e5 Pd6-d5 Re1-e3 Kf8-g8
139813 <first : 11 116 8648 36171120 Ra1-e1 Qd7-g4 Bg5-e3 Pc7-c6 Pf2-f3 Qg4-d7 Be3-g5
159266 <second: 16 -38 9580 64981630 e8g8 a1d1 d7c6 d1d3 f8e8 f1d1 f6d7 c3d5 e7f6 d5f6 d7f6 e4e5 f6e4 f2f3 d6e5 f4e5 e4c5
208000 <first : 11 116 15467 67781524 Ra1-e1 Qd7-g4 Bg5-e3 Pc7-c6 Pf2-f3 Qg4-d7 Be3-g5
208000 <first :
208000 <first : your move is Ph7-h6
208000 <first : 0 0 0 0Bg5-h4 , book2
208000 <first : my move is Bg5-h4
208000 <first : 11. ... g5h4
machine move 20, castling = 7 0 45 7 0 4
7 0 45 7 0 4 Legality test? g5h4
7 0 45 7 0 4 Legality test? g5h4
(7,0) (0,0) (45,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=2 (6,4)-(7,3) -
MateTest: K=1, my=13, his=13
move: g5h4
, parse: Bh4 (
)
MateTest: K=1, my=13, his=13
repeat test fmm=21 bmm=0 ep=-4, reps=6
21 ep=-4
20 ep=-3
19 ep=-4
18 ep=-4
17 ep=-2
16 ep=-2
15 ep=-2
14 ep=-2
13 ep=-4
12 ep=-4
11 ep=-4
10 ep=-3
9 ep=-4
8 ep=-4
7 ep=-2
6 ep=-3
5 ep=-3
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
208000 >second: time 25231
208000 >second: otim 15453
book hit = (NULL)
208000 >second: usermove 208000 >second: g5h4
208078 <first : No move to ponder from PV.
208078 <first : Looking for a move to ponder.
208078 <first : Trying search.
208078 <first : Done.
208078 <first : Hint: Qd7-g4
208078 <second: dbg: otim ok
208078 <second: info string Break set from 'stop'
208625 <first : 7 39 61 279052 Bh4xf6 Be7xf6 Qd4-b4 Bf6xc3 Qb4xb7 O-O Pb2xc3 Ra8-b8 Qb7xc7 Qg4xe4
208641 <second: 9 -31 59 361198 d7g4 d4a4 c7c6 h4g3 e8g8 a4b4 f8b8 f2f3 a7a5 b4d4
208656 <first : 7 44 65 296196 Bh4-g3 !
208891 <first : 7 70 88 391459 Bh4-g3 O-O Ra1-e1 Qg4-d7 Nc3-d5 Nf6xd5 Pe4xd5 Be7-f6 Qd4-b4
209156 <second: 10 -61 111 636858 d7g4 h4f6 e7f6 d4b4 b7b6 c3d5 e8c8 d5f6 g7f6 a1d1
209766 <first : 7 70 175 780464 Bh4-g3 O-O Ra1-e1 Qg4-d7 Nc3-d5 Nf6xd5 Pe4xd5 Be7-f6 Qd4-b4
210047 <second: 10 -46 198 1232863 c7c5 d4d3 e8c8 f2f3 c8b8 a2a3 b8a8 h4f2 d6d5 e4e5
210422 <first : 8 53 240 1081165 Bh4-g3 O-O Ra1-d1 Rf8-d8 Pf2-f3 Qg4-g5 Pf3-f4 Qg5-g4
210860 <first : 8 58 283 1281242 Bh4xf6 !
211500 <second: 11 -41 344 2194507 c7c5 d4d3 e8c8 a1b1 g7g5 h4g3 c8b8 f2f3 d7e6 b2b4
211703 <first : 8 103 368 1705781 Bh4xf6 Be7xf6 Qd4-b4 Bf6xc3 Qb4xb7 O-O Pb2xc3 Rf8-e8 Pf2-f3
212485 <first : 8 103 446 2055429 Bh4xf6 Be7xf6 Qd4-b4 Bf6xc3 Qb4xb7 O-O Pb2xc3 Rf8-e8 Pf2-f3
213156 <second: 12 -44 511 3337457 c7c5 d4d3 e8c8 a1b1 g7g5 h4g3 c8b8 f2f3 d7e6 b2b4 c5b4 b1b4
215641 <first : 9 82 763 3402701 Bh4xf6 Be7xf6 Qd4-b4 Qg4-c8 Nc3-d5 Bf6-d8 Rf1-e1 O-O
217406 <second: 13 -46 936 6273206 c7c5 d4d3 e8c8 a1d1 d7g4 h4g3 g4e6 d3e3 f6g4 e3f3 g4e5 g3e5 d6e5
220922 <second: info string Q2 break
220922 <second: 14 -46 1288 8772778 c7c5 d4d3 e8c8 a1d1 d7g4 h4g3 g4e6 d3e3 f6g4 e3f3 g4e5 g3e5 d6e5
220922 <second: move c7c5
machine move 21, castling = 7 0 45 7 0 4
7 0 45 7 0 4 Legality test? c7c5
7 0 45 7 0 4 Legality test? c7c5
(7,0) (0,0) (45,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=22 (2,6)-(2,4) -
7 0 45 7 0 4 Legality test? c7c5
movetype=21, promochar=0=-
MateTest: K=1, my=13, his=13
move: c7c5
, parse: c5 (
)
MateTest: K=1, my=13, his=13
repeat test fmm=22 bmm=0 ep=-4, reps=6
22 ep=-3
21 ep=-4
20 ep=-3
19 ep=-4
18 ep=-4
17 ep=-2
16 ep=-2
15 ep=-2
14 ep=-2
13 ep=-4
12 ep=-4
11 ep=-4
10 ep=-3
9 ep=-4
8 ep=-4
7 ep=-2
6 ep=-3
5 ep=-3
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
Interrupting first
220938 >first : time 15453
220938 >first : otim 23939
book hit = (NULL)
220938 >first : c7c5
221016 <second: Hint: d4d3
221016 <second: 9 -45 9 65238 e8c8 a1d1 d7g4 h4g3 g4e6 f1e1 c8b8 e4e5 d6e5 g3e5 b8a8
221063 <second: 10 -45 13 87229 e8c8 a1d1 d7g4 h4g3 g4e6 f1e1 c8b8 e4e5 d6e5 g3e5 b8a8
221078 <first : 9 82 1307 5895808 Bh4xf6 Be7xf6 Qd4-b4 Qg4-c8 Nc3-d5 Bf6-d8 Rf1-e1 O-O
221656 <second: 11 -58 73 492865 e8c8 a1d1 g7g5 h4g3 d7e6 f1e1 c8b8 e4e5 d6e5 g3e5 b8a8 e5f6 e6f6
224422 <second: 12 -59 350 2407135 e8c8 a1d1 g7g5 h4g3 d7e6 f1e1 d8d7 e1e3 c8b8 d1e1 f6g4 e3e2
230422 <first : 10 104 2241 10225933 Bh4xf6 Be7xf6 Qd4-b4 Bf6xc3 Qb4xb7 O-O Pb2xc3 Rf8-b8 Qb7xc7 Qg4xe4 Qc7xd6 Qe4xc2
235422 <second: 13 -45 1448 10112470 e8c8 a1d1 d7e6 f2f4 c8b8 f4f5 e6c8 d3c4 h8f8 d1d3 g7g5 h4g3 c8c6
240985 <first : 10 104 3297 15044692 Bh4xf6 Be7xf6 Qd4-b4 Bf6xc3 Qb4xb7 O-O Pb2xc3 Rf8-b8 Qb7xc7 Qg4xe4 Qc7xd6 Qe4xc2
246469 <second: 14 -52 2553 18027732 e8c8 a1d1 h8e8 f1e1 d7e6 c3d5 c8b8 h4f6 e7f6 d3b5 a7a6 b5b3 d8d7
264594 <first : 11 89 5658 25934929 Bh4xf6 Be7xf6 Qd4-b4 Bf6xc3 Qb4xb7 O-O Pb2xc3 Rf8-b8 Qb7xc7 Qg4xe4 Qc7xd6 Rb8-b6
265719 <second: 15 -54 4480 31976820 e8c8 a1d1 h8e8 h4g3 d7e6 f2f4 e6g4 d3c4 e8f8 f1f3 c8b8 f3d3 g4e6 c4e6 f7e6
309985 <second: 16 -57 8906 64674496 e8c8 a1d1 h8e8 h4g3 f6h5 c3d5 e7f6 d3f3 h5g3 d5f6 g7f6 f2g3 d7e6 f3f6 e6e4 d1d6 e4c2 f6f7 d8d6 f7e8 c8c7
316922 <first : 11 89 10891 51005494 Bh4xf6 Be7xf6 Qd4-b4 Bf6xc3 Qb4xb7 O-O Pb2xc3 Rf8-b8 Qb7xc7 Qg4xe4 Qc7xd6 Rb8-b6
316922 <first :
316922 <first : your move is Pc7-c5
316938 <first : 0 0 0 0Qd4-d3 , book2
316938 <first : my move is Qd4-d3
316938 <first : 12. ... d4d3
machine move 22, castling = 7 0 45 7 0 4
7 0 45 7 0 4 Legality test? d4d3
7 0 45 7 0 4 Legality test? d4d3
(7,0) (0,0) (45,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=4 (3,3)-(3,2) -
MateTest: K=1, my=13, his=13
move: d4d3
, parse: Qd3 (
)
MateTest: K=1, my=13, his=13
repeat test fmm=23 bmm=0 ep=-4, reps=6
23 ep=-4
22 ep=-3
21 ep=-4
20 ep=-3
19 ep=-4
18 ep=-4
17 ep=-2
16 ep=-2
15 ep=-2
14 ep=-2
13 ep=-4
12 ep=-4
11 ep=-4
10 ep=-3
9 ep=-4
8 ep=-4
7 ep=-2
6 ep=-3
5 ep=-3
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
316938 >second: time 23939
316938 >second: otim 5851
book hit = (NULL)
316938 >second: usermove 316938 >second: d4d3
317031 <first : No move to ponder from PV.
317031 <first : Looking for a move to ponder.
317031 <first : Trying search.
317031 <first : Done.
317031 <first : Hint: O-O
317031 <second: dbg: otim ok
317031 <second: info string Q4 break
317031 <second: 16 -54 9609 69873275 e8c8 a1d1 h8e8 h4g3 f6h5 c3d5 e7f6 d3f3 h5g3 d5f6 g7f6 f2g3 d7e6 f3f6 e6e4 d1d6 e4c2 f6f7 d8d6 f7e8 c8c7
317031 <second: move e8c8
machine move 23, castling = 7 0 45 7 0 4
7 0 45 7 0 4 Legality test? e8c8
7 0 45 7 0 4 Legality test? e8c8
(7,0) (0,0) (45,0) (7,7) (0,7) (4,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=43 (4,7)-(2,7) -
7 0 45 7 0 4 Legality test? e8c8
MateTest: K=1, my=13, his=13
move: e8c8
, parse: O-O-O (
)
MateTest: K=1, my=13, his=13
repeat test fmm=24 bmm=0 ep=-4, reps=6
24 ep=-4
23 ep=-4
22 ep=-3
21 ep=-4
20 ep=-3
19 ep=-4
18 ep=-4
17 ep=-2
16 ep=-2
15 ep=-2
14 ep=-2
13 ep=-4
12 ep=-4
11 ep=-4
10 ep=-3
9 ep=-4
8 ep=-4
7 ep=-2
6 ep=-3
5 ep=-3
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
Interrupting first
317031 >first : time 5851
317031 >first : otim 23929
book hit = (NULL)
317031 >first : e8c8
317547 <second: Hint: a1d1
317547 <second: 9 -50 16 99741 d7e6 c3d5 d8d7 d3a3 c8b8 h4f6 e7f6 f1e1
317547 <second: 10 -55 19 126355 d7e6 f2f4 c8b8 f4f5 e6c8 d3c4 h8f8 d1d3 g7g5 h4g3
317547 <second: 11 -45 42 297943 d7e6 f2f4 c8b8 f4f5 e6c8 d3c4 h8f8 d1d3 g7g5 h4g3 c8c6
317547 <second: 12 -62 52 365972 d7e6 f2f4 c8b8 f4f5 e6c8 d3c4 h8f8 d1d3 g7g5 f5g6 f7g6 d3f3
317547 <first : 7 89 52 245512 Ra1-d1 Qd7-g4 Bh4-g3 Ra8-d8 Pf2-f3 Qg4-h5 Rf1-e1
317906 <second: 12 -55 89 616744 d7g4 h4g3 d8d7 c3b5 a7a6 b5d6 e7d6 g3d6 g4e4 d3c3 b7b6 f1e1
318219 <first : 7 89 125 566883 Ra1-d1 Qd7-g4 Bh4-g3 Ra8-d8 Pf2-f3 Qg4-h5 Rf1-e1
319656 <first : 8 86 271 1237362 Ra1-d1 Rf8-d8 Qd3-e2 Rd8-e8
320610 <second: 13 -66 359 2544241 d7g4 h4g3 d8d7 h2h3 g4g6 d3c4 h8d8 d1d3 a7a6 f1d1 b7b5 c4b3 f6e4 c3e4 g6e4 b3f7
320719 <first : 8 86 375 1739245 Ra1-d1 Rf8-d8 Qd3-e2 Rd8-e8
321297 <second: 13 -57 427 3032465 d7e6 f2f4 c8b8 f4f5 e6c8 d3c4 h8f8 d1d3 g7g5 f5g6 f7g6 d3f3 g6g5
323672 <second: 14 -64 666 4778239 d7e6 f2f4 c8b8 f4f5 e6c8 d3c4 h8f8 d1d3 g7g5 f5g6 f7g6 d3f3 g6g5 h4g3
324969 <first : 9 93 802 3641134 Ra1-d1 Qd7-g4 Bh4-g3 Ra8-d8 Pf2-f3 Qg4-d7 Rf1-e1
327141 <second: 14 -57 1013 7279441 d7g4 h4g3 d8d7 c3b5 a7a6 b5d6 e7d6 g3d6 g4e4 d3c3 b7b6 f1e1 e4c6 c3d3 c8b7
333391 <first : 9 93 1642 7426890 Ra1-d1 Qd7-g4 Bh4-g3 Ra8-d8 Pf2-f3 Qg4-d7 Rf1-e1
348031 <second: 15 -65 3102 22538562 d7g4 h4g3 a7a6 f1e1 g4g6 d3c4 h8e8 g3f4 g6g4 e4e5 d6e5 d1d8 e8d8 e1e5 e7d6 h2h3
356578 <first : 10 101 3963 18509887 Ra1-d1 Rf8-d8 Rf1-e1 Nf6-g4 Qd3-g3
360125 <second: 15 -57 4311 31351678 d7e6 f2f4 c8b8 f4f5 e6c8 d3c4 h8f8 d1d3 g7g5 h4g3 c8c6 d3f3 d8d7 a2a3 e7d8
365063 <first : 10 101 4811 22813150 Ra1-d1 Rf8-d8 Rf1-e1 Nf6-g4 Qd3-g3
365063 <first :
365063 <first : your move is O-O-O
365750 <first : 7 120 69 248444 Ra1-d1 Kc8-b8 Bh4-g3 Qd7-e6 Rf1-e1
366328 <first : 7 120 127 499351 Ra1-d1 Kc8-b8 Bh4-g3 Qd7-e6 Rf1-e1
366328 <first : tellics whisper depth=7; eval=+1.20; nodes=499351; nps=393189
366328 <first : my move is Ra1-d1
366328 <first : 13. ... a1d1
machine move 24, castling = 7 0 45 7 0 45
7 0 45 7 0 45 Legality test? a1d1
7 0 45 7 0 45 Legality test? a1d1
(7,0) (0,0) (45,0) (7,7) (0,7) (45,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=3 (0,0)-(3,0) -
MateTest: K=1, my=13, his=13
move: a1d1
, parse: Rad1 (
)
MateTest: K=1, my=13, his=13
repeat test fmm=25 bmm=0 ep=-4, reps=6
25 ep=-4
24 ep=-4
23 ep=-4
22 ep=-3
21 ep=-4
20 ep=-3
19 ep=-4
18 ep=-4
17 ep=-2
16 ep=-2
15 ep=-2
14 ep=-2
13 ep=-4
12 ep=-4
11 ep=-4
10 ep=-3
9 ep=-4
8 ep=-4
7 ep=-2
6 ep=-3
5 ep=-3
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
366328 >second: time 23929
366328 >second: otim 921
book hit = (NULL)
366344 >second: usermove 366344 >second: a1d1
366438 <first : Hint: Kc8-b8
366438 <second: dbg: otim ok
366438 <second: info string Q4 break
366438 <second: 15 -57 4936 35958088 d7e6 f2f4 c8b8 f4f5 e6c8 d3c4 h8f8 d1d3 g7g5 h4g3 c8c6 d3f3 d8d7 a2a3 e7d8
366438 <second: move d7e6
machine move 25, castling = 7 45 45 7 0 45
7 45 45 7 0 45 Legality test? d7e6
7 45 45 7 0 45 Legality test? d7e6
(7,0) (45,0) (45,0) (7,7) (0,7) (45,7) castling rights
TC string = ':300'
mps=0 tc=300000 inc=0
CoordsToAlgebraic, piece=26 (3,6)-(4,5) -
MateTest: K=1, my=13, his=13
move: d7e6
, parse: Qe6 (
)
MateTest: K=1, my=13, his=13
repeat test fmm=26 bmm=0 ep=-4, reps=6
26 ep=-4
25 ep=-4
24 ep=-4
23 ep=-4
22 ep=-3
21 ep=-4
20 ep=-3
19 ep=-4
18 ep=-4
17 ep=-2
16 ep=-2
15 ep=-2
14 ep=-2
13 ep=-4
12 ep=-4
11 ep=-4
10 ep=-3
9 ep=-4
8 ep=-4
7 ep=-2
6 ep=-3
5 ep=-3
4 ep=-4
3 ep=-4
2 ep=-3
1 ep=-3
0 ep=-4
time odds: 1.000000 1.000000
Interrupting first
366438 >first : time 921
366438 >first : otim 23918
book hit = (NULL)
366438 >first : d7e6
366516 <second: Hint: f2f4
366516 <second: 9 -45 8 50641 c8b8 f4f5 e6c8 d3c4 h8f8 d1d3 g7g5 h4g3 c8c6
366516 <second: 10 -62 9 56037 c8b8 f4f5 e6c8 d3c4 h8f8 d1d3 g7g5 h4g3 c8c6 f1d1
366735 <second: 10 -61 36 242368 h8e8 f4f5 e6d7 h4g3 d7c7 d3c4 c7b6 d1b1 e8f8 g3f4
367063 <first : 7 126 71 315189 Bh4-g3 Ph6-h5 Nc3-b5
367125 <second: 11 -60 75 521082 h8e8 f4f5 e6d7 h4g3 e7f8 f1e1 d7c6 c3b5 c6b6 c2c4 a7a6
367125 <second: 11 -57 75 521472 c8b8 f4f5 e6c8 d3c4 h8f8 d1d3 g7g5 h4g3 c8c6 d3f3 d8d7
367141 <second: 12 -58 77 528694 c8b8 f4f5 e6c8 d3c4 h8f8 d1d3 g7g5 h4g3 c8c6 d3f3 g5g4 f3d3
367547 <first : 7 126 121 537991 Bh4-g3 Ph6-h5 Nc3-b5
367938 <second: 13 -57 156 1082941 c8b8 f4f5 e6c8 d3c4 h8f8 d1d3 g7g5 h4g3 c8c6 d3f3 d8d7 a2a3 e7d8
368094 <first : 8 95 175 769384 Bh4-g3 Ph6-h5 Nc3-b5 Nf6-e8 Qd3-c4 Pa7-a6 Nb5-c3 Qd7-e6
370047 <second: 14 -64 366 2607077 c8b8 f4f5 e6c8 d3c4 h8f8 d1d3 g7g6 d3f3 g6g5 h4g3 c8c6 a2a3 g5g4 f3f2
370188 <first : 8 100 385 1691703 Rf1-e1 !
371094 <first : 8 121 475 2105727 Rf1-e1 Qd7-g4 Bh4-g3
371610 <first : 8 121 527 2339977 Rf1-e1 Qd7-g4 Bh4-g3
GameEnds(26, Black wins on time, 4)
Interrupting first
375703 >first : result 0-1 {Black wins on time}
375703 >second: result 0-1 {Black wins on time}
375703 >first : quit
375703 >second: quit
GameEnds(26, Black wins on time, 2)
jdart
Posts: 4368
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: polling

Post by jdart »

I think you meant to reply to Jim.

Among other things it looks like the engine is rejecting the "accepted" and "computer" output from Winboard. So it has not completely implemented Winboard protocol v. 2.

--Jon
Elorejano
Posts: 101
Joined: Sat Mar 20, 2010 3:31 am

Re: polling

Post by Elorejano »

Yes, it seems this..i hope that this thread can help to make definitively a bugfixed source.
Phalanx merit this..
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Phalanx source code

Post by lucasart »

stevenaaus wrote:

Code: Select all

if&#40;Flag.polling&#41;
&#123;
  static fd_set readfds;
  static struct timeval tv;
  int data;

  FD_ZERO (&readfds&#41;;
  FD_SET &#40;fileno&#40;stdin&#41;, &readfds&#41;;
  tv.tv_sec=0;
  tv.tv_usec=0;
  select&#40;16, &readfds, 0, 0, &tv&#41;;
  data=FD_ISSET&#40;fileno&#40;stdin&#41;, &readfds&#41;;
  if&#40;data&#41; interrupt&#40;0&#41;;
&#125;
The FD_SET (etc) procs don't exist for Win32 except through cygwin, (which i don't have installed).
This code directly uses Linux kernel functions. Actually it's more general and should be POSIX compliant. But there's no reason why it should work on Windows!

You need to use the Windows API for the Windows case. Unfortunately there's no portable way to code this, as testing the availability of input in stdin without reading the characters is not a standard thing to do and is not specified by the ISO C/C++ standard as far as I know.

Here's what I have, although I've never tested it as I don't use windows (according to function specs on microsoft.com it should work)

Code: Select all

bool input_available&#40;)
&#123;
#ifdef POSIX

	fd_set readfds;
	FD_ZERO&#40;&readfds&#41;;
	FD_SET&#40;STDIN_FILENO, &readfds&#41;;
	
	struct timeval timeout;	
	timeout.tv_sec = timeout.tv_usec = 0;
	
	select&#40;STDIN_FILENO+1, &readfds, 0, 0, &timeout&#41;;
	return FD_ISSET&#40;STDIN_FILENO, &readfds&#41;;

#else	// assume windows

	static bool init = false, is_pipe;
	static HANDLE stdin_h;
	DWORD val;
	
	if (!init&#41; &#123;
		init = true;
		stdin_h = GetStdHandle&#40;STD_INPUT_HANDLE&#41;;
		is_pipe = !GetConsoleMode&#40;stdin_h, &val&#41;;
	&#125;

	if &#40;stdin->_cnt > 0&#41;
		return true;
	
	if &#40;is_pipe&#41;
		return !PeekNamedPipe&#40;stdin_h, NULL, 0, NULL, &val, NULL&#41; ? true &#58; val>0;
	else
		return _kbhit&#40;);
	
#endif
&#125;
stevenaaus
Posts: 608
Joined: Wed Oct 13, 2010 9:44 am
Location: Australia

Re: Phalanx source code

Post by stevenaaus »

michiguel wrote:
Elorejano wrote:Thanks Jim!
But seems that Phalanx have time management bug. When is outoff book, its think too much, made a move, another "eternity" and loses on time.
Im using winboard and Arena
I dont know if is related to polling issues but in my computer (AMD, 2 cores, windowaXP).
Tell me if a winboard or Arena debug are needed
I do not remember the problem I saw, but It was fine with me after I fixed something. If you are compiling it yourself (as I see you asked for the source code) replace the text in levels.c with the one I posted in the previous message.

Saludos,
Miguel
EDIT

Yes, I just confirmed with a "diff" comparing it with the file that JA provided. What I changed was the following section (the actual change was /*0*/ removing a zero.

Code: Select all

															/* MAB&#58; commented out a zero in the next lines */

		if&#40; Flag.ponder ) T2 += T2/8;

		if&#40; Flag.increment==0 && Flag.level==timecontrol )
		&#123;
			if&#40; Time<150/*0*/ ) T2 -= T2/2;
			else if&#40; Time<600/*0*/ ) T2 -= T2/4;
		&#125;

		if&#40; Flag.post && Flag.xboard<2 )
		printf&#40; "    -> soft time limit %g s\n",
			(&#40;float&#41;T2&#41; / &#40;float&#41;100 );

		/*** Now, set up the hard limit ***/
		     if&#40; Time < 150/*0*/) Flag.centiseconds = Time/&#40;moves+1&#41;*3;
		else if&#40; Time < 300/*0*/) Flag.centiseconds = Time/&#40;moves+1&#41;*6;
		else if&#40; Time < 600/*0*/) Flag.centiseconds = Time/&#40;moves+1&#41;*12;
		else                  Flag.centiseconds = Time/&#40;moves+1&#41;*18;
Thanks Miguel.

I tried your change (on linux) and phalanx loses a 1 minute + 0 second game, using hardly any time.
{White Time 59259, Black Time 25304}
0-1

It's per-move time code is not as bad (though it *does*over-run fairly often), so i guess this needs some proper work still.