In this paper, we propose an improved alpha-beta search algorithm, named trappy alpha-beta (simply), for game-tree in order to identify and set the potential traps in the game playing. can be regarded as an extension of the traditional alpha-beta search algorithm which ties to predict when the opponent might make a mistake and select such moves that can most likely lead the an opponent into the trap by comparing the various scores returned through iterative deepening technology. In our experiment, we test the performance of in comparison with three game-tree search algorithms, i.e., min-max, trappy minimax, and alpha-beta, by playing with four testing opponents, which are obtained form a typical Chinese chess computer game program-Xqwizard (http://www.xqbase.com). The comparative results show that our designedcan effectively find and set the traps in the playing with opponents.