Traffic is a complex problem and many approaches are suggested to control it. The most famous way to control the traffic is traffic lights scheduling. Traffic lights scheduling is usually done by person base on trial and error.But moving towards intelligence is inevitable. For this purpose, we offer an auto intelligent method based on reinforcement learning. In this article, an intersection is considered as an agent with the learning ability. Therefore, the multi-agent environment is all intersections. The traffic can be controlled through collaboration between the agents. The agents use reinforcement learning to offer an efficient timing for traffic signals. The proposed method is not depended on predetermined rules and, learning is done by the history of the components of the network.