In this study, we propose a novel air-hockey robot that can change its actions according to the behaviors of opposite human player. In the robot, its attack behaviors are optimized during an air hockey game by recognizing the motions of the puck and the human hand. First, a method of how to calculate the attack position is explained. Secondly, the value of an attack calculated by the information of the puck and mallet including the position of human hand is explained. Then, we show the data of experiments and explain the reason of robot behaviors by the calculated value.