// this method decides whether to proceed with the social interaction bool ProcessSocial(string origin) { // get the relevant relationship parameter AgentStateParameter relationshipInQuestion = thisAgentPersonality.GetRelationship(origin); // set the relationship for consideration thisAgent.socialInteruption.action.considerations[0].agentStatePar = relationshipInQuestion; // calculate the utility thisAgent.socialInteruption.action.EvaluateActionUtil(); if (isDebugging) { Debug.Log("Social interaction score: " + thisAgent.socialInteruption.action.GetActionScore()); } if (thisAgent.socialInteruption.action.GetActionScore() >= socialUtilThreshold) { // set relationship variable for all social actions foreach (LinkedActionBehaviour socialAction in thisAgent.socialInteruption.action.linkedChildActions) { socialAction.action.considerations[0].agentStatePar = relationshipInQuestion; } return(true); } else { return(false); } }