62
}
Ta bles de Transposition
/* fi n des coupes selectives avec coup nul */
Coup transpoMove ;
GenericTranspo *l =T T. look (& virus );
if (t != NULL) {
}
if (t->depth >= depth ) {
}
if (t->scoreExact ) return t->score ;
else alpha =m ax (alpha , (in t)t->score );
if (alpha >= beta ) return beta ;
/* on teste le coup de transposition en premier */
transpoMove = t->best ;
if (virus . coupLegal (transpoMove ))
joueAlphaBeta ( transpoMove , depth , alpha , be ta ,
joueur , vp );
list listeCoups ;
if (alpha < be ta ) {
}
listeCoups = virus . coupsLegaux (joueur );
if ( listeCoups . empty ())
return virus . evaluationSiPlusDeCoupsPossibles
(joueur );
listeCoups . sort ();
fo r ( list:: iterator it = listeCoups . begin ();
(it != listeCoups . end ()) && (alpha < beta ); ++ it)
if ( ( t == NULL) 11 ( * i t != transpoMove ))
joueAlphaBeta (* it , depth , alpha , beta , joueur , vp );
if (alpha >= be ta )
TT. add (& virus , depth , alpha , *Vp . begin () , false );
else if (!vp.empty ())
TT .add (& virus , depth , alpha , * Vp . begin () , true );
else if ()
TT . add (& virus , depth , alpha , *listeCoups . begin () ,
true ) ;
return alpha ;
}
Ta bles de Transposition
/* fi n des coupes selectives avec coup nul */
Coup transpoMove ;
GenericTranspo
if (t != NULL) {
}
if (t->depth >= depth ) {
}
if (t->scoreExact ) return t->score ;
else alpha =m ax (alpha , (in t)t->score );
if (alpha >= beta ) return beta ;
/* on teste le coup de transposition en premier */
transpoMove = t->best ;
if (virus . coupLegal (transpoMove ))
joueAlphaBeta ( transpoMove , depth , alpha , be ta ,
joueur , vp );
list
if (alpha < be ta ) {
}
listeCoups = virus . coupsLegaux (joueur );
if ( listeCoups . empty ())
return virus . evaluationSiPlusDeCoupsPossibles
(joueur );
listeCoups . sort ();
fo r ( list
(it != listeCoups . end ()) && (alpha < beta ); ++ it)
if ( ( t == NULL) 11 ( * i t != transpoMove ))
joueAlphaBeta (* it , depth , alpha , beta , joueur , vp );
if (alpha >= be ta )
TT. add (& virus , depth , alpha , *Vp . begin () , false );
else if (!vp.empty ())
TT .add (& virus , depth , alpha , * Vp . begin () , true );
else if ()
TT . add (& virus , depth , alpha , *listeCoups . begin () ,
true ) ;
return alpha ;
