latest version of train_agent_weights