Anyway, the basic idea currently is this:
Code: Select all
boolean accept_draw(score) {
if (game.length > 30) {
if (score >= -50 && score <= 50 && opponent_rating - computer_rating > 100)
return true;
if (abs(score - average_score_last_20_plies) < 50) {
if (computer_in_time_trouble)
return true;
if (opponent_in_time_trouble)
return false;
return (opponent_rating > computer_rating);
}
}
return false;
}
Regards
Vince