Purely reactive systems have been used in many robotics researches. However, they have difficulty in solving the hidden state problems. Internal memory has been used to solve the hidden state problems, which is also called the perceptual aliasing problems. Woods problem is one of the perceptual aliasing problems. In this paper, we apply two methods, Finite State Machine and GP-automata controllers, to solve the Woods problem. These two methods are compared in terms of the behavior performance of the agents with internal memory and sensor states. The performance of each method in the Woods problem is measured by the average number of time steps needed to reach a goal position from all possible initial positions. The analysis of the memory shows that both memory states and sensor states affect the behavior performance of the agent.