As AI technology advances, research in playing text-based games with agents has become progressively popular. In this paper, a novel approach to agent design and agent learning is presented with the context of reinforcement learning. A model of deep learning is first applied to process game text and build a world model. Next, the agent is learned through a policy gradient-based deep reinforcement learning method to facilitate conversion from state value to optimal policy. The enhanced agent works better in several text-based game experiments and significantly surpasses previous agents on game completion ratio and win rate. Our study introduces novel understanding and empirical ground for using reinforcement learning for text games and sets the stage for developing and optimizing reinforcement learning agents for more general domains and problems.