Implement player AI