void CUci::Debug() { // on off char *token ; token = GetNextToken(); if(strcmp(token,"on")==0) { Print("info string debug mode on\n"); } else if(strcmp(token,"off")==0) { Print("info string debug mode off\n"); } #ifdef DEVELOPMENT else if(strcmp(token,"test")==0) { Print("info string debug test on\n"); CTest t; t.Test(); Print("info string debug test off\n"); } else if(strcmp(token,"kiwipete")==0) { Partida.LoadEPD("r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1 "); Print("info string kiwipete position loaded\n"); } else if(strcmp(token,"estudia")==0) { CTest t; char * path = GetNextToken(); t.Estudia(path); } else if(strcmp(token,"perftepd")==0) { PerftEpd t; char * path = GetNextToken(); t.epdfile = path; t.Start(); } else if(strcmp(token,"testepd")==0) { int depth_time; char * path = GetNextToken(); if(path) { depth_time = atoi(path); path = GetNextToken(); if(path) { char local[200]; strcpy(local,path); CTest t; t.TestEpd(depth_time,local); } else { Print("info string Sintax: debug testepd depth(0-50) file.pgn\n"); Print("info string Sintax: debug testepd time(miliseg) file.pgn\n"); } } else { Print("info string Sintax: debug testepd depth(0-50) file.pgn\n"); Print("info string Sintax: debug testepd time(miliseg) file.pgn\n"); } } else if(strcmp(token,"t")==0) { char local[200]; strcpy(local,"twic663.epd"); CTest t; t.TestEpd(4,local); } else if(strcmp(token,"perft")==0) { int d = 0; token = GetNextToken(); if(token) { d = atoi(token); CTest t; t.DoPerft(d); } else { Print("info string Sintax: debug perft depth\n"); } } else if(strcmp(token,"display")==0) { Partida.T.DibujaP(); Print("%s\n",Partida.T.SaveFEN()); } else if(strcmp(token,"score")==0) { CSort Sort; Sort.Init(Partida.T,3); Print("%s;%d\n",Partida.T.SaveFEN(),Partida.T.Evalua(-99999,99999)); printf("pst:\t\t%d\t%d \n", OppValue(Partida.T.PstDValue),EndValue(Partida.T.PstDValue)); printf("Material:\t%d\t%d\n",Partida.T.Material[0],Partida.T.Material[1] ); printf("Peones:\t\t%d\t%d\n",Partida.T.ValorPeones[0],Partida.T.ValorPeones[1] ); printf("Caballos:\t%d\t%d\n",Partida.T.EvalCaballos[0],Partida.T.EvalCaballos[1] ); printf("Alfiles:\t%d\t%d\n",Partida.T.EvalAlfiles[0],Partida.T.EvalAlfiles[1] ); printf("Torres:\t\t%d\t%d\n",Partida.T.EvalTorres[0],Partida.T.EvalTorres[1] ); printf("Damas:\t\t%d\t%d\n",Partida.T.EvalDamas[0],Partida.T.EvalDamas[1] ); printf("Cob Peones:\t%d\t%d\n",Partida.T.PawnCover[0],Partida.T.PawnCover[1] ); printf("Total:\t\t%d\t%d\n",Partida.T.Opening,Partida.T.EndGame); } else if(strcmp(token,"split")==0) { token = GetNextToken(); if(token) { CTest t; t.Split(token); } } else if(strcmp(token,"suite")==0) { CTest t; t.TestSuite(); } else if(strcmp(token,"sts")==0) { CTest t; t.STS(100); } else if(strcmp(token,"sts1")==0) { CTest t; t.STS(1000); } else if(strcmp(token,"sts10")==0) { CTest t; t.STS10(); } else if(strcmp(token,"simetria")==0) { token = GetNextToken(); if(token) { CTest t; t.TestSimetria(token); } } else if(strcmp(token,"eval")==0) { extern void epdeval(); epdeval(); } else if(strcmp(token,"pgn2epd")==0) { token = GetNextToken(); Pgn2Epd t; t.Parsea(token); } else if(strcmp(token,"train")==0) { token = GetNextToken(); TrainEpd t; t.Start(); } else if(strcmp(token,"stat")==0) { token = GetNextToken(); TrainEpd t; t.Statistics(); } else if(strcmp(token,"pgn2cmd")==0) { token = GetNextToken(); Pgn2Cmd t; t.Parsea(token); } else // Branch Factor if(strcmp(token,"bf")==0) { Partida.DumpBranchFactor(); } #endif }