bot functionally running through the game tree