Balancing and Analyzing Player Interaction in the ESG+P Game with Machinations

: This work explores the balancing of an educational game to teach sustainable development in organiza-tionsby focusingon playerinteraction andemploying strategies. Gamesuccess isa challengethat relieson balancing the relationships among its elements. Balancing is a complex process performed over multiple iterations, starting at game conception and continuing throughout development and testing stages. This work extends our previous case study, which did not consider player interaction for the game balancing. We built two models that contains all game mechanics using the Machinations framework. The first model includes elements that randomly produce, distribute, and consume resources


Introduction
This work aims to explore the process of balancing the ESG+P Game [Magalhães et al., 2023] carried out in the initial steps of a game development process [Mangeli et al., 2022], by focusing on how players interact with the game and the strategies they employ to achieve the objectives.This work revises and extends our previous paper [Silva et al., 2023], which based on the perspective of a player who does not use strategy, that is, someone who plays randomly, without considering the feedback provided by the game.
Game balancing is typically performed in later phases in various game design methods, when there is already a prototype [Albaghajati and Ahmed, 2023].However, there are methods that advocate for balancing in the early stages [Adams and Dormans, 2012; Mangeli et al., 2022; Albaghajati and Ahmed, 2023].This work shows how game balance can be achieved using a modeling and simulation tool.

ESG+P Game
Organizations commonly assess sustainability by evaluating their investments in Environmental, Social, and Governance (ESG) resources.The ESG+P Game adopts the "ESG+P Sustainable Development" approach [Magalhães and Eckschmidt, 2021], which extends the context of this analysis by incorporating a fourth metric: People.The game aims to promote learning and reflection regarding sustainable development and stakeholder satisfaction in organizations.
The game combines the mechanics of roll and write and flip and write [Wrobel, 2023; Magalhães et al., 2023].At each turn, dice are rolled to indicate available resources, and cards are flipped to indicate available investment opportunities.The players must select which opportunity to invest and then the result of each card is shown.The educational goal is to enable learning about the proper use of resources, maximizing efficiency, developing new business models, and reaping rewards in the valences of each resource [BR, 2023].
According to De Freitas [2018]; Flood et al. [2018]; Halbrook et al. [2019] interactive games are capable of generating more meaningful learning, awakened through experimentation, participatory engagement, and the awakening of creation.This occurs because interactive games can arouse curiosity and stimulate reasoning.Furthermore, each challenge requires the player to make decisions using efficient strategies and thus acquire different skills.These authors also state that decision-making, creative thinking, collaboration and teamwork, self-confidence, dealing with emotions and learning from mistakes stand out as the most relevant skills in the search for understanding how interactive games contribute to learning.

Early Game Balancing
Balancing the game before developing an artifact (prototype) can reduce effort, time, and costs [Mangeli et al., 2022].We adopted Machinations [Adams and Dormans, 2012] for balancing because it is a visual modeling and simulation tool that graphically represents the game mechanics through diagrams following principles similar to System Dynamics [Sterman, 2000].Schreiber and Romero [2022] present two reflections on balancing.The first considers that game designers often invest significant time in attempting to fine-tune game balance, primarily because predicting the outcome of a game without engaging in gameplay and making adjustments is challenging.The second reflection analyzes the case of a game that is not properly balanced to achieve its design objectives and meet its target audience.Players' experience could be ruined, regardless of the game having good mechanics or a compelling story.Correcting a game element with inappropriate properties may often also require fixing other elements [Beyer et al., 2016].These reflections indicate that the success of a game is significantly dependent on the balancing efforts.Khaliq and Purkiss [2015] question whether interactivity is necessary for a game and assert that, in the vast majority of games, the answer is yes.They argue that the essence of a game lies in its interactive nature and thus every game has a player.This question corroborates the educational perspective presented by Hernández-Lara et al. [2019], who state that learning emerges autonomously and interactively from a constructivist learning perspective and is aligned with current active methodologies.

Game Balance
The term balance has different meanings in different contexts [Schreiber and Romero, 2022].Balance can express a sense of harmony between all parts of a system, similar to the concept of Quality Without a Name (QWAN) [Garvin, 1984].Balance or equilibrium of a game can also be understood as a metaphor for a feeling that players experience during gameplay [Sirlin, 2009].
Balancing main goals are to avoid dominant strategies and provide fairness [Becker and Görlich, 2019].Novak et al. [2012] argue the term balancing explicitly includes the concepts of static and dynamic game balance.They also reinforce Rollings and Adams's [2003] statement that these concepts involve different game elements and focus on keeping the player's skill as the main and decisive factor for the gameplay.Balance is thus necessary to provide optimal, challenging, immersive, and fun experiences according to player's skills [Silva Bastos et al., 2018].Balancing the mechanics and dynamics of the game to provide a pleasant gaming experience can be very difficult to achieve.
Game designers seek to achieve balance through incremental, iterative, and evolutionary design based on continuous learning.Initially, the design comprises hypotheses, lowfidelity prototypes, and understanding the impacts of each change [Sirlin, 2009].In each design cycle, game designers plan tests, challenges, and fine-tune the latest version of the game until reaching a "perfect balance".However, there are authors who argue the vision of a state of perfect equilibrium is almost unattainable [McGonigal, 2011; Sahibgareeva andKugurakova, 2021].Game balancing may be a lengthy process and might depend on subjective feedback from player testers, as well as interpretation by game developers [Medeiros and Medeiros, 2014].Positive and even negative playing experiences can guide design decisions and balance adjustments [Marques et al., 2023].
The challenges for designers to get appropriate feedback to balance a game are the number and types of prototypes, the need to have focus groups, and the number of iterations.This feedback cycle is similar to the PDCA cycle [Liker, 2003] and is the predominant paradigm for building high-quality games.
Some researchers seek more formal perspectives on game development to speed up this process and aid the designer's quest to improve the characteristics of good games.Koster [2013] supports these initiatives, points out that visual and graphical representations for a game are necessary, and underlines that we also create data models to design computer systems and plans for buildings and houses.These representations might improve our understanding of the game or predict its characteristics.Thus, there are initiatives that propose understanding games as information systems [Xexéo et al., 2021]; present game development methodologies [Leitao et al., 2021; Mangeli et al., 2022], and use, create, or adapt languages, notations, patterns, and modeling and simulation tools [Koster, 2013; Almeida, 2015; Van Rozen, 2020].Schreiber and Romero [2022] state that there are many types of game balance: Mathematical, Difficulty, Progression, Initial Conditions, between Multiple Strategies, between Game Objects, and Balance as Fairness.
For instante, Clash Royale [Supercell, 2016] is a competitive and casual game that combines some kinds of balancing: between Game Objects, between Multiple Strategies, and Fairness.The game undergoes periodic balancing of cards (strengths, weaknesses, and interactions with other cards and elements) to prevent the emergence of imbalanced cards (too strong or too weak) and dominant strategies that involve only a few cards.Game designers analyze post-battle results, card usage rates, win rates, synergy between cards, and the advantage of one card over others, always considering the player's skill levels [Fonteles Filho et al., 2021].
Tools such as Machinations seem to be intrinsically indicated for mathematical balance, but can also be applied to other types of balance, depending on the system being modeled.Machinations can develop progression models without the need to use highly complex simulation tools common in industrial environments.In addition, Machinations can even model the estimation of emotions (feelings) [Ferrada and Camarinha-Matos, 2019].

Game Interactivity
Interactivity entails the communication (interaction) between a user and a system, capable of changing the state of the system [Marques et al., 2017].A system presents the current state to the user and enables the user to take actions to alter that state.The user enters data and then the system processes these data, changes its own state, and displays the new state, providing feedback to the user [Blumberg and Ismailer, 2009].This is one of the characteristics of games as information systems [Xexéo et al., 2021].
In a gaming context, interactivity refers to the player's ability to interact with the game environment, influencing and being influenced by gameplay events [Khaliq and Purkiss, 2015].Interactivity stimulates player immersion, motivation, engagement and learning, develops skills and enables personalized experiences [Ermi and Mäyrä, 2005; Blumberg and Ismailer, 2009; Rufino Júnior et al., 2023].
The essence of a game lies in its interactive nature [Ermi and Mäyrä, 2005], which encourages players to apply their expertise to solve challenges and missions [Rufino Júnior et al., 2023].Games provide players with the interaction that other forms of entertainment, such as books and movies, lack [Yuan et al., 2010].A player without interactivity is not a player, but rather an observer [Khaliq and Purkiss, 2015].
Interactivity gives the player control or freedom over the game [Schell, 2008].The player experience emerges from the interaction between the player and the game [Sedig et al., 2017].Players bring their desires and previous experiences to actively engage and shape the gameplay [Ermi and Mäyrä, 2005] and may enjoy interacting with the game.
Interactivity grants players with the opportunity to make decisions, take actions, solve challenges and explore virtual worlds [Ermi and Mäyrä, 2005].Game events are closely connected to player action through interactivity.The Interactions refer to any actions that players undertake to shape the unfolding events within the gameplay.Players can observe the results of their actions, as the game immediately provide feedback on those events.Thus, players perceive themselves as the center of events and the driver of change and progress [Klimmt, 2009].
An interaction has both an action and a reaction component.Game interaction refers to an active, continuous, and reciprocal relationship between a player and a game [Sedig et al., 2017].Within this loop, the player performs an action and the game interface reacts [Shen et al., 2009; Tondorf andHounsell, 2022].Game interaction is a cyclical process that can be described in three steps [Yuan et al., 2010] (Figure 1).First, the game presents stimuli to the player, who must then cognitively determine which in-game response(s) to provide from the available game actions.Next, the player must perform the chosen action(s) to interact with the game.As a result, the game's internal state may change.The game may present new stimuli, providing instant feedback to players, allowing them to see the result of their actions [Rufino Júnior et al., 2023].These steps are repeated until the game reaches an end condition.
Game designers face the challenge of creating an artifact that generates a certain experience when a person interacts with it.Game designers must understand how players perceive and interact with games to deliver better gaming experiences, contemplating whether those interactions are meaningful and enjoyable [Carvalho andFurtado, 2020; Schell, 2008].Defining clear goals and appropriate rewards reinforce player's interaction and engagement with games [Car-  and Furtado, 2020].An interacting system does not dictate outcomes but guides behavior through achieving a goal.Games are goal-directed interaction, that is, they are interactive structures that requires players to struggle toward goals [Costikyan, 2002].

Machinations Framework
Machinations is a visual language and a tool that allows game designers to build diagrams to model game mechanics, some dynamics and even complete games, abstracting their complexities [Adams and Dormans, 2012].Games can be conceptualized as state machines since they begin with an initial state and the interactions between the players and the game lead to new states until a final state is reached [Dormans, 2012].The tool has graphs to monitor the game state and resource progress throughout the simulation.Adams and Dormans [2012] recognize that Machinations can represent five types of mechanics: internal economy, progression mechanisms, physics, maneuvers or tactical movements, and social interaction.But Machinations focuses on the game's internal economy that comprises the production, flow and consumption of game resources: energy, ammunition, lives, enemies, etc. [Vasconcellos et al., 2017].
Machinations is based on concepts from System Dynamics [Forrester, 1968].The tool simulates the gameplay through the flow of resources and feedback between its nodes (elements) [Ašeriškis and Damaševičius, 2014] that pull, push, gather, and distribute resources.
Resource connections guide how resources move between elements, and state connections define how the current distribution of resources modify, triggers, or active other elements [Adams and Dormans, 2012].Pools store resources.Sources create resources.Drains consume resources.The amount of resources in each pool reflects the overall state of the game.Gates distribute resources e trigger other elements.Registers make simple calculations and display the result.Converters convert resources into others.Traders exchange resources between two sources.Delays and Queues withhold resources to intentionally slow down the flow of the simulation.End Conditions stop the simulation when a specific state or condition is fulfilled.Finally, Artificial Players can automate the actions of the player through simple scripts, which control and activate the model's nodes.Figure 2 shows the Machinations elements.
We used two editions of Machinations in this work.First, we used the free plan of the online edition, provided as Software as a Service.Next, we also used a previous standalone edition (version 4.5), which is a free program running on the old Flash Player.Each one has some strengths and limita- tions.The free plan of the online edition offers enhanced usability and features for creating visually appealing and comprehensible diagrams and allows to play the simulation at each step, simplifying the process of error-checking in the diagram's resource flow.But this free plan limits access to all resources of the online edition.On the other hand, the standalone edition offers some features similar to those in the paid plans of the online edition, such as simulation of models in batch runs, export of chart results in CSV format files, and commands to implement scripts to simulate player interactivity.

Related Works
The related works mainly explore game balancing studies using Machinations or artificial intelligence techniques.But we first introduce some studies on game interaction.Marques et al. [2017] propose a usability-oriented interaction and navigation model to improve the quality in interactive systems.Rufino Júnior et al. [2023] conducted a rapid review to examine the benefits of using games with a purpose to support risk situation training in industry and make games more playful, engaging and motivating.Authors analyze player actions, interactivity, challenges, feedback and objective evaluation.Participants suggest developing techniques to make training more attractive and interactive and point the low level of interaction in training may result in low interest, attention and engagement to the content taught.Sedig et al. [2017] examine actions and reactions within interactions.Authors propose a framework that analyzes actions based on their agency, flow, focus, granularity, presence, and timing; and also analyzes reactions based on feedback, activation, context, flow, spread, state, and transition.
Balancing covers the rules of the game and their interactions, as well as the changes in the game's state over time and through player interaction.Research on balancing presents a variety of aspects and ideas, ranging from feedback cycles to the transitivity of game elements.However, few studies directly and concisely demonstrate the balancing process in practice [Becker and Görlich, 2019].Related works also encompass studies aiming to automate the balancing process.Zaidan et al. [2016] modeled and tested the internal economy of an independent digital game using Machinations.They identified and resolved deadlocks and balanced the game system by analyzing interactions within feedback cycles.Stephens and Exton [2021] simulated the item purchasing mechanic in shops using Machinations to assess the internal economy and measure the upper limits of inflation in online multiplayer games.Machinations has also been utilized to simulate other game-related contexts, such as gamification processes [Ašeriškis and Damaševičius, 2014; Lithoxoidou et al., 2018; Tizuka et al., 2022].For instance, Kessing and Löwer [2022] simulated the relationship between user types, motivation, game elements and desired actions in a gamification project.
Van Rozen and Dormans [2014] proposed incorporating a variant of Machinations called Micro-Machinations to speed up the game design process.They analyzed the internal economy and positive feedback cycles of a digital game prototype.Micro-Machinations and Rachinations [Almeida, 2015] allow building reusable modules but lack graphical interfaces to aid this procedure.Machinations online edition allows users to group elements and add them to their private library for reuse [Machinations, 2024].Chandler and Noriega [2006] proposed using a game difficulty analysis framework.Their research on failures and successes suggests automatically adjusting the difficulty level based on players' skills.Medeiros and Medeiros [2014] suggested using a reinforcement learning algorithm to balance difficulty progression in a runner game through an endless procedurally generated world.Gameplay record metrics and player feedback guide the algorithm to add, remove and improve features, and calibrate the challenges and rewards for maximizing player fun.Fuentes Perez et al. [2016] propose a semi-automated method that incorporates experts' contribution in a dynamic game difficulty balancing.Evolutionary Fuzzy Cognitive Maps (E-FCM) ensure equilibrium by adjusting the weights in real time.Volz et al. [2016] applied AI agents to a set of mechanics to describe what makes a game balanced and enjoyable.Beyer et al. [2016] used machine learning algorithms to solve a development problem.They concluded that AI does not play in the same way as humans.This implies that automated balancing does not assure an optimal balance state in a game system.Thus, they pursued balance by involving their own player-testers.Chen et al. [2014] proposed a coevolutionary design method that applies genetic algorithms in an MMORPG to balance characters' skills: physical damage and hit rate.Results showed the method well-balanced the skills, but simplified the game model too much and neglected the presence and influence of characters controlled by other players.Pfau et al. [2018Pfau et al. [ , 2020] ] applied Deep Player Behavior Modeling (DPBM) to balance another MMORPG.Both works resulted in an imbalance among the characters' classes but achieved balance in the overall game.
This work balanced the game in the Project stage [Mangeli et al., 2022] before developing a prototype.But related works often regarded the balancing process as a step subsequent to game design and their authors built game prototypes to support this process.Those authors also argue that balancing is a delicate, challenging, time-consuming, and costly task because designers must continuously adjust game design elements (parameters) and conduct extensive tests to evaluate the changes.
Related works that used Machinations have seemed to center on internal economics or similar concepts.This tendency may occur since Machinations books [Adams andDormans, 2012; Dormans, 2012] explain the tool's features focusing on analyzing the game's resource management.

Game Design
This section presents the design of the ESG+P Game, which have been developed by a team of experts at LUDES -Ludology, Engineering, and Simulation Lab.The purpose of the game is to teach sustainable development in organizations by satisfying their stakeholders.
Games are important educational tools because they have an inherent attractive, innovative, and interactive nature that motivates and fosters learning [Koster, 2013; Kalmpourtzis, 2018].Unlike merely watching, games encourage players to actively participate in the proposed activities.Therefore, games provide a safe environment where players can learn and simulate risk situations [Rufino Júnior et al., 2023].
The ESG+P Game fosters discussion on sustainable development and recognizes the endeavor to seek for solutions to preserve ESG+P resources [Magalhães et al., 2023].The game offers an opportunity for players (students) to consider the consequences of each decision on the company's stakeholders.
In ESG+P Game, players assume the role of company managers and face situations in which to decide which resources to invest to satisfy stakeholders in their sustainable development.Since managers must be aware of the risks of their decisions and actions, the game allows for simulating scenarios and challenges that organizations face.The game offers two basic mechanics to players: allocate resources and choose actions [Magalhães et al., 2023].
The game begins with each player acquiring a distinctive company characterized by its four key stakeholders, each representing a distinct objective.Each objective aims to achieve a minimum score for each stakeholder: 70, 80, 90, and 100.Players decide on which ESG+P resources to invest in to achieve the company's goals.The weighted sum of invested resources calculates these scores.Each player starts the game with 10 points invested in the four resources.So, each company stakeholder starts the game with 50 points based on the weighted sum of these resource points.
Each player gets a resource sheet to write their points on.The resource sheet (Figure 3) contains fields for company identification and player name, four worksheets to score the ESG+P resources invested in each turn and step, a frame to write down the Action card -and occasionally the Event card -and the player's chosen option on the Action card in each turn, a chart illustrating the quantity of resources owned by the company each turn, and the four stakeholders that must be satisfied.
Each turn contains at least two steps: Investment and Action.The third and fifth turns still include the Risk step.These steps are described below.
Investment -The moderator rolls four six-sided dice.Each die has a distinct color and represents a specific resource.The outcome of a die determines the points that a player can invest in a resource.Each player chooses two dice.Players write down the points for the resources they chose to invest in their own resource sheet, specifically in the Investment column of the row for that turn.The moderator collects the dice to roll them again in the next turn.
Action -The moderator draws four cards from the top of the Action Cards pile and presents them to the players.Each  [Magalhães et al., 2023] card depicts a situation that managers might face and presents two options that describe the possible procedures they could adopt in that situation.Each option allows the player to gain resources but may also incur a cost in another resource.The gains and costs associated with each option are listed on the back of the card, keeping them hidden from the players.Concealing this information encourages players to make decisions based on their knowledge and beliefs rather than merely on the potential gains and costs of resources.Hence, the player must make two decisions that best align with their company's goals or prevent resource depletion: first, choosing the Action card, and then selecting the option he/she will adopt.After making decisions, the player writes down the points gained in a resource on the resource sheet, specifically in the Action column of the row for that turn.In addition, the player may occasionally subtract the cost of the other resource in the Action column of the same row.
Risk -The moderator draws one card from the top of the Event Cards pile and presents it to the players.Event cards depict a situation, which poses a risk that affects all players.A risk usually yields negative effects on achieving a goal.However, modern theory indicates that a risk can also yield positive effects [PMI, 2021] when seen as an opportunity.The game distributes risks equally among the company's resources, but negative effects are more likely to occur than positive ones.Players record the effect of the risk on a given resource by writing down the subtracted or added points in the Risk column of the row for that turn.Each player can still react to the risk if they meet a condition based on the amount of resources they have already invested.Thus, the negative effect of a risk may worsen if the amount of the resource does not meet the condition.On the other hand, a positive effect of a risk can further benefit the company if the amount of the resource meets the condition.
The Risk step in the third and fifth turns helps to avoid the End Game Effect [Engelstein and Shalev, 2022], where players could optimally reinvest their resources, knowing that the game will be over.So players feel the game is fairly balanced, and they have a chance to win by making ethical and correct decisions.Furthermore, players recognize the game prevents others from making unfair decisions that might favor them.
The game ends after five turns.The winners are the players who achieve the minimum score for each stakeholder and do not exhaust any of the four resources.

Methodology
This work employs a case study methodology, a research strategy that investigates a phenomenon within its real-life context, focusing on the dynamics present within single settings [Yin, 2018]).Case studies are particularly useful in situations where a deep understanding of an intricate issue is required.They offer comprehensive details about the processes and outcomes of specific instances [Creswell and Creswell, 2018], making them invaluable for exploring new areas of research or when a holistic approach to understanding is needed [Yin, 2018]).
Several considerations justify the choice of a case study methodology to address research questions concerning the application of the Machinations framework for game balancing and the development of detailed models.Case studies can provide an in-depth understanding into the complex process of game balancing, incorporating elements like game mechanics, player interactions, and iterative design processes.This approach can detail the iterative adjustments, offering insights into the efficacy of model refinements and the impact of design changes on game balance and player engagement [Schell, 2008].Case studies offer an understanding of how visual tools like Machinations contribute to the game design process and how player interactivity influences game dynamics.By documenting the process and results of using Machinations for game balancing, this case study can provide foundational knowledge that aids in the development of new theories and models within the fields of game balancing and game design [Eisenhardt, 1989].Finally, the flexible nature of case study research enables researchers to explore innovative design methodologies, technologies, and alternative strategies, while adapting to challenges and findings, making necessary adjustments to their models, and evolving game design practices [Runeson and Höst, 2008].
This study is guided by two central research questions (RQs) that focus on applying the Machinations framework for game balancing and the development of detailed models exceeding those found in existing literature: • RQ1: How does the use of visual tools like Machinations contribute to the game balancing, particularly in the early stages of game development process?
• RQ2: What are the implications of player interaction on game balance and how can it be analyzed effectively?
The game balance is iteratively refined based on the insights gained from simulation results, ensuring that the game meets its educational objectives within the desired number of turns.The methodology of this case study approach unfolds through the following steps: Although this study does not directly involves human participants, nor does it collect or produce human data, we ensured that we respected ethical standards [Conselho Nacional de Saúde, 2022].While this case study did not involve human subjects, we recognized the importance of ethical oversight to maintain integrity, transparency, and respect for ethical principles within the research community.

Game Balancing Process
The balancing of ESG+P Game aims to ensure that players have the potential to attain the minimum scores required to satisfy the four company stakeholders after five turns.This number of turns is a key constraint for gameplay time, as Magalhães et al. [2023] estimated that five turns fit within a class period and allow mediating the content being taught in the game.
After designing the game, we used Machinations to simulate the mechanics in order to balance the game internal economy.We first built a model whose game elements produce, distribute, and consume resources randomly.We simulated the model in batch play cycles for game balancing.After each cycle, we adjusted the values and weights of game elements and their connections.
From the random model, we built a second model that simulates the players' decision-making when using strategies.Furthermore, we implemented simple scripts that describe the players' actions according to a strategy.We also simulated the interactive model in batch play cycles to fine-tune the game balancing.We then analyzed and compared the results of the two models.

Random Model Balancing
We used the free plan of Machinations online edition to build models in our first effort to balance the ESG+P Game.We set up Machinations elements to randomly produce, distribute, and consume resources in these models.The impact of randomness on a game mechanic is often related to the range and distribution of randomly generated numbers [Adams and Dormans, 2012].
First, we built three models that simulate the mechanics of each game step separately: Investment, Action, and Risk.These models use pools to store the ESG+P resources.Each pool initially contains 10 units (tokens).
The Investment Step model simulates the dice roll and the decision in which resources to invest (Figure 4).The model includes a pattern arrangement of elements representing each of the four resources.A source generates a random number of tokens and pools store these tokens.A gate is triggered twice to simulate the random selection of two resources.This gate also activates a counter that keeps track of the number of selections made.After the second selection, the counter is reset, and drains consume the remaining tokens in the pools.The Action Step model reuses the pattern arrangement of elements representing the four resources (Figure 5).First, a gate simulates picking a card and triggers one or two other gates.The Gain Resource gate randomly triggers a source that produces 1 to 6 tokens to store them in a pool (resource).The Cost Resource gate randomly triggers a drain that consumes 1 to 4 tokens from a resource.The random production and consumption of tokens simulate the variety of cards.The model abstracts that each card has two options.In the Risk step model (Figure 6), a gate simulates picking a card and triggers one of two gates.One gate generates an event, which in turn leads to a negative risk affecting a resource.The model assigns a higher probability to these events since negative risks are more likely to occur in a real scenario.Negative risks trigger a drain that consumes tokens from a resource.The other gate generates an event, which in turn leads to a positive risk affecting a resource.However, the model assigns a lower probability to this scenario.Positive risks trigger a source that produces tokens for a resource.
The model also accounts for player reactions to risk based on the amount invested in a specific resource.Thus, another drain may consume more tokens if the player has invested less than a threshold in the resource.Similarly, another source may produce more tokens if the player has invested more than a threshold in the resource.We then merged the models of the three game steps (Figures 4,5,6) and added mechanics to calculate and display stakeholder scores, as well as control the sequence of steps for each turn.Hence, we have built a comprehensive model that simulates the entire game (Figure 7).The weighted sum of resources invested by the player calculates the satisfaction of each stakeholder.Registers display the score of the four stakeholders.A gate triggers the steps deterministically at each turn, and a counter ends the simulation after five turns.The Availability of data and materials subsection indicates the URL address that provides the complete ESG+P Game model designed in this approach.
The random model (Figure 7) simplifies and restricts the mechanics of the Risk step since the events only affect the Environment resource.To simulate the effect of a risk on any of the four resources in the model, we should replicate the arrangement of sources and drains that produce the effects and reinforcements of risk for the other three resource pools, and include gates to distribute the effects and reinforcements randomly among the resources.So we decided to simplify the model to avoid overloading it with several elements that would hinder understanding.This simplification has minor impact on the simulation results because the Risk step only occurs in two out of five turns.An alternative approach could encapsulate the arrangement of elements that simulate the Risk Step mechanics within a component using Micro-Machinations [Van Rozen and Dormans, 2014], and replicate it in the random model.

Preliminary Results
After building the random model of the game (Figure 7), we began the balancing activities.The balancing of the ESG+P Game aims to ensure that stakeholders had reached the minimum scores -100, 90, 80, and 70 points -to win the game within five turns.
The model randomly simulated the decisions that players would commonly make rationally during gameplay.Game elements in this model produce, distribute, and consume varying amounts of resources at each step of every simulation.We conducted batch plays to analyze the game states and game internal economies, including the weights of stakeholder scores, the range of gains and costs in resources from Action and Event Cards, as well as reactions to risks.Thus, game balancing comprised fine-tuning these internal economies.Figure 8 shows the Machinations features that enable simulating the model in batch plays and graphically analyzing the progress of stakeholder scores.The simulation results indicated that players faced difficulties in achieving victory in this model since some stakeholders reached the minimum score within five turns, but never all four stakeholders.We established a criterion to determine a desirable game balance for this random model: players must achieve the game's objective in at least 40% of simulations.Hence, we had been adjusting the game internal economies until all stakeholders reached the minimum score in at least 40% of the batch plays, thereby allowing players to meet the victory condition.
We reviewed efforts targeting a 50% win rate [Herbrich et al., 2006; Huang et al., 2011; Demediuk et al., 2018].We consider a win rate of 40% appropriate for our study.We did not define the 40% figure based on precise calculations but rather on an estimate aligned with our educational objectives.A 40% win rate when playing randomly means the player loses more often than wins but can still score some points.Thus, a player who fails to grasp the content will experience less frustration, as their gameplay can be compared to random plays.Conversely, a win rate near 100% when playing randomly might encourage players, but it would make the game seem arbitrary, giving a false sense of learning.Our approach estimates that the chances of winning range between 40% and 100%, depending on the player's strategies.We aimed to mitigate player frustration while avoiding making the game purely random.
While fine-tuning the game's internal economies, we had been conducting simulations in cycles of 100 and 200 batch plays.Table 1 lists stakeholder satisfaction (#1 to #4) and victory rates for each set.Overall, stakeholder scores reached 100, 90, 80, and 70 points, respectively, in 52%, 78%, 91%, and 98% of the simulations.Additionally, we achieved that the combined scores of all four stakeholders met the victory criteria in 40% of the simulations.We considered this result acceptable for this stage of the game design process because players achieved victory despite the simulation allocating resources randomly, without considering possible player strategies in decision-making.Finally, Figure 9 shows the dispersion of stakeholder scores in these 900 runs.The chart illustrates the unpredictability of random decisions in achieving the game's objectives.Stakeholder #1, requiring the highest minimum score for satisfaction, achieved lower scores compared to the other stakeholders with lower requirements.The random model continued investing in lower-scoring stakeholders even after they had already been satisfied.Players would naturally avoid such game states because they would analyze stakeholder scores to decide which resource to invest in.

Interactive Model Balancing
Games with many random elements become difficult to predict.As a result, players often feel their actions have minimal impact on the gameplay [Adams and Dormans, 2012].Players have fun in games when they perceive their actions influence gameplay and results.Thus, players interact with the game and typically employ strategies to exercise their decision-making.
The results of the random model balancing suggested that the model could potentially achieve higher victory rates if the simulation considered player interaction.Dormans [2012] argues that every game study must know rules, interactivity, and gameplay.So we build a second model for the game based on the random model, considering player interaction with the game.Additionally, we defined simple players strategies to employ during gameplay.We used Machination standalone edition to build the interactive models and implement these strategies using the artificial player element.
The players interact with the game making decisions in the Investment and Action steps every turn.The players do not make decisions that affect the gameplay in the Risk step since they only write losses or gains in a resource on their company sheets based on the Event Card picked by the mediator.
In the Investment step, players interact with the game by selecting two resources to invest in.The game feedback includes increments in both the amount of the invested resource and the score of the stakeholders associated with this resource.
In the Action step, players interact with the game by selecting an Action card and choosing the option that reflects the action they will take to address the situation described by the card.The game feedback depends on the card option that the player selected.The chosen option also results in increasing both the amount of the invested resource and the score of the stakeholders associated with this resource.However, such option may cost other resource and decrease the score of the stakeholders associated with this other resource.
Players must assess the remaining points to achieve the minimum score for each stakeholder in these two steps.Ad-ditionally, players must manage the investment in each resource to prevent depletion and mitigate the negative risk impact of potential events in the Risk step.On the other hand, investing in a resource can reinforce gains resulting from a positive risk.
We proceeded the following guidelines to remove randomness from decision-making in the model and transform it into an interactive model based on player strategy [Adams and Dormans, 2012]: • Identify which player interaction has the greatest impact on achieving game objectives; • Start with the big change first; • Make one change at a time; • Test the resource distribution flow after each change; • Switch the elements' activation mode from automatic to interactive; • Define simple strategies the player can employ; and • Implement player strategies through scripts using the artificial player element.
We decided to incorporate player interaction into the mechanics of the Investment step because the game's internal economy provides information for players to decide which resources to invest in.Players are aware of the dice outcomes for each resource investment and understand the impact of these Investments on improving stakeholder satisfaction.Conversely, in the Action step, players become aware of the gain in one resource and the associated cost in another resource only after selecting a card and an option.
Hence, we modified the Investment step model (Figure 4) to simulate player interaction.We replaced the single gate that randomly simulated the selection of two resources for investment with four gates, each one selecting a die and triggering a specific pool to invest in a resource.We defined four player strategies to employ during gameplay: Round-Robin, Last-First, Reach Score, and Higher Dice.We included four artificial players in the model, each representing a different strategy.Moreover, we added a fifth artificial player responsible for selecting and activating one of these four strategies.This setting allows for easily changing the player's strategy after finishing each simulation.Figure 10 shows the interactive model of Investment step.
The artificial player is a Machinations element that allows for simulating player interaction with the model and automate player actions by virtually clicking on nodes [Dormans, 2012].Game designers can develop simple scripts to control other nodes in the model.A script comprises instructions that guide the artificial player's actions.These instructions may take two forms: direct commands and conditional statements.The script runs at each simulation step and stops once a command is executed [Adams and Dormans, 2012].
These scripts are simpler and less powerful compared to full-fledged scripting languages.Thus, game designers do not need programming expertise to create a script.Scripting features cannot create sophisticated artificial intelligence algorithms.Although artificial players cannot replace real players, they are useful to test simple strategies to observe how game mechanics behave [Adams and Dormans, 2012].
In the Round-Robin strategy, the script activates the four gates in sequential and circular order to invest in resources.
Game designers can easily implement this strategy using an artificial player.In the Last-First strategy, at each turn, the script activates the gate associated with the resource that has been least invested in so far.
In the Reach Score strategy, the script prioritizes investing in resources in the following order: Environment, Governance, Social and People to achieve the minimum score for each stakeholder.Thus, the script activates the gates associated with the resources that influence the satisfaction of prioritized stakeholders.This strategy prioritizes investing in Environment in this model because this resource represents the greatest weight in satisfying the highest scoring stakeholder and the Risk step can only result in losses on this resource.Governance is the second prioritized resource because it carries significant weight to satisfy the four stakeholders in this model compared to other resources.
We defined that once a prioritized resource accumulates 20 investment units, the script shifts focus to the next resource with the highest priority.This threshold represents twice the initial investment in each resource and ensures that players can achieve the minimum score required to satisfy each stakeholder.After initial simulations of the Reach Score strategy had yielded unsatisfactory results, we increased the Environment investment threshold to 25 units in order to enhance the victory rate.
In the Highest Dice strategy, the script dictates that the player should invest in the two resources associated with the highest dice roll outcomes at each turn.Then, the script activates the gates corresponding to these resources.Scripts 1 to 5 detail the instructions that these artificial players execute during the Investment step.Script 1 calls the Round-Robin strategy in this example.
Script 5: Highest Dice AP Finally, we updated the random model that simulated all the ESG+P Game mechanics (Figure 7), applying the same changes to those elements involved in the Investment step.So we replaced the gate that randomly chooses the resources to invest in with interactive gates, each investing in a specific resource, and incorporated those four artificial players that implemented player strategies.We switched the activation mode of gates that pick the Action and Event cards from automatic to interactive.We also replaced the die icon in these gates, which previously indicated random resource distribution, with a light bulb icon to depict that the distribution now considers the player's strategy.However, these gates still distribute resources randomly since only the artificial player can implement player strategies in Machinations.
Additionally, we removed the automatic gate that controls the triggering of the game's steps on each turn.The Step-Controller artificial player now performs this control.We replaced the Controller artificial player from the Investment step with this enhanced StepController.Script 6 lists the StepController instructions and calls the Last-First strategy in this example.We also added a pool to increment the steps from a source called IncStep, which is triggered by all interactive gates.The StepController script, in turn, checks the current game step to trigger the next step within each turn.Furthermore, we added another source called NextStep that increments the step interactively to handle potential script execution errors when no conditional statement is met in StepController.Figure 11 shows the interactive ESG+P Game model with all these improvements to simulate player strategies.

Final Results
After designing the interactive ESG+P Game model and implementing player strategies using artificial players, we had been simulating the model employing those four strategies: Round-Robin, Last-First, Reach Score, and Higher Dice.
The results of initial simulations using player strategies showed that we could enhance the balance of the interactive model.The stakeholders with lower priority far exceeded the minimum score to satisfy them.Thus, we adjust the gains and costs of the resources from the Action cards, and the probability distributions between negative and positive risks (Figure 11).We then achieved a balanced model that simulates the ESG+P Game with a desired level of confidence.
Next, we conducted cycles of 100 and 200 batch plays for each strategy.The simulation results for all strategies in the interactive model surpassed the results of the random model.These results also confirmed our expectations since players strategically analyze the game internal economy to achieve their objectives.Tables 2 to 5 present the simulation results for each strategy.These tables list stakeholders' satisfaction (#1 to #4) and victory rates for each batch play cycle.
Last-First yielded the worst results among these four player strategies.This strategy prioritizes the least-invested resources each turn and may distribute the resources evenly.Round-Robin achieved better results than Last-First, despite only investing resources sequentially and disregarding the  analysis of internal economy during the gameplay.
Reach Score prioritizes investment in Environmental and Governance resources, which carry the greatest weight in satisfying the two critical stakeholders in this model.Hence, this strategy increased the satisfaction of high-scoring stakeholders and, subsequently, the victory rate.However, these Highest Dice produces the best results among the four strategies.This strategy determines that the player must choose the two highest outcomes from the dice roll to invest in the respective resources.Thus, all stakeholders may achieve high scores.
Table 6 summarizes the balancing results of the random model and the interactive model for each strategy.There is an evident high correlation between the victory rate and highest-scoring stakeholder satisfaction.Even so, satisfying this stakeholder does not ensure success with the others stakeholders or overall victory.There were simulated gameplays in all strategies, which satisfied the highest scoring stakeholder but did not lead to victory.Furthermore, the Reach Score strategy prioritizes investing in resources to satisfy this stakeholder but did not yield the best results.Finally, we did not find a dominant strategy for the ESG+P Game as Reach Score and Highest Dice achieved similar results.Figure 12 shows the dispersion of stakeholder scores in 900 runs for each strategy.The boxplot charts clearly confirm the results in the Table 6 and highlight the characteristics from those strategies.
The Round-Robin chart shows greater dispersion in stakeholder scores.These results might have occurred because this strategy only invested in resources sequentially.This strategy did not analyze all internal economy in each turn, and did not care about resource depletion.
The Last-First strategy may select the lowest dice rolls to invest in a resource, as it prioritizes the least invested resources each turn.This guideline may explain why stakeholders scored lower with this strategy compared toRound Robin.It also accounts for the similar median and dispersion of stakeholders' score.
The Reach Score chart shows a similar median but a greater variation in score dispersion among resources.Governance had the lowest score among all resources across the four strategies.While the script could be enhanced, the challenge lies in determining the thresholds in the conditional statements to prioritize investments in each resource without impending investment in lower priority resources.
The Highest Dice chart shows that stakeholder satisfaction reached the highest scores, as well as the highest average scores.The median and dispersion of each stakeholder's score were similar, indicating this strategy distribute investments in the resources effectively.
Finally, outliers demonstrate that all strategies may yield unexpected results.The game interactive model mitigates these results by considering the player's strategy for investing in resources.But this model has not completely eliminated randomness.The mechanics of picking Action and Event Cards still produce and consume resources randomly.

Discussion
The first model of the ESG+P Game includes elements that randomly produce, distribute, and consume resources.The simulation results indicated that players won the game in at least 40% of executions.We consider this rate acceptable for a random model.However, although the model met the established criterion, we decided to build a second model since the first model oversimplified the game, and the randomness of the mechanics in the game steps did not accurately reflect the players' decisions in the gameplay.
The second model analyzes player interaction with the game and implements four strategies for gameplay.We found the interactive model results satisfactory because they demonstrate that player interaction and decision-making can be more decisive than randomness in achieving victory.The interactive model also provides feedback to players' decisions, ensuring that players learn from their own successes as well as their failures.
The analysis of player interaction suggests removing all random factors to identify dominant strategies and balance a game.However, the interactive model did not entirely eliminate game randomness, as the dice, Action cards, and Event cards still introduce randomness into the game mechanics.
We also analyzed the gameplay behavior when players employed different strategies.The results indicate that the Highest Dice strategy performed the best among the four strategies tested in the ESG+P Game.However, in this balanced game design, no dominant strategy emerged to achieve game objectives, as the Reach Score strategy also showed similar effectiveness.Both of these strategies analyze more aspects of the game's internal economy compared to the Last-First strategy.On the other hand, the Round-Robin strategy lacks analyzing any aspect of the internal economy.
The scope of player interaction analysis was confined to these four strategies.Players may discover additional strategies with a high probability of victory or may employ more than one strategy during gameplay.There might be more effective strategies that examine a broader range of game economies in order to make decisions.However, this work did not aim to predict all potential player decisions and strategies, nor did seek to identify the optimal strategy to win the game.In addition, the scripts for the artificial player restrict implementing player strategies.Future work could involve implementing a mixed strategy, allowing the artificial player to adapt its strategy based on an analysis of internal economy at each turn.
The resource weights to achieve stakeholders' score change for each company resource sheet (Figure 3).Thus, the random and interactive models of the ESG+P Game, as well as the simulation results, balanced only one company case within the game.Both models also abstract the complexity of actions and reactions when players choose an Action Card, and the effects of risks from Event Cards on Social, Governance, and People resources.
The simulation across those four strategies yielded minimal changes to the game's original mechanics.These results demonstrate that a well-designed game by experienced designers could meet specific requirements, such as classroom application time, with few adjustments.

Conclusion
This work validates a case study to balance the ESG+P Game, whose approach proposes beginning those balancing activities in the project stage [Mangeli et al., 2022], before developing an artifact (prototype).The game balancing continues into the next stages.In the Evaluation stage, game designers assess player enjoyment as they test the game.Our proposal contributes to enhancing the initial balancing stages and prevents player frustration and boredom during playtests.
This case study also highlights the efficacy of using visual computer simulations tools, such as those provided by Machinations, in a game development process.These tools can refine game design and balance even for non-digital games.Machinations facilitates the evaluation of game internal economy without necessitating extensive player testing.
Machinations contributed to enhancing the ESG+P Game design.Modeling and simulating the game mechanics separately deepened our understanding of the game dynamics, including player actions, potential deadlocks, and feedback mechanisms.Combining the mechanics allowed for building two models that simulated the entire game.The first model produces, distributes, and consumes resources randomly, while the second model analyzes player interaction and implements certain player strategies.
The simulation results of these models ensure that the players achieved game objectives in five rounds.We also ensured that reaching the scores and achieving the objectives in just one gameplay would not prove that the game was balanced.In addition, the majority of Machinations models in the literature are simple, but we combined the simple models from the ESG+P Game mechanics into a complex model to depict the entire game.Thus, this work answers RQ1 since demonstrates that Machinations is suitable and effective for simulating complex models in game balancing.
This work enhanced our previous case study [Silva et al., 2023], which did not consider analyzing player interaction and employing strategies for resource investment.The previous simulations of the random model achieved a victory rate of 40%.However, the interactive model simulations with player strategies increased victory rates significantly: 66% for the Round-Robin strategy, 58% for the Last-First strategy, 75% for the Reach Score strategy, and 81% for the Highest Dice strategy.Thus, this work answers RQ2 since the game balancing process demonstrated that using player strategies allowed for fine-tuning the game internal economy and doubled the victory rate compared to those results from the random model.
Both standalone and free online editions of Machinations have limitations that created some obstacles for simulating player interactivity and strategies.For instance, the free plan of the online edition lacks artificial player element.The Machinations staff suggest that game designers can replace the scripts instructions from artificial players with an arrangement of nodes e connections [Machinations, 2024].But this solution increases the size and complexity of the models.Although we had faced limitations with Machinations, we overcame them and successfully built two models that encompass all the game mechanics for simulating the entire game.
Artificial players allowed us to implement simple player strategies using scripts that accurately represented player in-teraction with the game.The scripts consist of commands and conditional statements that enable implementing player strategies without requiring advanced knowledge of programming languages.
Both the random and interactive models replicate the arrangement of Machinations elements for each ESG+P resource.For future work, we should explore the potential to encapsulate these elements into modules for reuse.This approach offers many benefits to game design, such as separating responsibilities, enhancing balancing, and scaling the project.Machinations staff state that online edition allows users to group elements and add them to their private library for reuse [Machinations, 2024].Additionally, we recommend simulating the game using Micro-Machinations [Van Rozen and Dormans, 2014], Rachinations [Almeida, 2015], or other tools to compare the results.
We might explore those tools to develop more intelligent strategies and compare the simulation results with those from Machinations.In addition, we intend to develop the ESG+P Game and test it in business course classrooms, compare the results with those from Machinations, and assess whether ongoing game balancing activities are necessary.
For future work, the game interface and mechanics could be further developed to reinforce the intended aesthetic experience of the game and enhance player immersion.Furthermore, since players' actions do not directly impact others, we could expand player agency by developing game mechanics that involve interference, competition, and collaboration.
Overall, the findings underscore the importance of computational simulations in game design and balancing.This work offers a foundation for future research in game development methodologies while recognizing the need for more sophisticated modeling tools to capture the complexity of player strategies and interactions.

•
Develop the game idea: Design the game concept to teach sustainable development in organizations; • Identify the research problem: Balance the game to ensure that players can achieve game objectives within the desired number of turns; • Develop the Theoretical Frameworks: Apply Machinations to model the game mechanics, adjust the game internal economies, and simulate the game dynamics; • Design the game model: Build separate models for each game step (Investment, Action, Risk) and combine them into an integrated model for the overall game; • Collect and analyze data: Execute batch simulation cycles using the integrated model to adjust and refine the game balance, and analyze simulation results; • Implement strategies: Based on simulation results, develop strategies to explore the effect of player interaction and decision-making on game balance; and • Evaluate the game balancing: Analyze the effectiveness of balancing efforts and the viability of player strategies in achieving game objectives.

Figure 4 .
Figure 4. Model that randomly simulates the Investment step's mechanics

Figure 5 .
Figure 5. Model that randomly simulates the Action step's mechanics

Figure 6 .
Figure 6.Model that randomly simulates the Risk step's mechanics

Figure 7 .
Figure 7. Random model simulating all the ESG+P Game mechanics

Figure 8 .
Figure 8. Progress of stakeholder scores in 100 batch plays

Figure 9 .
Figure 9. Analysis of stakeholder scores in 100 batch plays

Figure 10 .
Figure 10.Interactive model simulating the Investment step's mechanics

Figure 11 .
Figure 11.Interactive model simulating all the ESG+P Game mechanics with player strategies

Figure 12 .
Figure 12. Analysis of stakeholder scores on player strategies

Table 2 .
Round-Robin strategy results

Table 3 .
Last-First strategy results

Table 4 .
Reach Score strategy results

Table 5 .
Highest Dice strategy results

Table 6 .
Analysis of strategy-based results