Updated Alpha Beta pruning algorithm