Nowadays, plenty of researches focus on story generation which is widely used in computer games, education and training applications. It is highly desirable that the generated story should afford high user agency and at same time having capabilities to address user's interventions. In this paper, we apply planning, which is derived from artificial intelligence, to achieve this objective. With the use of planning, several solutions are produced, which contains a sequence of user's and system agents' actions. In addition, we propose the concept of Action Preference, which takes into account user's feedbacks, to evaluate all of the solutions after planning. Meanwhile a variant of hyperbolic tangent is utilized to calculate Action Preference. In order to evaluate its feasibility, an educational game was implemented on the basis of story generation. That result proves that planning with Action Preference is an effective approach in story generation.