104
Recherche arborescente Monte-Carlo
nbCoups Joues ++;
}
void posePierre (Intersection inter , int couleur ) {
goban [inter ._x] [inter ._y] = couleur ;
hash A= HashArray [couleur ] [inter ._x] [inter ._y];
}
void enlevePrisonniers (Intersection inter ,
}
int couleur ) {
stack st ;
int adversaire = Noir ;
i f ( c o u l e u r == Noir )
adversaire = Blanc ;
for (int i = O; i < 4; i++) {
}
Intersection voisine = inter . vo1s1 ne ( i );
if ((goban [voisine ._x] [voisine ._y] == adversaire ))
i f ( min Li b ( v o i s i ne , 1 ) == 0)
st . push (voisine );
while ( ! s t. empty ()) {
}
Intersection voisine = st . top ();
s t. pop ();
if ((goban [voisine ._x] [voisine ._y] -- adversaire ))
enleveChaine (voisine );
void enleveChaine (Intersection intersection ) {
stack st ;
}
int couleur = goban [intersection ._x]
[ i n terse c t i o n . _y ] ;
st . push (intersection );
while (! s t.e mpty ()) {
Intersection inter = st . top ();
s t . pop ();
}
hash A= HashArray [couleur ] [inter ._x] [inter ._y];
goban [inter ._x] [inter ._y] =V ide ;
for (int i = O; i < 4; i++) {
}
Intersection voisine = inter . voisine ( i);
if ((goban [voisine ._x] [voisine ._y] == couleur ))
st . push (voisine );
Recherche arborescente Monte-Carlo
nbCoups Joues ++;
}
void posePierre (Intersection inter , int couleur ) {
goban [inter ._x] [inter ._y] = couleur ;
hash A= HashArray [couleur ] [inter ._x] [inter ._y];
}
void enlevePrisonniers (Intersection inter ,
}
int couleur ) {
stack
int adversaire = Noir ;
i f ( c o u l e u r == Noir )
adversaire = Blanc ;
for (int i = O; i < 4; i++) {
}
Intersection voisine = inter . vo1s1 ne ( i );
if ((goban [voisine ._x] [voisine ._y] == adversaire ))
i f ( min Li b ( v o i s i ne , 1 ) == 0)
st . push (voisine );
while ( ! s t. empty ()) {
}
Intersection voisine = st . top ();
s t. pop ();
if ((goban [voisine ._x] [voisine ._y] -- adversaire ))
enleveChaine (voisine );
void enleveChaine (Intersection intersection ) {
stack
}
int couleur = goban [intersection ._x]
[ i n terse c t i o n . _y ] ;
st . push (intersection );
while (! s t.e mpty ()) {
Intersection inter = st . top ();
s t . pop ();
}
hash A= HashArray [couleur ] [inter ._x] [inter ._y];
goban [inter ._x] [inter ._y] =V ide ;
for (int i = O; i < 4; i++) {
}
Intersection voisine = inter . voisine ( i);
if ((goban [voisine ._x] [voisine ._y] == couleur ))
st . push (voisine );
