Well, more like Random or Normal, actually. I’m off to a bit of a slow start, but I am making progress on the picoEngine.

picoEngine_2

Here you can see picoEngine’s “many” options…..

First on my list was to give picoEngine an option for the GUI users to select from. Right now, the only option it has is to be completely random about moves, or to play as normal. Okay, technically it can’t play at all at the moment, but if it were to play, these are the two “styles” or play modes.

2018-09-13 12:50:37.472<–1:– engine[slotnr].EngineProcess.Running —
2018-09-13 12:50:37.475<–1:Waiting….
2018-09-13 12:50:37.489–>1:uci
2018-09-13 12:50:37.489<–1:id name picoEngine A01
2018-09-13 12:50:37.490<–1:id author Alaskalinuxuser
2018-09-13 12:50:37.490<–1:Apache 2.0 License.
2018-09-13 12:50:37.491<–1:https://thealaskalinuxuser.wordpress.com
2018-09-13 12:50:37.492<–1:option name Style type combo default Normal var Random var Normal
2018-09-13 12:50:37.492<–1:uciok
2018-09-13 12:50:37.507–>1:isready
2018-09-13 12:50:37.544<–1:readyok
2018-09-13 12:50:43.329–>1:setoption name Style value Normal
2018-09-13 12:50:43.330<–1:Setting Options….
2018-09-13 12:50:43.331<–1:Normal Mode.
2018-09-13 12:50:43.332<–1:Options set.
2018-09-13 12:51:37.602–>1:setoption name Style value Random
2018-09-13 12:51:37.603<–1:Setting Options….
2018-09-13 12:51:37.603<–1:Random Mode.
2018-09-13 12:51:37.603<–1:Options set.
2018-09-13 12:51:49.178–>1:setoption name Style value Normal
2018-09-13 12:51:49.179<–1:Setting Options….
2018-09-13 12:51:49.180<–1:Normal Mode.
2018-09-13 12:51:49.181<–1:Options set.
2018-09-13 12:54:43.028–>1:setoption name Style value Normal
2018-09-13 12:54:43.029<–1:Setting Options….
2018-09-13 12:54:43.030<–1:Normal Mode.
2018-09-13 12:54:43.030<–1:Options set.

Here you can see the chess GUI sending the signal to set the optional mode after each choice that I made while testing it out. My plan is to use a bool for styleRandom and have it make move choices based on that. You can check out the full commit on my GitLab if you’d like, but here is the main portion of the code:

void inputSetOption(string setString)
{
cout << “Setting Options….” << endl;
if (std::string::npos != inputString.find(“Random”))
{
styleRandom = true;
cout << “Random Mode.” << endl;
}
if (std::string::npos != inputString.find(“Normal”))
{
styleRandom = false;
cout << “Normal Mode.” << endl;
}
cout << “Options set.” << endl;
}

Linux – keep it simple.

Leave a Reply

Your email address will not be published. Required fields are marked *