Implement alpha-beta