Blindfold Chess, Mr. picoEngine?

While building the picoEngine in C++, I will often be wondering what the engine is thinking. One of the problems is that I can not “see” the engine’s board, so I don’t know why it would make a particular move. So, I added a print function. This also is in keeping with my “engine mentor” Logic Crazy, who often used this technique so he could evaluate the board position.

The code is rather straight forward:

string printBoard = “”;

for (int i = 0; i < 64; i++){

printBoard = printBoard + theBoard[i];

}

cout << printBoard << ” ” << whitesTurn << ” ” << Kcastle

<< ” ” << Qcastle << ” ” << kcastle << ” ” << qcastle

<< ” ” << moveSince << ” ” << turnCount << endl;

Not only did it work, but it seems to be rather helpful. Now, as I work on inserting positions via FEN and the startpos moves system that is defined in the UCI, it makes checking my work easy. Here is a screen shot of it in action:

print_picoEngine

Linux – keep it simple.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s