Solving of Ranking Problem Using Reinforcement Learning