11.5 Corrigés des exercices
}
}
}
}
}
}
scoreBestRollout [n] = bestScore;
for (int j = O; j < p.depth; j++)
bestR ollout [n] [j ] =p . variation [j ];
else {
}
Problem p = pb;
p. playMove ( i) ;
scoreRollout = nestedRollout (p , n - 1);
if ( scoreRollout > bestScore ) {
}
bestScore = score Rollout;
bestMove = i ;
if (recallBestSequence ) {
}
scoreBestRollout [n] = bestScore;
for (int j = O; j < p.depth; j++)
bestRollout [n] [j ] =p . variation [j ];
else if ( scoreRollout == bestS core) {
int move = (int) (2 * (rand () /
(RAND_MAX + 1. 0))) ;
}
if ( move == 1 ) {
}
bestScore = scoreRollout;
bestMove = i ;
if ( recallBestSequence ) {
}
scoreBestRollout [n] = bestScore;
for (int j = O; j < p.depth; j++)
bestRollout [n] [j ] = p. variation [j ];
pb . playMove ( bestMove );
return pb . score;
11.5.4 SameGame
#include
#inclu de
#include
#include
}
}
}
}
}
}
scoreBestRollout [n] = bestScore;
for (int j = O; j < p.depth; j++)
bestR ollout [n] [j ] =p . variation [j ];
else {
}
Problem p = pb;
p. playMove ( i) ;
scoreRollout = nestedRollout (p , n - 1);
if ( scoreRollout > bestScore ) {
}
bestScore = score Rollout;
bestMove = i ;
if (recallBestSequence ) {
}
scoreBestRollout [n] = bestScore;
for (int j = O; j < p.depth; j++)
bestRollout [n] [j ] =p . variation [j ];
else if ( scoreRollout == bestS core) {
int move = (int) (2 * (rand () /
(RAND_MAX + 1. 0))) ;
}
if ( move == 1 ) {
}
bestScore = scoreRollout;
bestMove = i ;
if ( recallBestSequence ) {
}
scoreBestRollout [n] = bestScore;
for (int j = O; j < p.depth; j++)
bestRollout [n] [j ] = p. variation [j ];
pb . playMove ( bestMove );
return pb . score;
11.5.4 SameGame
#include
#inclu de
#include
#include
