Algorithme minimax : nombres de noeuds parcourus
Bonjour tout le monde
Je travail sur un algo minmax et je voudrais savoir combien de noeuds sont visites a la fin de l'execution?
Merci
Pseudocode
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
function minimax(Situation s,int d, boolean maxJ)
if d = 0 ou s terminal then
return the heuristic(s)
if maxJ then
valeur := −∞
for each s' of s do
valeur = max(value, minimax(s', d − 1, FALSE))
return valeur
else
valeur := +∞
for each s' of s do
valeur = min(value, minimax(s', d − 1, TRUE))
return valeur |