Nazvěme předaný vstupní uzel uzlem X.
Je-li X počátečním/kořenovým uzlem, nastav a = -¥, b = ¥ (v praxi nastav hodnoty těchto proměnných na minimální a maximální možnou hodnotu).
Je-li uzel X listem (konečným stavem hry, nebo uzlem v maximální hloubce) ukonči proceduru a vrať ohodnocení tohoto uzlu.
Je-li uzel typu AND (na tahu je hráč B) jdi na bod 5, jinak pokračuj (uzel je typu OR, na tahu je hráč A):
Dokud je a < b, tak postupně pro první/další tah (bezprostředního následníka uzlu X a hráče B) volej proceduru AlfaBeta s aktuálními hodnotami proměnných a a b. Po každém vyšetřeném tahu nastav hodnotu proměnné a na maximum z aktuální a navrácené hodnoty .
Ukonči proceduru, vrať aktuální hodnotu proměnné a a pro kořenový uzel vrať i tah, který vede k nejlépe ohodnocenému bezprostřednímu následníkovi.
(Uzel je typu AND, na tahu je hráč B):
Dokud je a < b, tak postupně pro první/další tah (bezprostředního následníka uzlu X a hráče A) volej proceduru AlfaBeta s aktuálními hodnotami proměnných a a b. Po každém vyšetřeném tahu nastav hodnotu proměnné b na minimum z aktuální a navrácené hodnoty .
Ukonči proceduru a vrať aktuální hodnotu proměnné b.