# Reinforcement Learning Methods for Emulating Personality in a Game Environment +
## 3 Materials and Methods
### Game Mechanics and Environments
#### 3.1.4 Training Methodology  
As we stated in the previous section, we developed a single agent that tries to achieve specific tasks in a simple and complex environment, such as pressing buttons and opening doors, with the goal of escaping. This methodology was used in a complex environment, while we also used different sensors to see how the results would vary. Then, by using the best sensors we developed a multi-agent system, at first without the custom-made reward system and then with it. Subsequently, we started implementing the custom reward functions that were specific to certain behaviors into the agents, which enabled us to train them to emulate unique behaviors and personality traits. To preserve interpretability and separate the impact of individual traits on behavior, each agent was given a single dominant personality trait. Even though real people usually combine a variety of personality traits, simulating several traits per agent would have greatly increased complexity and decreased analytical clarity. We were better able to see how a particular trait affects decision-making and group dynamics by concentrating on just one dominant trait per agent. Based on their high behavioral expressiveness in group interactions, we chose four traits: agreeable, non-agreeable, introverted, and extrovert. Because they are more inwardly focused and less closely related to the observable, interactive behaviors we sought to model and test, the traits of neuroticism and conscientiousness were purposefully left out. We assessed the behaviors typically linked to each personality trait rather than measuring them directly, which allowed us to test their effects in team-based situations in a methodical manner. To maintain clarity and highlight the most instructive behavioral patterns, we presented a representative subset of configurations because each team had four agents and the trait combinations scaled quickly. So, we display a representative subset of team configurations that capture the most instructive behavioral variations. We began by training four baseline teams, each of which had an agent with the same personality. Before examining mixed-trait dynamics, this provided us with a solid basis for comprehending the performance of homogeneous personality groups. Each agent is given a personality trait before training, which establishes the parameters of a matching Gaussian distribution that is used to shape its inclinations. Agents are immersed in the game environment during training, and they receive rewards at the end of each episode according to performance metrics that match their individual personality-driven goals. These crucial steps are followed in the process:  
* We choose the specific trait we want the agent to emulate (e.g., extroversion);* We set the Gaussian of each trait to define the selected one (\(G_{A}=0\), \(G_{C}=0\), \(G_{E}=1\), \(G_{A}\)= 0, \(G_{N}=0\))
* During training at the end of each episode: 1. We collect behavior action metrics (push behavior = number of push actions) 2. We reward the agent by multiplying behavior metric with the corresponding Gaussian (R = Pushing behavior  
To maximize agent performance during training, we experimented with a variety of hyperparameter values, as indicated in Table 2. Single-agent setups and multi-agent teams displaying personality traits were found to have quite different optimal configurations. This discrepancy makes sense because multi-agent teams with social dynamics (like agreeableness or extroversion) need larger networks and more substantial training buffers in order to learn efficiently because they involve more intricate interactions and coordination behaviors. Consequently, simpler agents converged effectively with lighter configurations, while the top-performing personality-driven teams used higher values for parameters like batch size, buffer size, and number of hidden units.