106
}
Recherche arborescente Monte-Carlo
if (!bord && ( nbDiagonalesProtegees > 2))
return true ;
return false ;
/* sc ore à la chi noise : nb de pierres sur le goban */
void calculeScores () {
}
score [Noir ] = O;
score [Bl anc ] = komi ;
for ( i n t i = 1 ; i <= T a i Il e ; i + +)
for (int j = l; j <= Taille ; j++)
if ( goba n [ i ] [ j ] == Vide ) {
Intersection inter (i , j );
}
if (entouree (inter , Noir ))
s c o r e [ Noir ] += 1. 0 ;
else if ( entouree (in ter , Blanc ))
score [Blanc ] += 1. 0;
el se
score [goban [i] [j ]] += 1.0;
if ( true ) {
}
if (score [Blanc ] > score [Noir ]) {
score [Blanc ] = 1.0;
score [Noir ] = 0.0;
}
else {
}
score [Bl anc ] = 0.0;
score [Noir ] = 1.0;
bool gameüver () {
}
int last = nbCoups Joues - 1, nbPass = O;
wh ile (( last > 0) && (moves [ last ]. _x -- 0)) {
last --;
nbPass++;
}
if (nbPass >= 2)
return true ;
return false ;
}
Recherche arborescente Monte-Carlo
if (!bord && ( nbDiagonalesProtegees > 2))
return true ;
return false ;
/* sc ore à la chi noise : nb de pierres sur le goban */
void calculeScores () {
}
score [Noir ] = O;
score [Bl anc ] = komi ;
for ( i n t i = 1 ; i <= T a i Il e ; i + +)
for (int j = l; j <= Taille ; j++)
if ( goba n [ i ] [ j ] == Vide ) {
Intersection inter (i , j );
}
if (entouree (inter , Noir ))
s c o r e [ Noir ] += 1. 0 ;
else if ( entouree (in ter , Blanc ))
score [Blanc ] += 1. 0;
el se
score [goban [i] [j ]] += 1.0;
if ( true ) {
}
if (score [Blanc ] > score [Noir ]) {
score [Blanc ] = 1.0;
score [Noir ] = 0.0;
}
else {
}
score [Bl anc ] = 0.0;
score [Noir ] = 1.0;
bool gameüver () {
}
int last = nbCoups Joues - 1, nbPass = O;
wh ile (( last > 0) && (moves [ last ]. _x -- 0)) {
last --;
nbPass++;
}
if (nbPass >= 2)
return true ;
return false ;
