adding details to train_agent_weights function