Design of a Technological Tool for Psychological-Sport Training Applied to Tactical Education in Basketball ()
1. Introduction
In recent decades, sport in Mexico has experienced uneven development, despite having world-class athletes in various disciplines. Basketball, specifically, is a sport with many practitioners nationwide; however, no substantial improvement is perceived that is reflected in a sustained increase in competitive level. One area of opportunity lies in the limited incorporation of technology as a tool for analysis and strategic planning, a fundamental component in high-level competition [1].
In everyday practice, both at the amateur and professional levels, coaches often rely on traditional methods such as diagrams on a whiteboard and verbal explanations to convey tactics. While these methods are valuable, they often prove insufficient to communicate the dynamic complexity of a play and, crucially, they omit the influence of determining psychological factors on athlete performance. Emotions, such as confidence, fear, or anxiety, play a decisive role in decision-making under pressure and can significantly alter the outcome of an action [2].
The OCC Cognitive Theory of Emotions is an approach proposed by Ortony, Clore, and Collins [3] which assumes that emotions do not emerge as arbitrary reactions, but rather as the result of cognitive appraisals that the individual makes about their environment. In this perspective, an emotion appears when the person evaluates events, actions of agents, and objects considering their goals, norms, and attitudes. Due to its systematic and formalizable structure, OCC has been widely used in artificial intelligence and in multi-agent systems, since it allows psychological processes to be translated with relative clarity into operable computational rules [4]-[6]. Under this framework, cognitive appraisal is organized into three major routes that guide which emotion may emerge and why.
In the first place, there are goal-based appraisals (consequences of events) where emotion arises by judging whether an event supports or hinders a relevant goal; when the event facilitates achievement, positive emotions tend to appear (for example, joy), and when it blocks it, negative emotions (for example, sadness or frustration). In a sports context, this logic is especially pertinent because each possession, decision, and partial result can be read as progress or setback with respect to the competitive objective.
In the second place, there are norm-based appraisals (actions of agents) where emotion derives from the judgment of what a person (oneself or others) does with respect to internalized social or moral standards; an action considered “acceptable” may elicit pride, while one evaluated as “reprehensible” may provoke guilt or shame. In basketball, this is expressed when the player interprets their own performance or that of their teammates as “correct” or “incorrect” according to internal team rules, role expectations, or criteria of responsibility.
In the third place, attitude-based appraisals appear (aspects of objects) where emotions originate in attraction or rejection toward intrinsic characteristics of an object, person, or alternative course of action, which generates liking or disliking; in the model, this is reflected, for example, in the player’s preference for certain types of plays over others.
Now, OCC Theory not only classifies the origin of emotion; it also explains why an emotion can be felt “more” or “less” intensely. Intensity depends on specific variables that the theory organizes into two sets [3] [7]. On the one hand, central variables determine an intensity linked to one of the three types of emotion, while global variables modulate the intensity of any of these three types of emotion (see Table 1 and Table 2).
Table 1. Central variables.
Central Variable |
Valuation Type |
Description |
Basketball Example |
Desirability |
Events |
Degree to which an event is perceived as favorable or unfavorable for one’s goals |
Making a decisive shot (high desirability) |
Plausibility |
Actions |
Degree to which an action conforms to or violates
normative standards |
Executing a rehearsed play correctly
(high plausibility) |
Attractiveness potential |
Objects |
Affective reaction toward characteristics of an object |
Preference for a specific play (high attractiveness) |
Table 2. Global variables.
Global Variable |
Modulation Type |
Description |
Basketball Example |
Sense of reality |
Global (applies to any emotion) |
The more vivid and real an event seems, the stronger the emotional response will be. |
In an official game (with a crowd and a real scoreboard), emotions are more intense than in training. |
Proximity |
Global (applies to any emotion) |
Psychological or temporal closeness to the event intensifies the emotion. |
A last-second shot tends to generate more anxiety/pressure than a shot at the beginning of the game. |
Unexpectedness quality |
Global (applies to any emotion) |
Surprising events tend to elicit more intense emotions by reducing the sense of control. |
An unexpected steal or a surprise three-pointer by the opponent can trigger stronger frustration/alarm. |
Arousal |
Global (applies to any emotion) |
The level of pre-existing physiological activation can amplify the intensity of a subsequent emotion. |
After a high-intensity sequence (defensive sprint, fast break), a foul or an immediate mistake can feel emotionally more intense. |
In this architecture, emotions are also influenced by the type of goals and objectives involved. They function as central elements of the cognitive macrostructure and are crucial for understanding the player’s behavior [3] [6]. In functional terms, one can distinguish active pursuit goals, in which the individual acts proactively to achieve an outcome (in basketball, scoring as the main goal, with actions such as getting open, passing, setting up the shot, or following trajectories); interest goals, oriented toward preserving the desired state or avoiding losses without full control of the outcome (for example, maintaining concentration in a “clutch” moment, where success is desired but the result does not depend exclusively on a single player).
Finally, there are filler goals, cyclical in nature and frequently routine or physiological, such as hydrating or catching one’s breath between sequences of play. This goal framework not only makes it possible to classify emotions, but also to move toward their dynamic quantification and interaction, which makes it especially suitable for computational implementation in simulations.
Because of the above, the importance of incorporating these psychological and cognitive variables emerges, since they have a significant impact on performance during the game. Evidence of this is the study by Sáenz-López, Duque-Ramos, Almagro-Torres, & Conde-García [1], who identified recurrence of factors such as leadership, emotional state, self-regulation, confidence, and anxiety, and their relationship with performance. In addition, it has been pointed out that training emotional skills can favor learning and performance in both players and coaches.
In parallel, other studies show a growing interest in employing multi-agent systems and cognitive models to simulate complex scenarios in diverse domains, from ethology to sport. The simulation of the behavior of a fighter pilot [8] [9] and the modeling of interactions between prey and predator birds [10] have shown the feasibility of using OCC to represent how emotional state influences the decision-making of autonomous agents.
Likewise, other works have explored goal dynamics and internal motivations in multi-agent systems, such as the simulation of hierarchical societies [10] [11] or the representation of hierarchical ascent in chimpanzees [12] [13]. In the sports domain, the simulation of a soccer game based on a reactive architecture [14] [15] offers a useful parallel, although without placing emotions at the center as the present proposal does. Finally, narratives from elite athletes like Jaylen Brown (Boston Celtics) have emphasized that the development of his mindset and the ability to control emotions have played a more determining role in his career than mere physical refinement [2] [16].
From this logic, managing negative emotions (fear, anxiety) and enhancing functional emotions (joy, determination), together with skills such as “short memory” to recover from mistakes and not remain captured by external pressure, constitute key psychological competencies that this project seeks to model and explore through simulation.
Based on the previous context, the proposal arises to develop a basketball play design and simulation system, whose purpose is to offer a technological support tool that integrates the strategic and psychological (emotional) dimension. Therefore, the central objective of this project was to build the prototype of a system that enables the design and simulation of plays in a desktop application, facilitating advanced visualization and more detailed analysis of them. This analysis is not limited to the players’ physical movement, since it incorporates a computational model of emotions to study how this affects decision-making and, ultimately, the effectiveness of execution.
This project is justified not only by the need to incorporate technology into Mexican basketball but also by its innovative approach in integrating a cognitive model of emotions to predict player behavior, by merging the foundations of cognitive psychology. This system represents an effort to develop more complete and realistic tools for teaching and sports training.
2. Methodology: System Design and Development
The system’s development was approached through a modular architecture implemented on the Processing 4.0 platform, a Java-based development environment ideal for creating visual and interactive prototypes [17]. The system consists of five interconnected modules that operate sequentially to transform input data into a tactical simulation with emotional impact, as illustrated in Figure 1.
Figure 1. System modules and their interactions.
2.1. Input Data Capture Module
This module is the user’s initial interface with the system. Its function is to collect and normalize the parameters that will feed the simulation. The main components are: selection of a predefined play, where the user chooses from a catalog of base plays (e.g., “Pick and Roll,” “Offensive Triangle”); configuration of the emotional state, where through a dedicated interface the user selects the player’s initial emotions (e.g., confidence, fear, joy) that will affect execution; and finally the selection of external factors, where the presence of contextual factors is captured, such as “prior training” or whether the play occurs in a “decisive moment” (clutch).
In the current version of the prototype, emotions are represented at runtime through a binary activation encoding, in which each affective state is initialized as either active (1) or inactive (0), based on the user’s selection in the configuration menu. Although the conceptual design of the system considered the possibility of parameterizing emotions through percentages or intensity levels, the implementation reported in this study does not yet provide a continuous input scale for the user; therefore, the initial emotional configuration is limited to the presence or absence of each emotion. This decision made it possible to simplify user interaction with the system and to keep the combinatorial range of scenarios under control during the prototype’s conceptual validation.
2.2. Play Schematisation Module
Once the data are captured, this module converts them into a structured model for the simulation. The process consists of mapping the selected play with its initial positions (x, y) on the court and integrating the emotional values as “weights” that will modify actions. For this, a causal matrix is used that represents the relationships of direct and indirect influence among the different emotions and their impact on the probability of success in achieving the goals.
2.3. Environment and Court Design Module
This module is responsible for rendering the playing space and the static and dynamic elements. The main actions are: 2D representation: an isometric basketball court is drawn with simplified regulation dimensions (28 × 15 m). Visual elements: players are represented as sprites (2D images) with visual indicators (color/shape) that denote their role. Projected trajectories: movement routes are visualized as continuous lines, providing a clear guide for the play to be executed.
2.4. Emotions Module: The Affective-Cognitive Model
This is the core of the system. Its objective is to integrate OCC Theory to model how the shooter’s emotions and external factors affect the probability of scoring. The construction of this affective-cognitive structure is grounded in the following elements.
2.4.1. Mental Models of Emotions
The mental model technique is used to represent the influence of each emotion in the system. A mental model is a conditional representation of the type “If (Condition) Then (Consequences),” which makes it possible to operationalize the causal relationships between affective states and behaviors. Table 3 below shows the mental models implemented for each of the eight basic emotions.
2.4.2. Affective-Motivational Appraisal Structure
A hierarchical goal structure was designed to represent the player’s cognitive process, from the cyclical goal of “setting up the play” to the final goal of “scoring” (Figure 2). This structure, inspired by the works of Laureano-Cruces [6] [13], connects affective states with active pursuit goals (e.g., executing a rehearsed play) and interest goals (e.g., succeeding in a critical moment).
The structure is organized as follows:
• Affective States (Input): Fear, Anxiety, Confidence, Anger, Frustration, Disappointment, Joy, Sadness.
• Cognitive Factor (Input): Prior training (the player’s experience and practice).
• Active Pursuit Goals (Output): Probability of success of Plays A, B, and C.
• Interest Goal (Output): Likelihood of success in a Critical Moment (Clutch).
Table 3. Mental models.
Mental model |
Emotion/state (condition) |
Effects on other variables |
Impact on probability of success |
Expected behavioral effect |
1 |
Fear (if present) |
↑ Anxiety; ↓ Confidence |
↓ Success in all plays |
Loss of concentration; tendency to avoid risks |
2 |
Anxiety (if present) |
↑ Fear; ↓ Confidence |
↓ Success in all plays |
Rushed decisions; unforced errors |
3 |
Confidence
(if present) |
↓ Fear; ↓ Anxiety |
↑ Success (especially in Play A) |
Calculated risks; greater precision |
4 |
Anger (if present) |
(Ambivalent) may ↑/↓ effectiveness; ↑ aggressiveness |
Variable/ambivalent
depending on context |
Greater physical intensity; possible loss of tactical control |
5 |
Frustration
(if present) |
↑ Anger; ↓ Confidence |
↓ Success in all plays |
Forcing shots; abandoning the tactical plan |
6 |
Disappointment
(if present) |
↑ Sadness; ↓ Motivation |
↓ Success in all plays |
Loss of intensity; lower commitment to the play |
7 |
Joy (if present) |
↑ Confidence; ↓ Anxiety |
↑ Success (especially in Play A) |
Fluid movement; greater tactical creativity |
8 |
Sadness (if present) |
↑ Disappointment; ↓ Joy and ↓ Confidence |
↓ Success in all plays |
Slow movements; low reactivity |
![]()
Figure 2. Affective-motivational appraisal structure connecting affective states with gameplay goals.
2.4.3. Macrostructure of Emotional Influence
The influence of each affective state is quantified through a macrostructure of emotional influence, a table that assigns numerical weights to the impact of each emotion on the different plays, based on its perceived desirability for the goal. Table 4 presents the complete macrostructure implemented in the system.
Table 4. Macrostructure system.
Affective State |
Desirability |
Impact Play A |
Impact Play B |
Impact Play C |
Effect on Gameplay |
Confidence |
High (Desirable) |
+1 |
+0.5 |
+0.5 |
Calculated risks |
Joy |
Moderate (Desirable) |
+1 |
+0.5 |
+0.25 |
Fluidity |
Anger |
Neutral to Positive |
+0.5 |
+0.5 |
+0.25 |
Aggressiveness/
Motivation |
Fear |
Low (Undesirable) |
−1 |
−1 |
−1 |
Failure, loss of concentration |
Anxiety |
Low (Undesirable) |
−1 |
−1 |
−1 |
Failure, loss of concentration |
Frustration |
Low (Undesirable) |
−1 |
−1 |
−1 |
Forcing shots |
Sadness |
Low (Undesirable) |
−1 |
−1 |
−1 |
Slow movements |
Disappointment |
Low (Undesirable) |
−1 |
−1 |
−1 |
Loss of motivation |
In addition to emotions, the system incorporates two external factors that modify the probability of success. One is prior training, which represents the player’s experience and practice. When active, it adds a positive bonus to effectiveness, simulating the automation of movements and the confidence derived from repetition. The other is the Decisive Moment (Clutch), which represents the pressure of a critical moment in the game. Its effect is ambivalent: it can enhance the performance of players with high confidence or degrade it in those with predominantly negative emotional states.
2.4.4. Formalization of the Success Probability Calculation
To make explicit the transformation of emotional weights and external factors into percentage-point changes, the final probability of success for a play
was calculated using the following expression:
where
is the final probability of success of play
;
is the baseline probability assigned to each play
;
is the weight of emotion
on play
, according to the emotional influence macrostructure;
indicates whether the emotion is active
or inactive
;
represents the presence of prior training
; and
represents the effect of the decisive moment
. In this implementation, one unit of emotional weight is equivalent to 10 percentage points. When several emotions are simultaneously active, their contributions are added in an additive manner. The function
constrains the result to the interval from 0% to 100%.
Based on this formulation, the emotional contribution is first calculated as a weighted sum of the active affective states; contextual bonuses are then added; and, finally, the resulting value is normalized. This procedure makes it possible to represent the operational logic of the system explicitly, integrating in a single equation the baseline probability of the play, the influence of the player’s emotional configuration, and the effect of relevant contextual factors such as prior training and situational pressure.
To illustrate this, consider a Play C, whose baseline probability is 40%, under a scenario in which the emotions fear and frustration are active, there is no prior training, and the shot occurs in an unfavorable decisive moment. According to the implemented macrostructure, for Play C we have
and
. In this case:
,
,
, and
. Substituting into the equation:
First, the emotional contribution is obtained:
Next, the contribution of prior training is:
and the contribution of the unfavorable decisive moment is:
Therefore, the intermediate value before normalization is:
Finally, by applying the normalization function:
Consequently, this configuration produces a final normalized probability of 15%, which corresponds to the category “Missed” within the feedback system. In this way, the equation makes it possible to reproduce transparently the calculation performed by the system, showing how the final probability depends on the interaction among the baseline difficulty of the play, the combination of active emotions, and the external contextual factors.
2.5. Simulation Module
Finally, this module integrates all components to execute and visualize the play. The technical implementation of the simulation is grounded in several algorithms and animation techniques.
2.5.1. Parametric Trajectory System
To animate player movement, a parametric trajectory system based on segmented linear interpolation was implemented. Each trajectory is defined as a sequence of control points (waypoints) that the player must traverse. The position at any instant is calculated using Processing’s lerp () function, which linearly interpolates between two consecutive points:
position(t) = initial_point + t × (final_point − initial_point)
where t is a normalized parameter in the range [0, 1] that represents the progress of the movement.
2.5.2. Ball Animation
Ball passes are plotted using quadratic Bézier curves to simulate a realistic parabolic trajectory that emulates the effect of gravity. The curve is defined by three points: the origin point (the passer’s hand), an elevated control point (maximum height of the pass), and the destination point (the receiver’s hand). This technique produces natural and visually coherent motion.
2.5.3. Temporal Synchronization
A normalized time system [8] ensures synchronization of all movements. The total duration of each play is predefined (3 - 4.5 seconds, depending on the play), and the progress of each element (players, ball) is calculated as a fraction of this total time. This ensures that passes occur at the precise moment and that players reach their positions in a coordinated manner.
2.5.4. Emotional Engine: System of Equations
In the prototype implementation, the affective-cognitive dynamics were modeled as a discrete iterative propagation system over a state vector x in [0, 1] 13, whose components correspond, in this order, to fear, anxiety, confidence, anger, frustration, disappointment, joy, sadness, prior training, decisive moment, Play A, Play B, and Play C. The state update at each step k was calculated using the following expressions:
where C is a causal matrix of dimension 13 × 13, and sigma(.) is a logistic function applied component-wise to normalize the values to the interval [0, 1]. This formulation corresponds to the procedure implemented in the prototype.
The coefficients of the causal matrix were established from the mental models and the emotional influence macrostructure. Operationally, the sign of each coefficient represents the direction of the influence between variables (+ facilitation, - inhibition), whereas its magnitude expresses the relative strength of that influence. These weights were subsequently instantiated and heuristically adjusted during implementation to preserve the causal coherence of the model and to obtain interpretable dynamic ranges during simulation. For example, confidence reduces fear and anxiety (−0.6, −0.7), increases joy (+0.8), and favors the play goals A, B, and C (+1.0, +0.6, +0.3); similarly, prior training and the decisive moment reinforce confidence (+0.9), joy (+0.8), and the play goals (+0.5, +0.3, +0.2). The full coefficient matrix is reported in Table 5.
Table 5. Causal matrix.
|
Fear |
Anxiety |
Confidence |
Anger |
Frustration |
Disappointment |
Joy |
Sadness |
Prior training |
Successful decisive moment |
Play A (short distance) |
Play B (medium distance) |
Play C (long distance) |
Fear |
0 |
1 |
−1 |
0.5 |
0.5 |
0 |
−1 |
0.5 |
0 |
−1 |
−1 |
−1 |
−1 |
Anxiety |
1 |
0 |
−1 |
0.5 |
1 |
0 |
−1 |
0.5 |
0 |
−1 |
−1 |
−1 |
−1 |
Confidence |
−1 |
−1 |
0 |
−1 |
−1 |
0 |
1 |
−1 |
0 |
1 |
1 |
0.5 |
0.5 |
Anger |
−1 |
0.5 |
0.5 |
0 |
1 |
0 |
−1 |
−1 |
0 |
0.5 |
0.5 |
0.5 |
0.25 |
Frustration |
1 |
1 |
−1 |
1 |
0 |
0 |
−1 |
1 |
0 |
−1 |
−1 |
−1 |
−1 |
Disappointment |
1 |
1 |
−1 |
1 |
1 |
0 |
−1 |
1 |
0 |
−1 |
−1 |
−1 |
−1 |
Joy |
−1 |
−1 |
1 |
−1 |
−1 |
0 |
0 |
−1 |
0 |
0.5 |
1 |
0.5 |
0.25 |
Sadness |
1 |
1 |
−1 |
−1 |
1 |
0 |
−1 |
0 |
0 |
−1 |
−1 |
−1 |
−1 |
Prior training |
−1 |
−1 |
1 |
−1 |
−1 |
0 |
1 |
−1 |
0 |
1 |
1 |
0.5 |
0.5 |
Successful decisive moment |
1 |
1 |
0.5 |
−1 |
−1 |
0 |
0 |
0 |
0 |
0 |
1 |
0.5 |
0.25 |
Play A |
−1 |
−1 |
1 |
−1 |
−1 |
−1 |
1 |
−1 |
0 |
1 |
0 |
0 |
0 |
Play B |
−1 |
−1 |
1 |
−1 |
−1 |
−1 |
1 |
−1 |
0 |
1 |
0 |
0 |
0 |
Play C |
−1 |
−1 |
1 |
−1 |
−1 |
−1 |
1 |
−1 |
0 |
1 |
0 |
0 |
0 |
2.5.5. Reproducibility and Execution Environment
To facilitate the reproducibility of the prototype, the minimum execution requirements and the way in which the main system components are configured are specified below. The prototype was developed as a desktop application in Processing 4.0, within a modular Java-based architecture oriented toward interactive visual simulation. Accordingly, replicating the execution of the system requires a desktop environment compatible with Processing 4.0 [64-bit Windows 11], as well as access to the full source code of the project and to the associated graphical resources used for representing the court, players, and ball. In the documented version of the prototype, no specialized external libraries were required beyond the standard Processing/Java environment capabilities used for animation, data structures, and 2D rendering.
Plays are configured internally through in-memory structures belonging to the simulation class. Operationally, each play is defined by: 1) a set of offensive trajectories expressed as sequences of control points (PVector), 2) a sequence of passes, 3) the identification of the shooting player, and (d) a total execution duration. These components are assigned through specific configuration methods such as agregarPuntoTrayectoria(), agregarPase(), setTirador(), and setDuracion(). Therefore, the tactical configuration of the system does not depend on external plain-text files or databases, but rather on internal objects and structures instantiated within the program.
In the case of the editor mode, the user can design a play by modifying trajectories and sequences directly through the interface. Once the design is completed, confirmation by pressing the Enter key causes the play to be stored in the internal slot corresponding to Play 1. In the prototype’s base documentation, no formal persistent serialization mechanism into external files (for example, JSON, CSV, or XML) is reported for edited plays; consequently, replicating a specific configuration requires preserving the corresponding source code or explicitly documenting the trajectory points, the pass sequence, the shooting player, and the duration used in each experimental scenario.
Emotional parameters are configured from the emotional configuration menu, where the user selects the initial affective states that will be active during the simulation, as well as the relevant external factors, including prior training and decisive moment. These selections feed the initial state vector of the affective-cognitive system and are subsequently integrated with the causal matrix used by the emotional engine. Additionally, the coefficients of that matrix can be manually adjusted from the internal matrix editor, where each cell is modified in discrete steps and the changes are applied directly to the in-memory matrix. Thus, to replicate an experimental condition exactly, another researcher must specify: 1) the combination of active emotions, 2) the presence or absence of external factors, 3) the causal matrix used—default or edited—and 4) the play executed with its corresponding tactical configuration.
To promote replicability across laboratories, it is recommended that the source code be accompanied by a supplementary table reporting, for each analyzed play, the initial coordinates, trajectory points, pass sequence, shooting player, total duration, active emotions, external factors, and the version of the causal matrix used. In this way, the experimental configuration can be reconstructed unambiguously even if the current implementation does not automatically export these parameters to an external file.
3. Results
The result of the project is a functional prototype of the “Basketball Play Design and Simulation System.” When the application is executed, it presents a main interface that centralizes the information and control of the simulation (Figure 3).
Figure 3. System start screen with the emotional configuration panel (left) and the help menu (right).
3.1. Usage Flow and Emotional Configuration
The system’s workflow begins with configuring the player’s emotional state. By pressing the “C” key, the user accesses the emotional configuration menu (Figure 4), where they can select the basic emotions (e.g., Fear, Confidence, Joy) and the external factors (Prior Training, Decisive Moment) that will be active during the simulation. The system applies a validation logic that prevents the simultaneous selection of opposing emotions (e.g., Joy and Sadness), ensuring the coherence of the affective state.
Figure 4. Initial emotional configuration menu where the user selects emotions and external factors.
When the user simultaneously selects multiple non-opposed emotions, the system retains all active emotions and combines their effects additively during the effectiveness calculation. Operationally, the weights associated with each active emotion in the emotional influence macrostructure are summed to obtain a total emotional modifier, which is subsequently integrated with the external factors and normalized to estimate the final probability of success. Thus, combinations such as confidence and joy, or fear and frustration, are treated as compound emotional configurations, provided that they do not violate the affective coherence constraints defined by the system’s validation logic.
Once the configuration is applied, the “Emotional Configuration” panel on the main screen is updated to display the active states, providing a constant visual reference of the psychological scenario under which the play will be executed.
3.2. Predefined Plays and Their Characteristics
The system includes a catalog of three predefined plays, each with distinct tactical characteristics and difficulty levels. Table 4 summarizes the specifications of each play.
Play A (Pick and Roll, key 1) represents the most direct play and has the highest base probability of success due to proximity to the rim. It involves a screen (pick) followed by a move toward the basket (roll).
Play B (Offensive Triangle, key 2) requires greater coordination and execution time. The sequence of two passes increases complexity, but it allows the creation of space.
Play C (Long-Distance Shot, key 3) is the highest-risk play and has the lowest base probability of success. However, it offers three points if made.
The baseline probabilities assigned to the predefined plays (A = 70%, B = 55%, and C = 40%) were defined as initial prototype design parameters with the aim of preserving a plausible ordinal gradation of tactical difficulty and probability of success. This decision was supported by three convergent criteria. First, the literature shows that shooting accuracy systematically decreases as shooting distance increases, which justifies a higher baseline probability for actions closer to the basket and a lower one for long-range shots [18].
Second, recent evidence indicates that physical and mental load impairs shooting accuracy, with a particularly adverse effect on longer-distance shots, which further supports modeling Play C as the condition with the lowest expected success [19]. Third, in the prototype design, Play B was placed at an intermediate level because, although it does not correspond to as distant a shot as Play C, it requires a tactical sequence involving greater coordination and execution time than Play A; therefore, it was considered methodologically appropriate to assign it an intermediate baseline probability. Consequently, the 70–55–40 scale (Play A) should not be interpreted as an exact observational estimate of shooting percentage in real competition, but rather as a heuristic and ordered parameterization that represents plausible differences among close-range finishing, an intermediate offensive sequence, and a long-range shot.
3.3. Effectiveness Calculation and Outcome Prediction
With the emotional scenario established, the user can execute one of the three predefined plays using the number keys. When a play starts, the system animates the movement of players and the ball along their predefined trajectories. Simultaneously, the affective-cognitive model calculates the probability of shot success in real time.
The effectiveness calculation follows the algorithm below:
Base Probability: an initial probability is assigned according to the type of play (A: 70%, B: 55%, C: 40%).
Emotional Modifiers: the weights from the emotional influence macrostructure are summed for each active emotion. In this implementation, the term “active emotion” refers to an emotion that is selected in a binary manner by the user at the beginning of the simulation; when multiple non-opposed emotions are active, their weights are aggregated linearly in the calculation of the emotional modifier.
External Bonuses: bonuses are added for prior training (+10%) and a successful decisive moment (+5% if there is confidence, −5% if there is fear/anxiety).
Normalization: the result is normalized to the range [0%, 100%].
The result of this calculation is presented at the end of the simulation, classifying the shot into one of four possible categories, each with clear visual feedback (Table 6).
Table 6. Classification of results according to the calculated probability of success.
Result |
Probability Range |
Feedback Color |
Interpretation |
Scored |
≥80% |
Green |
Full success, the shot goes into the basket |
Close |
60% - 79% |
Light green |
Nearly made it, the ball brushes the basket |
Rimmed |
40% - 59% |
Yellow |
Inaccurate shot, hits the rim without going in |
Missed |
<40% |
Red |
Complete miss, the ball does not get close |
Figure 5 shows an example of a simulation result in which a favorable emotional configuration (high confidence) leads to a high probability of success and the outcome “Scored.”
The modifiers associated with prior training and decisive moment were also established as heuristic adjustments of moderate magnitude within the prototype. Prior training was set at +10 percentage points because the literature indicates that practice and specific training can improve shooting accuracy, and that training under anxiety conditions contributes to maintaining perceptual-motor performance in pressure situations [20] [21].
Figure 5. Example of the results screen after a simulation, showing a high probability of success.
In contrast, the decisive moment was represented by a smaller bidirectional adjustment (±5 percentage points), since competitive pressure does not operate as a uniform determinant but rather as a contextual modulator whose direction depends on the player’s emotional state and cognitive control. In basketball shooting studies, situations involving greater stress or situational pressure have been associated with performance deterioration, increased anxiety, and a significant decrease in shooting performance [22] [23]. For this reason, in this first version of the system, prior training was modeled as a relatively more stable facilitator of performance, whereas the decisive moment was modeled as a lower-magnitude modulator, capable of either enhancing or impairing the outcome depending on the active affective-cognitive configuration.
Consequently, the baseline probabilities and the magnitude of the contextual modifiers should be interpreted as design assumptions informed by the literature, the tactical logic of the prototype, and the internal conceptual validation, rather than as empirically calibrated coefficients derived from an observational database of shooting events.
3.4. Test Scenarios and Conceptual Validation
To validate the coherence of the model, systematic tests were carried out by varying the emotional configurations. Table 7 presents examples of test scenarios and their predicted results.
Table 7. Test scenarios and results predicted by the system.
Scenario |
Active Emotions |
External Factors |
Play |
Predicted Result |
Optimal |
Confidence, Joy |
Training |
A |
Scored (92%) |
Favorable |
Confidence |
None |
B |
Close (68%) |
Neutral |
None |
None |
A |
Close (70%) |
Adverse |
Anxiety |
Decisive Moment |
C |
Missed (28%) |
Critical |
Fear, Frustration |
Decisive Moment |
C |
Missed (15%) |
The quantitative results observed across the five documented scenarios show a systematic correspondence between the initial emotional configuration and the final probability predicted by the model. Combinations involving positive emotions and prior training produced probabilities above the baseline of the corresponding play, whereas configurations dominated by fear, anxiety, or frustration, especially under a decisive-moment condition, markedly reduced final effectiveness. This pattern is consistent with the internal logic of the system and supports, at the proof-of-concept level, the prototype’s ability to discriminate among emotionally favorable, neutral, and adverse scenarios.
3.5. Editor Mode
Additionally, the system includes an “Editor Mode” (Figure 6), an optional functionality that allows advanced users to design their own plays. In this mode, it is possible to draw new trajectories for each player, assign who starts with the ball, and specify who will be the final shooter. This feature expands the system’s capabilities beyond predefined plays, opening space for tactical creativity and experimentation.
In the current version, the prototype has been validated primarily at a functional level through the execution of simulated scenarios and the internal verification of coherence among emotional configuration, external factors, and tactical outcome. However, the weights of the emotional macrostructure and the baseline probability parameters have not yet been calibrated using empirical data from real executions or independent expert judgments; therefore, the quantitative validation of the model should be regarded as a subsequent phase of the project.
Figure 6. Editor Mode interface, allowing the user to define trajectories and roles to create customized plays.
4. Discussion
The present prototype demonstrates the feasibility of integrating affective-cognitive models into sports simulation tools to create richer and more realistic analysis environments. The system not only visually represents the execution of a basketball play, but, crucially, translates an abstract and complex concept such as “emotional state” into a quantifiable variable that directly impacts the outcome. This approach represents a significant advance over traditional tactical analysis tools, which often remain limited to the purely physical and strategic dimensions of the game.
From a theoretical perspective, the project validates the applicability of OCC theory as a robust computational framework for modeling emotions in a domain-specific context such as sport. By structuring emotions as a function of goals, norms, and attitudes, and by defining their interaction through a causal matrix and mental models, it was possible to build a system that exhibits coherent and predictable behavior. Simulating how confidence can mitigate the effect of pressure, or how frustration can lead to suboptimal decision-making, offers a tangible platform to explore dynamics that coaches and sport psychologists address constantly.
The results obtained are consistent with the literature in sport psychology. The systematic study by Sáenz-López et al. [1] identified that confidence and emotional self-regulation are determining factors in basketball performance, which is reflected in the developed model, where confidence acts as a booster of the probability of success. Similarly, anxiety and fear, identified as performance inhibitors in the literature [2] [16], produce in our system a consistent decrease in effectiveness.
Compared with previous work in sports simulation, this project contributes a dimension that has been little explored: the explicit integration of an emotional model. Soccer simulations [14] [15], although pioneering in the use of reactive multi-agent architectures, did not incorporate an affective model that modulated agents’ behavior. Our system extends this approach by adding a cognitive-emotional layer that makes it possible to simulate not only “what” the player does, but “how they feel” while doing it and how that affects the outcome.
Likewise, work on animal behavior modeling using OCC theory [7] [10] demonstrated the versatility of this theoretical framework for simulating emotional responses in pressure contexts (predator-prey). This project successfully transfers that methodology to the context of human sport, where competitive pressure and performance goals generate analogous emotional dynamics.
5. Conclusions
The present study developed a functional prototype that integrates software engineering, artificial intelligence, and cognitive psychology for the design and simulation of basketball plays through an affective-cognitive model based on OCC theory. The results obtained show that the system constitutes a solid proof of concept, capable of coherently representing the relationship among emotional configuration, contextual factors, and tactical outcome, while also offering a tool with pedagogical potential for sport psychology and tactical training. In this sense, the main contribution of the study lies in proposing a basketball-specific affective-motivational structure that links emotional states with game goals and probabilities of success, thereby enabling a more comprehensive approach to the analysis of sport performance.
However, the validation carried out at this stage corresponds mainly to a functional and internal-consistency level of the prototype. Therefore, the study does not claim to have completed an empirical validation of the model but rather establishes an explicit framework for its future quantitative evaluation. Such validation should consider at least three complementary dimensions: the probabilistic calibration of the predictions, agreement with expert judgments, and the sensitivity of the system to changes in emotional and contextual states. To this end, it will be necessary to construct a standardized bank of scenarios, compare the model outputs with expert assessments, and subsequently with observational data from real players, distinguishing between calibration and external validation phases to avoid overfitting.
Among the main limitations of the study is that the emotional weights, the baseline success probabilities, and the contextual modifiers were defined as heuristic parameters informed by the literature and design criteria, but they have not yet been calibrated with empirical evidence. Likewise, the prototype focuses on individual offensive plays and does not yet incorporate collective emotional dynamics or interaction with the opposing defense. From a technical standpoint, the configuration of plays and parameters is managed mainly through internal in-memory structures, without a formal export and import system, which restricts reproducibility across laboratories. Consequently, future lines of work include expanding the emotional model by incorporating intensity levels and temporal evolution, enriching the tactical editor, integrating group-dynamics phenomena such as emotional contagion and leadership, and extending this approach to other sports in which the emotional dimension is decisive.
Acknowledgements
This work represents the research conducted by Isaac Mauricio Fuentes-González to obtain a Bachelor’s degree in Computer Engineering from Universidad Autónoma Metropolitana-Azcapotzalco. It is also part of the divisional project, “Design of Intelligent Interfaces for Simulating the Behavior of Living or Animate Organisms,” from the same University.