Agent-based computational economics has become one of the most important electricity market study methods. Research on the reinforcement learning algorithm is fairly deep-going while strategy selection by means of the random number is its important link. So it's necessary to study the influence of the random number in the algorithm. With the Roth-Erev learning algorithm as an example, an analysis is made of the impact of the random number on the power market simulation results and comparisons are made between several random generating methods in simulation application in terms of performance. Meanwhile, by making an in-depth investigation on the relationship between the random number and the agent in electric power market simulation, requirements on the property of the random number are discussed and an improved method is put forward and used to generate repeatable, highly efficient, and uniformly distributed random sequences, thereby increasing the efficiency and quality of the agent-based electric power market simulation experiments.