Text this: Self-controlling photonic-on-chip networks with deep reinforcement learning