code day_4.0: try to implement the AI control