A reinforcement learning approach to discovering network generation algorithms