Alpha Beta Prunning Algorithm Alpha Beta Prunning
Jurnal Ilmiah Komputer dan Informatika KOMPUTA
48
Edisi. .. Volume. .., Bulan 20.. ISSN : 2089-9033
Figure 5. Flowchart Algorithm Negamax The first step of this flow is the provision of
board initialization value, maxdepth, currentdepth, alpha and beta. After that negamax algorithm will
check the value of board and currentdepth whether one of them is equal to the value of maxdepth, if it is
equal then the search process is complete. If the value is not the same as the next step to search in the
search tree. At the root position alpha value filled with an integer min to beta max filled integer, for
CurrentValue filled with 0 and for bestvalue also filled with integer min.
Figure 6. Tree Search Algorithm Negamax At the time of searching for the maximum value
of the evaluation value of its child nodes must be negative evaluation value, because at the time of
taking the value of the evaluation value will be negated in advance. Negatives of the negative value
of the evaluation is the evaluation value, so when looking for maximum value will get the maximum
value of the evaluation value. At the time of searching for the minimum value of the evaluation value of
child nodes should be the positive value of the evaluation, because at the time of taking the value of
the evaluation value will be negated in advance. Negative than positive evaluation score evaluation
score is negative, then when it sought the maximum value will be obtained from the minimum value of the
evaluation value.