Exemplo n.º 1
0
void countNodes()
{
    puts("Evals a series of positions and count the number of nodes.");
    puts("The idea is to make a check when changes in the search are made (vg move ordering)");

    int depth = 6;
    int allNodes = 0;

    setBoard("1kr5/3n4/q3p2p/p2n2p1/PppB1P2/5BP1/1P2Q2P/3R2K1 w - -");
    ComputerThink(depth);
    allNodes += nodes;
    setBoard("1n5k/3q3p/pp1p2pB/5r2/1PP1Qp2/P6P/6P1/2R3K1 w - -");
    ComputerThink(depth);
    allNodes += nodes;
    setBoard("1n6/4bk1r/1p2rp2/pP2pN1p/K1P1N2P/8/P5R1/3R4 w - -");
    ComputerThink(depth);
    allNodes += nodes;
    setBoard("1nr5/1k5r/p3pqp1/3p4/1P1P1PP1/R4N2/3Q1PK1/R7 w - -");
    ComputerThink(depth);
    allNodes += nodes;
    setBoard("1q4k1/5p1p/p1rprnp1/3R4/N1P1P3/1P6/P5PP/3Q1R1K w - -");
    ComputerThink(depth);
    allNodes += nodes;
    setBoard("1qr1k2r/1p2bp2/pBn1p3/P2pPbpp/5P2/2P1QBPP/1P1N3R/R4K2 b k -");
    ComputerThink(depth);
    allNodes += nodes;
    setBoard("1r1b2k1/2r2ppp/p1qp4/3R1NPP/1pn1PQB1/8/PPP3R1/1K6 w - -");
    ComputerThink(depth);
    allNodes += nodes;
    setBoard("1r1r2k1/p3n2p/b1nqpbp1/2pp4/1p3PP1/2PP1N2/PPN3BP/R1BRQ2K w - -");
    ComputerThink(depth);
    allNodes += nodes;
    setBoard("1r2n1rk/pP2q2p/P2p4/4pQ2/2P2p2/5B1P/3R1P1K/3R4 w - -");
    ComputerThink(depth);
    allNodes += nodes;
    setBoard("r1bq1rk1/pp3pbp/3Pp1p1/2p5/4PP2/2P5/P2QB1PP/1RB1K2R b K -");
    ComputerThink(depth);
    allNodes += nodes;

    printf ("Total nodes = %d\n", allNodes);
}
/***** MAIN BLOCK *****/
int main(void)
{
    InitGen(); DrawBoard(); side = LIGHT; xside = DARK; computerside = DARK;

    do
    {
        if (side == computerside) ComputerThink();
        else if (GetHumanMove()) break;
        side = xside; xside = 1-xside;
    }
    while (!UpdateNewMove());
}
Exemplo n.º 3
0
int main(){
int listen_sock;
int server_len, client_len;
struct sockaddr_in server_address;
struct sockaddr_in client_address;

listen_sock = socket(AF_INET, SOCK_STREAM, 0);
if (listen_sock == -1)
 {
    printf("khong tao duoc socket\n");
    return 0;
 }
 printf("Tao socket thanh cong\n");

server_address.sin_family = AF_INET;
inet_aton("127.0.0.1",&server_address.sin_addr);
server_address.sin_port = htons(5500);
server_len = sizeof(server_address);

if(bind(listen_sock, (struct sockaddr *)&server_address,server_len)<0)
{
	printf("bind failed.\n");
    return 0;
}
printf("bind done\n");
int check = listen(listen_sock, 10);
if (check == -1)
 {
 printf("error");
 return 0;
 }
printf("waiting connect ...\n");
while(1) {

client_len = sizeof(client_address);
conn_sock = accept(listen_sock,(struct sockaddr *)&client_address, &client_len);
if(conn_sock==-1){
	printf("error connect\n");
	return 0;
}else{
	printf("Accept new connection\n");
}
if(fork() == 0){
	close(listen_sock);
    //thiet lap truyen nhan giu lieu lien tuc
	int sentBytes,revedBytes,i;
    time_t start;
    struct tm * timeinfo;
    char name[30];
    char pass[16];
    struct userinfo acc1;
    char s[2]="|";
    char *token;
    int flag;
    char str_flag[3];
    char filename[]="data.txt";
    int stop = 0;
    FILE *f;
    FILE *result;
    int login;
    while((revedBytes = recv(conn_sock,buff,1024,0)) >= 0){
        buff[revedBytes]='\0';
        token = strtok(buff, s);
        strcpy(str_flag,token);
        flag=atoi(str_flag);
        //nhan va kiem tra co bao
        switch(flag){
            case 0:
                //kiem tra dang nhap neu dang nhap thang cong tra ve buff[0] = 5 
                //neu khong dung tra ve buff[0]=4 va buff[1] la ma loi
                printf("Dang nhap\n");
                token =strtok(NULL,s);
                strcpy(name,token);
                token=strtok(NULL,s);
                strcpy(pass,token);
                login = checklogin(name,pass);
                if(login==1){
                result =fopen(name,"w");
                buff[0] = 5;
                sentBytes = send(conn_sock,buff,1024,0);
                }else{
                    buff[0] = 4;
                    buff[1] = login;
                    sentBytes = send(conn_sock,buff,1024,0);
                }
            break;
            case 1: 
                token =strtok(NULL,s);
                strcpy(name,token);
                token=strtok(NULL,s);
                strcpy(pass,token);
                if(findAcc(name)==1){
                    buff[0] = 4;
                    buff[1] = 1;
                    buff[2] = '\0';
                    sentBytes = send(conn_sock,buff,1024,0);
                    break;
                }
                f =fopen(filename,"a");
                fprintf(f, "%s\t%s\n",name,pass );
                fclose(f);
                buff[0] = 5;
                buff[1] = '\0';
                sentBytes = send(conn_sock,buff,1024,0);
            break;
            case 2:
                side = 1 ;xside = 0;
                time (&start );
                timeinfo = localtime ( &start );
                fprintf(result,"IP address is: %s\n", inet_ntoa(client_address.sin_addr));
                fprintf (result,"time start :%s\n", asctime (timeinfo) );
                InitGen();
                while(1){
                    if(side == computerside){
                        ComputerThink();
                        printf("%d may choi\n",side);
                        fprintf(result,"%s-%s\n",indexChar(newmove.from),indexChar(newmove.dest));
                        UpdateNewMove();
                        buff[0] = 3;
                        buff[1] = newmove.from;
                        buff[2] = newmove.dest;
                        buff[3] = check_thua();stop = buff[3];
                        buff[4] = '\0';
                        send(conn_sock,buff,1024,0);
                        if(stop == 1)  break;
                    }
                    else 
                        if(GetHumanMove(0,1)==0){
                        fprintf(result,"%s-%s\t",indexChar(newmove.from),indexChar(newmove.dest));
                        UpdateNewMove();
                        printf("%d nguoi choi\n",side);                     
                        buff[0] = 3;
                        buff[1] = 1;
                        buff[2] = 0;
                        buff[3] = check_thang(); stop = buff[3];
                        buff[4] = '\0';
                        send(conn_sock,buff,1024,0);
                        //tra ve neu di thanh cong
                        if(stop == 1) break;
                    };
                    side = xside; xside = 1-xside;
                    printf("%d-%d-%d\n",side,newmove.from,newmove.dest);
            	}
            printf("Dung choi\n");
            time (&start );
            timeinfo = localtime ( &start );
            fprintf (result,"time end :%s\n", asctime (timeinfo));
            fclose(result);
            result = fopen(name,"r");
            while(!feof(result)){
                if (fgets(buff,81,result) != NULL ){
                sentBytes=send(conn_sock,buff,1024,0);
                }
            }
            buff[0] = 'Q';
            buff[1] = '\0';
            sentBytes=send(conn_sock,buff,1024,0);
            break;
            default:
            break;
        	    
        }
    }
    close(conn_sock);
    exit(0);
}
signal(SIGCHLD,sig_chld);
close(conn_sock);
}
return 1;
}
Exemplo n.º 4
0
int main()
{
    char line[256];
    char args[4][64];

    /* It mainly calls ComputerThink(maxdepth) to calculate to desired ply */
    char s[256];
    int from;
    int dest;
    int i;

    hashRndInit();
    startgame ();

    maxDepth = 6;		/* Max depth to search */
    MOVE moveBuf[200];
    MOVE theBest;
    int movecnt;

    /* Belka */
    puts (" \n Kitteneitor version June 5th 2013 by Emilio Diaz \n =================================================\n\n");
    puts (" Help overview:");
    puts (" making a move: e.g. e2e4, c7c5, a7a8q, e1g1 etc.");
    puts (" d ............ displaying current board");
    puts (" on ........... forcing the engine to move");
    puts (" sd <n> ....... setting depth to <n> plies");
    puts (" undo ......... taking back last move (ply)");
    puts (" quit ......... quit console application \n\n");
    /* Belka */

    side = WHITE;
    computerSide = BLACK;	/* Human is white side */

    hdp = 0;			/* Current move order */
    for (;;)
    {
        fflush (stdout);
        if (side == computerSide)
        {
            /* Computer's turn */
            theBest = ComputerThink (maxDepth);

            if (theBest.type_of_move > 8)
                printf ("type of move the best %d \n", theBest.type_of_move);

            makeMove (theBest);

            /* Just the move without pawn crown */
            printf("move %c%d%c%d",
                   'a' + COL(theBest.from),
                   8 - ROW(theBest.from),
                   'a' + COL(theBest.dest),
                   8 - ROW(theBest.dest));
            /* Check whether it's a crown */
            switch (theBest.type_of_move)
            {
               case MOVE_TYPE_PROMOTION_TO_QUEEN:
                  printf("q\n");
                  break;
               case MOVE_TYPE_PROMOTION_TO_ROOK:
                  printf("r\n");
                  break;
               case MOVE_TYPE_PROMOTION_TO_BISHOP:
                  printf("b\n");
                  break;
               case MOVE_TYPE_PROMOTION_TO_KNIGHT:
                  printf("n\n");
                  break;
               default:
                  printf("\n");
            }   /* end switch */

            printBoard ();
            printf ("Castle rights: %d\n", castle);
            fflush (stdout);
            continue;
        }

        printf ("k> ");

        /* Get user input */
        if (!fgets (line, 256, stdin))
            return 0;
        if (line[0] == '\n')
            continue;
        sscanf (line, "%s", s);

//        if (scanf ("%s", s) == EOF)	/* Shut down the program */
//            return 0;

        if (!strcmp (s, "d"))
        {
            printBoard ();
            continue;
        }
        if (!strcmp (s, "test1"))
        {
            test1 ();
            printBoard();
            continue;
        }
        if (!strcmp (s, "test2"))
        {
            test2 ();
            printBoard();
            continue;
        }
        if (!strcmp (s, "test3"))
        {
            test3 ();
            printBoard();
            continue;
        }
        if (!strcmp (s, "test4"))
        {
            test4 ();
            printBoard();
            continue;
        }
        if (!strcmp (s, "test5"))
        {
            test5 ();
            printBoard();
            continue;
        }
        if (!strcmp (s, "test6"))
        {
            test6 ();
            printBoard();
            continue;
        }
        if (!strcmp (s, "test7"))
        {
            test7 ();
            printBoard();
            continue;
        }
        if (!strcmp (s, "test8"))
        {
            test8 ();
            printBoard();
            continue;
        }
        if (!strcmp (s, "test9"))
        {
            test9 ();
            printBoard();
            continue;
        }
        if (!strcmp (s, "test10"))
        {
            test10 ();
            printBoard();
            continue;
        }
        if (!strcmp (s, "test11"))
        {
            test11 ();
            printBoard();
            continue;
        }
        if (!strcmp (s, "test12"))
        {
            test12 ();
            printBoard();
            continue;
        }
        if (!strcmp (s, "test13"))
        {
            test13 ();
            printBoard();
            continue;
        }
        if (!strcmp (s, "test14"))
        {
            test14 ();
            printBoard();
            continue;
        }
        if (!strcmp (s, "testMoveGen")) //Belka: McKenzie test position
        {
            testMoveGen();
            printBoard();
            continue;
        }
        if (!strcmp (s, "testEvalSym")) //Belka: McKenzie test position
        {
            testEvalSym();
            continue;
        }
        if (!strcmp (s, "countNodes"))
        {
            countNodes();
            continue;
        }
        if (!strcmp (s, "testWhitePassedPawns"))
        {
            testWhitePassedPawns ();
            continue;
        }
        if (!strcmp (s, "testBlackPassedPawns"))
        {
            testBlackPassedPawns ();
            continue;
        }
        if (!strcmp (s, "testWhiteDoubledPawns"))
        {
            testWhiteDoubledPawns ();
            continue;
        }
        if (!strcmp (s, "testBlackDoubledPawns"))
        {
            testBlackDoubledPawns ();
            continue;
        }
        if (!strcmp (s, "testIsIsolatedPawnWhite"))
        {
            testIsIsolatedPawnWhite ();
            continue;
        }
        if (!strcmp (s, "testIsIsolatedPawnBlack"))
        {
            testIsIsolatedPawnBlack ();
            continue;
        }
        if (!strcmp (s, "showPawnsInfo"))
        {
            showPawnsInfo ();
            continue;
        }
        if (!strcmp (s, "testisSqProtectedByAPawn"))
        {
             testisSqProtectedByAPawn();
            continue;
        }
//        if (!strcmp (s, "testIsSqProtectedByAKnight"))
//        {
//             testIsSqProtectedByAKnight();
//            continue;
//        }
//        if (!strcmp (s, "testIsSqProtectedByABishop"))
//        {
//             testIsSqProtectedByABishop();
//            continue;
//        }
        if (!strcmp (s, "testOpenCols"))
        {
             testOpenCols();
            continue;
        }
        if (!strcmp (s, "undo"))
        {
            takeBack ();
            printBoard ();
            computerSide = (WHITE + BLACK) - computerSide;
            continue;
        }
        if (!strcmp(s,"setboard"))
        {
            strcpy(fenBuf, "");
            sscanf(line, "setboard %s %s %s %s", args[0],args[1],args[2],args[3]);
            strcat(fenBuf, args[0]);
            strcat(fenBuf, args[1]);
            strcat(fenBuf, args[2]);
            strcat(fenBuf, args[3]);
            setBoard(fenBuf);
            continue;
        }
        if (!strcmp (s, "xboard"))
        {
            xboard ();
            return 0;
        }
        if (!strcmp (s, "on"))
        {
            computerSide = side;
            continue;
        }
        if (!strcmp (s, "pass"))
        {
            side = (WHITE + BLACK) - side;
            computerSide = (WHITE + BLACK) - side;
            continue;
        }
        if (!strcmp (s, "sd"))
        {
            sscanf (line, "sd %d", &maxDepth);
            continue;
        }

//        if (!strcmp (s, "fen"))
//        {
//            strcpy (fenstring, "");

//            sscanf (linea, "fen %s %s %s %s", args[0], args[1], args[2],
//                    args[3]);

//            strcat (fenstring, args[0]);
//            strcat (fenstring, args[1]);
//            strcat (fenstring, args[2]);
//            strcat (fenstring, args[3]);

//            fen (fenstring);
//        }

        if (!strcmp (s, "perft"))
        {
            sscanf (line, "perft %d", &maxDepth);
            clock_t start;
            clock_t stop;
            double t = 0.0;
            /* Start timer */
            start = clock ();
            U64 count = perft (maxDepth);
            /* Stop timer */
            stop = clock ();
            t = (double) (stop - start) / CLOCKS_PER_SEC;
//            printf ("nodes = %'llu\n", count);
            printf ("nodes = %8"  PRId64 "\n", count); // Belka
            printf ("time = %.2f s\n", t);
            continue;
        }
        if (!strcmp (s, "quit"))
        {
            printf ("Good bye!\n");
            return 0;
        }

        /* Maybe the user entered a move? */
        from = s[0] - 'a';
        from += 8 * (8 - (s[1] - '0'));
        dest = s[2] - 'a';
        dest += 8 * (8 - (s[3] - '0'));
        ply = 0;
        movecnt = genMoves (side, moveBuf);

        /* Loop through the moves to see whether it's legal */
        for (i = 0; i < movecnt; i++)
            if (moveBuf[i].from == from && moveBuf[i].dest == dest)
            {
                /* Promotion move? */
                if (piece[from] == PAWN && (dest < 8 || dest > 55))
                {
                    switch (s[4])
                    {
                    case 'q':
                        moveBuf[i].type_of_move = MOVE_TYPE_PROMOTION_TO_QUEEN;
                        break;

                    case 'r':
                        moveBuf[i].type_of_move = MOVE_TYPE_PROMOTION_TO_ROOK;
                        break;

                    case 'b':
                        moveBuf[i].type_of_move = MOVE_TYPE_PROMOTION_TO_BISHOP;
                        break;

                    case 'n':
                        moveBuf[i].type_of_move = MOVE_TYPE_PROMOTION_TO_KNIGHT;
                        break;

                    default:
                        puts("Promoting to a McGuffin..., I'll give you a queen");
                        moveBuf[i].type_of_move = MOVE_TYPE_PROMOTION_TO_QUEEN;
                    }
                }
                if (!makeMove (moveBuf[i]))
                {
                    takeBack ();
                    printf ("Illegal move.\n");
                }
                break;
            }
        printBoard ();
    }
}
Exemplo n.º 5
0
void xboard()
{
    char line[256], command[256], c;
    char args[4][64];
    int from, dest, i;
    MOVE moveBuf[200];
    MOVE theBest;
    int movecnt;
    //int illegal_king = 0;

    signal(SIGINT, SIG_IGN);

    printf ("\n");
//    hashKeyPosition(); /* hash of the initial position */
//    hashRndInit();
    startgame ();

    /* Waiting for a command from GUI */
    for (;;)
    {
        fflush (stdout);
        if (side == computerSide)
        {   /* Computer's turn */
            /* Find out the best move to reply to the current position */
            theBest = ComputerThink (maxDepth);
            if (theBest.type_of_move > 8)
                printf ("type of move the best %d \n", theBest.type_of_move);
            makeMove (theBest);
            /* send move */
            switch (theBest.type_of_move)
            {
            case MOVE_TYPE_PROMOTION_TO_QUEEN:
                c = 'q';
                break;
            case MOVE_TYPE_PROMOTION_TO_ROOK:
                c = 'r';
                break;
            case MOVE_TYPE_PROMOTION_TO_BISHOP:
                c = 'b';
                break;
            case MOVE_TYPE_PROMOTION_TO_KNIGHT:
                c = 'n';
                break;
            default:
                c = ' ';
            }
            printf ("move %c%d%c%d%c\n", 'a' + COL(theBest.from), 8
                    - ROW(theBest.from), 'a' + COL(theBest.dest), 8
                    - ROW(theBest.dest), c);

            fflush(stdout);
            continue;
        }

        if (!fgets (line, 256, stdin))
            return;
        if (line[0] == '\n')
            continue;
        sscanf (line, "%s", command);

        if (!strcmp (command, "xboard"))
        {
            continue;
        }
        if (!strcmp (command, "d"))
        {
            printBoard ();
            continue;
        }
        if (!strcmp (command, "new"))
        {
            startgame ();
            continue;
        }
        if (!strcmp (command, "quit"))
        {
            return;
        }
        if (!strcmp (command, "force"))
        {
            computerSide = EMPTY;
            continue;
        }
        /* If we get a result the engine must stop */
        if (!strcmp(command, "result"))
        {
            computerSide = EMPTY;
            continue;
        }
        if (!strcmp(command, "?")) {
            computerSide = EMPTY;
            continue;
        }
        if (!strcmp(command, ".")) {
            continue;
        }
        if (!strcmp(command, "exit")) {
            continue;
        }
        if (!strcmp(command,"setboard"))
        {
            strcpy(fenBuf, "");
            sscanf(line, "setboard %s %s %s %s", args[0],args[1],args[2],args[3]);
            strcat(fenBuf, args[0]);
            strcat(fenBuf, args[1]);
            strcat(fenBuf, args[2]);
            strcat(fenBuf, args[3]);
            setBoard(fenBuf);
            continue;
        }
        if (!strcmp (command, "white"))
        {
            side = WHITE;
            computerSide = BLACK;
            continue;
        }
        if (!strcmp (command, "black"))
        {
            side = BLACK;
            computerSide = WHITE;
            continue;
        }
        if (!strcmp (command, "sd"))
        {
            sscanf (line, "sd %d", &maxDepth);
            continue;
        }
        if (!strcmp (command, "go"))
        {
            computerSide = side;
            continue;
        }
        /* Taken from TSCP: we receive from the GUI the time we have */
        if (!strcmp(command, "time"))
        {
            sscanf (line, "time %ld", &maxTime);
            /* Convert to miliseconds */
            maxTime *= 10;
            maxTime /= 10;
            maxTime -= 300;
            totalTime = maxTime;

//            if (totalTime < 3000)
//                maxDepth = 6;
//            else
            maxDepth = 32;
            continue;
        }
        if (!strcmp(command, "otim"))
        {
            continue;
        }
        if (!strcmp (command, "undo"))
        {
            if (hdp == 0)
                continue;
            takeBack ();
            continue;
        }
        if (!strcmp (command, "remove"))
        {
            if (hdp <= 1)
                continue;
            takeBack ();
            takeBack ();
            continue;
        }

        /* Maybe the user entered a move? */
        /* Is that a move? */
        if (command[0] < 'a' || command[0] > 'h' ||
                command[1] < '0' || command[1] > '9' ||
                command[2] < 'a' || command[2] > 'h' ||
                command[3] < '0' || command[3] > '9')
        {
            printf("Error (unknown command): %s\n", command); /* No move, unknown command */
            continue;
        }

        from = command[0] - 'a';
        from += 8 * (8 - (command[1] - '0'));
        dest = command[2] - 'a';
        dest += 8 * (8 - (command[3] - '0'));
        ply = 0;
        movecnt = genMoves (side, moveBuf);

        /* Loop through the moves to see if it's legal */
        for (i = 0; i < movecnt; ++i) {
            if (moveBuf[i].from == from && moveBuf[i].dest == dest)
            {
                if (piece[from] == PAWN && (dest < 8 || dest > 55))
                {
                    if (command[4] != 'q' && command[4] != 'r' && command[4] != 'b' && command[4] != 'n')
                    {
                        printf ("Illegal move. Bad letter for promo\n");
                        goto goon;
                    }
                    switch (command[4])
                    {
                    case 'q':
                        moveBuf[i].type_of_move = MOVE_TYPE_PROMOTION_TO_QUEEN;
                        break;
                    case 'r':
                        moveBuf[i].type_of_move = MOVE_TYPE_PROMOTION_TO_ROOK;
                        break;
                    case 'b':
                        moveBuf[i].type_of_move = MOVE_TYPE_PROMOTION_TO_BISHOP;
                        break;
                    case 'n':
                        moveBuf[i].type_of_move = MOVE_TYPE_PROMOTION_TO_KNIGHT;
                        break;
                    }
                }

                if (moveBuf[i].type_of_move > 8)
                    printf ("Type of move the best %d \n", moveBuf[i].type_of_move);

                if (makeMove (moveBuf[i]))
                {
                    goto goon;	/* Legal move */
                }
                else {
                    printf ("Illegal move. King is in check\n");
                    goto goon;
                }
            }
        }
        printf ("Illegal move.\n");  /* illegal move */

goon:
        continue;
    }
}
Exemplo n.º 6
0
void testEvalSym()
{
    int depth = 1;

    setBoard("2rr3k/pp3pp1/1nnqbN1p/3pN3/2pP4/2P3Q1/PPB4P/R4RK1w--");
    ComputerThink(depth);
    setBoard("r4rk1/ppb4p/2p3q1/2Pp4/3Pn3/1NNQBn1P/PP3PP1/2RR3Kb--");
    ComputerThink(depth);
    setBoard("5rk1/1b3p1p/pp3p2/3n1N2/1P6/P1qB1PP1/3Q3P/4R1K1w--");
    ComputerThink(depth);
    setBoard("4r1k1/3q3p/p1Qb1pp1/1p6/3N1n2/PP3P2/1B3P1P/5RK1b--");
    ComputerThink(depth);
    setBoard("r3nrk1/2p2p1p/p1p1b1p1/2NpPq2/3R4/P1N1Q3/1PP2PPP/4R1K1w--");
    ComputerThink(depth);
    setBoard("4r1k1/1pp2ppp/p1n1q3/3r4/2nPpQ2/P1P1B1P1/2P2P1P/R3NRK1b--");
    ComputerThink(depth);
    setBoard("3r2k1/1p1b1pp1/pq5p/8/3NR3/2PQ3P/PP3PP1/6K1b--");
    ComputerThink(depth);
    setBoard("6k1/pp3pp1/2pq3p/3nr3/8/PQ5P/1P1B1PP1/3R2K1w--");
    ComputerThink(depth);
    setBoard("r1bqr1k1/pp1nb1p1/4p2p/3p1p2/3P4/P1N1PNP1/1PQ2PP1/3RKB1RwK-");
    ComputerThink(depth);
    setBoard("3rkb1r/1pq2pp1/p1n1pnp1/3p4/3P1P2/4P2P/PP1NB1P1/R1BQR1K1bk-");
    ComputerThink(depth);
    setBoard("2b3k1/4rrpp/p2p4/2pP2RQ/1pP1Pp1N/1P3P1P/1q6/6RKw--");
    ComputerThink(depth);
    setBoard("6rk/1Q6/1p3p1p/1Pp1pP1n/2Pp2rq/P2P4/4RRPP/2B3K1b--");
    ComputerThink(depth);
    setBoard("r3r1k1/pp1q1pp1/4b1p1/3p2B1/3Q1R2/8/PPP3PP/4R1K1w--");
    ComputerThink(depth);
    setBoard("4r1k1/ppp3pp/8/3q1r2/3P2b1/4B1P1/PP1Q1PP1/R3R1K1b--");
    ComputerThink(depth);
    setBoard("2kr3r/pp1q1ppp/5n2/1Nb5/2Pp1B2/7Q/P4PPP/1R3RK1w--");
    ComputerThink(depth);
    setBoard("1r3rk1/p4ppp/7q/2pP1b2/1nB5/5N2/PP1Q1PPP/2KR3Rb--");
    ComputerThink(depth);
    setBoard("r4rk1/1bR1bppp/4pn2/1p2N3/1P6/P3P3/4BPPP/3R2K1b--");
    ComputerThink(depth);
    setBoard("3r2k1/4bppp/p3p3/1p6/1P2n3/4PN2/1Br1BPPP/R4RK1w--");
    ComputerThink(depth);
    setBoard("r4rk1/1p2ppbp/p2pbnp1/q7/3BPPP1/2N2B2/PPP4P/R2Q1RK1b--");
    ComputerThink(depth);
    setBoard("r2q1rk1/ppp4p/2n2b2/3bppp1/Q7/P2PBNP1/1P2PPBP/R4RK1w--");
    ComputerThink(depth);
    setBoard("8/k1b5/P4p2/1Pp2p1p/K1P2P1P/8/3B4/8w--");
    ComputerThink(depth);
    setBoard(" 8/3b4/8/k1p2p1p/1pP2P1P/p4P2/K1B5/8b--");
    ComputerThink(depth);
    setBoard("5rk1/p5pp/8/8/2Pbp3/1P4P1/7P/4RN1Kb--");
    ComputerThink(depth);
    setBoard("4rn1k/7p/1p4p1/2pBP3/8/8/P5PP/5RK1w--");
    ComputerThink(depth);
    setBoard("8/q1n3kp/2p3p1/1p6/1B1pN3/3P1P2/r1P3PP/2Q2K2w--");
    ComputerThink(depth);
    setBoard("2q2k2/R1p3pp/3p1p2/1b1Pn3/1P6/2P3P1/Q1N3KP/8b--");
    ComputerThink(depth);
    setBoard("r1b2r1R/1p2bpk1/4p1p1/4P1N1/p2p4/5Q2/qPP2PP1/1NKR4w--");
    ComputerThink(depth);
    setBoard("1nkr4/Qpp2pp1/5q2/P2P4/4p1n1/4P1P1/1P2BPK1/R1B2R1rb--");
    ComputerThink(depth);
    setBoard("r3r1k1/pp1q1pp1/4b1p1/3p2B1/3Q1R2/8/PPP3PP/4R1K1w--");
    ComputerThink(depth);
    setBoard("4r1k1/ppp3pp/8/3q1r2/3P2b1/4B1P1/PP1Q1PP1/R3R1K1b--");
    ComputerThink(depth);
    setBoard("r1b2r2/3pNpkp/3pn1p1/2pN3P/2PnP3/q3QP2/4BKP1/1R5Rw--");
    ComputerThink(depth);
    setBoard("1r5r/4bkp1/Q3qp2/2pNp3/2Pn3p/3PN1P1/3PnPKP/R1B2R2b--");
    ComputerThink(depth);
    setBoard("r1bq1r2/ppp2pkp/3p2nn/2bN2NQ/2B1P3/8/PPp3PP/R1B2R1Kw--");
    ComputerThink(depth);
    setBoard("r1b2r1k/ppP3pp/8/2b1p3/2Bn2nq/3P2NN/PPP2PKP/R1BQ1R2b--");
    ComputerThink(depth);
    setBoard("r1bq3k/pp2R2p/3B1bp1/2pB1p2/2Pp4/3P2Q1/P1P3PP/6K1w--");
    ComputerThink(depth);
    setBoard("6k1/p1p3pp/3p2q1/2pP4/2Pb1P2/3b1BP1/PP2r2P/R1BQ3Kb--");
    ComputerThink(depth);
}