BaaS is a simulation framework for testing neuroadaptive game difficulty in Tetris. The system models how EEG-like emotion classifications can drive adaptive controllers that change game speed during play.
The current project focuses on three simulated users:
| User | Short label | Skill profile |
|---|---|---|
| Frustrated Freddy | FF | Beginner |
| Average Amy | AA | Intermediate |
| Hairy Henry | HH | Advanced |
The current experiment setup uses:
| Component | Current options |
|---|---|
| Controllers | PID, Feedforward |
| Classifiers | SpeedOnly, Noisy |
| Target emotion | HAHV |
The main experiment searches over PID and Feedforward controller parameters, then keeps only the best configuration for each user/controller/classifier condition.
python experiment.pyMain output will go to the experiment_results folders.
Short labels:
| Label | Meaning |
|---|---|
| FF | Frustrated Freddy |
| AA | Average Amy |
| HH | Hairy Henry |
| PID | PID controller |
| ff | Feedforward controller |
| SO | SpeedOnly classifier |
| N | Noisy classifier |
Example: AA-ff-SO means Average Amy + Feedforward + SpeedOnly.
The delayed experiment tests robustness when the control loop is delayed.
It varies two delay values:
| Delay | Meaning |
|---|---|
| Controller delay | The controller receives an older classifier probability vector |
| User-change delay | The user's emotional state changes after a delayed number of pieces |
Run:
python experiment_delayed.pyMain output will go to experiment_delayed_results.
In this plot:
| Axis | Meaning |
|---|---|
| X | Controller delay |
| Y | User-change delay |
| Z | Mean enjoyment percentage |
Lower delay generally produces higher enjoyment.
Use the visual simulation to watch one selected user play under the selected controller/classifier setup.
python simulation.py --user "Frustrated Freddy"
python simulation.py --user "Average Amy"
python simulation.py --user "Hairy Henry"The visual simulation opens a Pygame window and waits for ENTER before starting, so the display can be arranged before the run begins.
MAX_MOVESmeans the maximum number of Tetris pieces the autoplay system attempts to place.- A trial can end before
MAX_MOVESif the game reaches a terminal state. - The main loop performs one classifier prediction, one controller update, and one Tetris piece placement attempt per move.

