A Software Architecture to Support Difficulty Adaptation in Puzzle Game Level Design
Resumo
Difficulty adaptation can maintain an appropriate challenge by adjusting gameplay or content to player performance. However, adaptive puzzle generation often couples player modelling, adaptation policies, generation algorithms, difficulty assessment, and runtime integration. This paper presents a modular software architecture separating integration, orchestration, player modelling, adaptation, persistence, configurable generation pipelines, and domain-specific plugins. Pipeline stages for generation, validation, difficulty assessment, ranking, and selection are replaceable. The architecture supports stateful and stateless execution, runtime level selection, and offline candidate analysis. A Python prototype using FastAPI, SQLite, and plugins for Sudoku, Sokoban, and Fifteen Puzzle demonstrates the same workflow across distinct generation strategies, validation requirements, and difficulty metrics. The results provide initial evidence of feasibility, modularity, and extensibility; player experience and adaptation effectiveness remain future work.
Palavras-chave:
Software architecture, Difficulty adaptation, Puzzle games, Level design
Referências
Tugce Ates and Fatih Cavdur. 2025. Sudoku puzzle generation using mathematical programming and heuristics: Puzzle construction and game development. Expert Systems with Applications 282 (2025), 127710. DOI: 10.1016/j.eswa.2025.127710
Mathias Babin and Michael Katchabaw. 2025. Game Balance Through Procedural Content Generation. In Proceedings of the 20th International Conference on the Foundations of Digital Games. Association for Computing Machinery, Article 49, 4 pages. DOI: 10.1145/3723498.3723748
Frank Buschmann, Regine Meunier, Hans Rohnert, Peter Sommerlad, and Michael Stal. 1996. Pattern-Oriented Software Architecture: A System of Patterns. Vol. 1. Wiley.
Francisco Wendel Almeida Cavalcante and Maria Andréia Formico Rodrigues. 2026. Replication Package for A Software Architecture to Support Difficulty Adaptation in Puzzle Game Level Design. DOI: 10.5281/zenodo.22036960
Darryl Charles, Michael McNeill, Moira McAlister, Michaela Black, Adrian Moore, Karl Stringer, Julian Kücklich, and Aphra Kerr. 2005. Player-centred game design: Player modelling and adaptive digital games. In Proceedings of DiGRA 2005 Conference: Changing Views–Worlds in Play. Digital Games Research Association: DiGRA, 285–298.
Eugene You Chen Chen, Adam White, and Nathan R. Sturtevant. 2023. Entropy as a Measure of Puzzle Difficulty. In Proceedings of the 2023 AAAI Conference on Artificial Intelligence and Interactive Digital Entertainment, Vol. 19. 34–42. DOI: 10.1609/aiide.v19i1.27499
Joseph C. Culberson. 1998. Sokoban is PSPACE-complete. In Proceedings of the 1998 International Conference on Fun with Algorithms (FUN). Carleton Scientific, 65–76.
Barbara De Kegel and Mads Haahr. 2020. Procedural Puzzle Generation: A Survey. IEEE Transactions on Games 12, 1 (2020), 21–40. DOI: 10.1109/TG.2019.2917792
Pedro M. Fernandes, Jonathan Jørgensen, and Niels N. T. G. Poldervaart. 2021. Adapting Procedural Content Generation to Player Personas Through Evolution. In 2021 IEEE Symposium Series on Computational Intelligence (SSCI). 01–09. DOI: 10.1109/SSCI50451.2021.9659880
Ronja Fuchs, Robin Gieseke, and Alexander Dockhorn. 2024. Personalized dynamic difficulty adjustment imitation learning meets reinforcement learning. In 2024 IEEE Conference on Games (CoG). IEEE, 1–2. DOI: 10.1109/CoG60054.2024.10645659
Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. 1994. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley.
Miguel González-Duque, Rasmus Berg Palm, and Sebastian Risi. 2021. Fast Game Content Adaptation Through Bayesian-Based Player Modelling. In Proceedings of the 2021 IEEE Conference on Games (CoG). IEEE, 1–8. DOI: 10.1109/CoG52621.2021.9619018
Peter E. Hart, Nils J. Nilsson, and Bertram Raphael. 1968. A Formal Basis for the Heuristic Determination of Minimum Cost Paths. IEEE Transactions on Systems Science and Cybernetics 4, 2 (1968), 100–107. DOI: 10.1109/TSSC.1968.300136
R E Korf. 1985. Depth-first iterative-deepening: An optimal admissible tree search. Artificial Intelligence 27, 1 (1985), 97–109. DOI: 10.1016/0004-3702(85)90084-0
Phil Lopes, Nuno Fachada, and Maria Fonseca. 2025. Closing the loop: A systematic review of experience-driven game adaptation. arXiv:2505.01351 DOI: 10.48550/arXiv.2505.01351, Preprint.
Ricardo Lopes and Rafael Bidarra. 2011. A semantic generation framework for enabling adaptive game worlds. In Proceedings of the 8th International Conference on Advances in Computer Entertainment Technology. Association for Computing Machinery, New York, NY, USA, 1–8. DOI: 10.1145/2071423.2071431
Carlos Marín-Lora and Miguel Chover. 2023. A Multi-agent Sudoku Through theWave Function Collapse. In Multi-Agent Systems, Vadim Malvone and Aniello Murano (Eds.). Springer Nature Switzerland, Cham, 381–395. DOI: 10.1007/978-3-031-43264-4_24
Leonardo Gonçalves Marques, Juliana Amaral de Figueiredo, João Vitor Vieira Lira, and Maria Andréia Formico Rodrigues. 2025. A Serious Game for Bone Cancer Awareness and Education: Integrating Simulated User Feedback for Preliminary Validation. In 2025 IEEE Conference on Serious Games and Applications for Health (SeGAH). 1–8. DOI: 10.1109/SeGAH65397.2025.11168446
Fatemeh Mortazavi, Hadi Moradi, and Abdol-Hossein Vahabie. 2024. Dynamic difficulty adjustment approaches in video games: a systematic literature review. Multimedia Tools and Applications 83, 35 (2024), 83227–83274. DOI: 10.1007/s11042-024-18768-x
Maria Andréia Formico Rodrigues, R G Barbosa, and Jonas de A. Luz Junior. 2026. Games and Their Multiple Possible Uses in Health Care. In Digital Healthcare: A Multidisciplinary and Comprehensive Vision. Springer, 269–281.
Stuart J. Russell and Peter Norvig. 2021. Artificial Intelligence: A Modern Approach–Chapter 3 (4 ed.). Pearson.
Katie Salen and Eric Zimmerman. 2003. Rules of Play: Game Design Fundamentals. The MIT Press, Cambridge, MA, USA.
MK Saravana, G Manjula, Nayan Shekar, Pasyam Harshavardhan Reddy, Shreecharan Dattatreya Hegde, and BN Koushik. 2025. Cognitively-Grounded Adaptive Sudoku Generation and Real-Time Skill Assessment. In Proceedings of the 2nd International Conference on Software, Systems and Information Technology (SSITCON). IEEE, 1–7. DOI: 10.1109/SSITCON66133.2025.11342206
Noor Shaker, Julian Togelius, and Mark J. Nelson. 2016. Procedural Content Generation in Games. Springer International Publishing, Cham, Switzerland. DOI: 10.1007/978-3-319-42716-4
Claude E. Shannon. 1948. A Mathematical Theory of Communication. The Bell System Technical Journal 27, 3 (1948), 379–423. DOI: 10.1002/j.1538-7305.1948.tb01338.x
Helmut Simonis. 2005. Sudoku as a constraint problem. In Proceedings of the 4th International Workshop on Modelling and Reformulating Constraint Satisfaction Problems, Vol. 12. Sitges, Spain, 13–27. [link]
Carlos Souza, Luciana Berretta, and Sérgio Carvalho. 2025. Consolidating a MAPE-K-Based Architecture for Dynamic Difficulty Adjustment: A Bottom-Up Approach. In Anais do I Workshop sobre Engenharia de Software para Desenvolvimento de Jogos (SE4Games) (Recife/PE). SBC, Porto Alegre, RS, Brasil, 49–52. DOI: 10.5753/se4games.2025.14865
Elio Valenzuela, Hans Schaa, Nicolas A Barriga, and Gustavo Patow. 2025. Using search algorithm statistics for assessing maze and puzzle difficulty. Entertainment Computing 53 (2025), 100925. DOI: 10.1016/j.entcom.2025.100925
Su Xue, Meng Wu, John Kolen, Navid Aghdaie, and Kazi A Zaman. 2017. Dynamic difficulty adjustment for maximized engagement in digital games. In Proceedings of the 26th International Conference on World Wide Web Companion. 465–471. DOI: 10.1145/3041021.3054170
Georgios N. Yannakakis and Julian Togelius. 2011. Experience-Driven Procedural Content Generation. IEEE Transactions on Affective Computing 2, 3 (July 2011), 147–161. DOI: 10.1109/T-AFFC.2011.6
Takayuki Yato and Takahiro Seta. 2003. Complexity and completeness of finding another solution and its application to puzzles. IEICE Transactions on Fundamentals of Electronics, Communications and Computer Sciences 86, 5 (2003), 1052–1060. [link]
Jichen Zhu and Santiago Ontañón. 2020. Player-Centered AI for Automatic Game Personalization: Open Problems. In Proceedings of the 15th International Conference on the Foundations of Digital Games (Bugibba, Malta) (FDG’20). Association for Computing Machinery, New York, NY, USA, Article 6, 8 pages. DOI: 10.1145/3402942.3402951
Mathias Babin and Michael Katchabaw. 2025. Game Balance Through Procedural Content Generation. In Proceedings of the 20th International Conference on the Foundations of Digital Games. Association for Computing Machinery, Article 49, 4 pages. DOI: 10.1145/3723498.3723748
Frank Buschmann, Regine Meunier, Hans Rohnert, Peter Sommerlad, and Michael Stal. 1996. Pattern-Oriented Software Architecture: A System of Patterns. Vol. 1. Wiley.
Francisco Wendel Almeida Cavalcante and Maria Andréia Formico Rodrigues. 2026. Replication Package for A Software Architecture to Support Difficulty Adaptation in Puzzle Game Level Design. DOI: 10.5281/zenodo.22036960
Darryl Charles, Michael McNeill, Moira McAlister, Michaela Black, Adrian Moore, Karl Stringer, Julian Kücklich, and Aphra Kerr. 2005. Player-centred game design: Player modelling and adaptive digital games. In Proceedings of DiGRA 2005 Conference: Changing Views–Worlds in Play. Digital Games Research Association: DiGRA, 285–298.
Eugene You Chen Chen, Adam White, and Nathan R. Sturtevant. 2023. Entropy as a Measure of Puzzle Difficulty. In Proceedings of the 2023 AAAI Conference on Artificial Intelligence and Interactive Digital Entertainment, Vol. 19. 34–42. DOI: 10.1609/aiide.v19i1.27499
Joseph C. Culberson. 1998. Sokoban is PSPACE-complete. In Proceedings of the 1998 International Conference on Fun with Algorithms (FUN). Carleton Scientific, 65–76.
Barbara De Kegel and Mads Haahr. 2020. Procedural Puzzle Generation: A Survey. IEEE Transactions on Games 12, 1 (2020), 21–40. DOI: 10.1109/TG.2019.2917792
Pedro M. Fernandes, Jonathan Jørgensen, and Niels N. T. G. Poldervaart. 2021. Adapting Procedural Content Generation to Player Personas Through Evolution. In 2021 IEEE Symposium Series on Computational Intelligence (SSCI). 01–09. DOI: 10.1109/SSCI50451.2021.9659880
Ronja Fuchs, Robin Gieseke, and Alexander Dockhorn. 2024. Personalized dynamic difficulty adjustment imitation learning meets reinforcement learning. In 2024 IEEE Conference on Games (CoG). IEEE, 1–2. DOI: 10.1109/CoG60054.2024.10645659
Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. 1994. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley.
Miguel González-Duque, Rasmus Berg Palm, and Sebastian Risi. 2021. Fast Game Content Adaptation Through Bayesian-Based Player Modelling. In Proceedings of the 2021 IEEE Conference on Games (CoG). IEEE, 1–8. DOI: 10.1109/CoG52621.2021.9619018
Peter E. Hart, Nils J. Nilsson, and Bertram Raphael. 1968. A Formal Basis for the Heuristic Determination of Minimum Cost Paths. IEEE Transactions on Systems Science and Cybernetics 4, 2 (1968), 100–107. DOI: 10.1109/TSSC.1968.300136
R E Korf. 1985. Depth-first iterative-deepening: An optimal admissible tree search. Artificial Intelligence 27, 1 (1985), 97–109. DOI: 10.1016/0004-3702(85)90084-0
Phil Lopes, Nuno Fachada, and Maria Fonseca. 2025. Closing the loop: A systematic review of experience-driven game adaptation. arXiv:2505.01351 DOI: 10.48550/arXiv.2505.01351, Preprint.
Ricardo Lopes and Rafael Bidarra. 2011. A semantic generation framework for enabling adaptive game worlds. In Proceedings of the 8th International Conference on Advances in Computer Entertainment Technology. Association for Computing Machinery, New York, NY, USA, 1–8. DOI: 10.1145/2071423.2071431
Carlos Marín-Lora and Miguel Chover. 2023. A Multi-agent Sudoku Through theWave Function Collapse. In Multi-Agent Systems, Vadim Malvone and Aniello Murano (Eds.). Springer Nature Switzerland, Cham, 381–395. DOI: 10.1007/978-3-031-43264-4_24
Leonardo Gonçalves Marques, Juliana Amaral de Figueiredo, João Vitor Vieira Lira, and Maria Andréia Formico Rodrigues. 2025. A Serious Game for Bone Cancer Awareness and Education: Integrating Simulated User Feedback for Preliminary Validation. In 2025 IEEE Conference on Serious Games and Applications for Health (SeGAH). 1–8. DOI: 10.1109/SeGAH65397.2025.11168446
Fatemeh Mortazavi, Hadi Moradi, and Abdol-Hossein Vahabie. 2024. Dynamic difficulty adjustment approaches in video games: a systematic literature review. Multimedia Tools and Applications 83, 35 (2024), 83227–83274. DOI: 10.1007/s11042-024-18768-x
Maria Andréia Formico Rodrigues, R G Barbosa, and Jonas de A. Luz Junior. 2026. Games and Their Multiple Possible Uses in Health Care. In Digital Healthcare: A Multidisciplinary and Comprehensive Vision. Springer, 269–281.
Stuart J. Russell and Peter Norvig. 2021. Artificial Intelligence: A Modern Approach–Chapter 3 (4 ed.). Pearson.
Katie Salen and Eric Zimmerman. 2003. Rules of Play: Game Design Fundamentals. The MIT Press, Cambridge, MA, USA.
MK Saravana, G Manjula, Nayan Shekar, Pasyam Harshavardhan Reddy, Shreecharan Dattatreya Hegde, and BN Koushik. 2025. Cognitively-Grounded Adaptive Sudoku Generation and Real-Time Skill Assessment. In Proceedings of the 2nd International Conference on Software, Systems and Information Technology (SSITCON). IEEE, 1–7. DOI: 10.1109/SSITCON66133.2025.11342206
Noor Shaker, Julian Togelius, and Mark J. Nelson. 2016. Procedural Content Generation in Games. Springer International Publishing, Cham, Switzerland. DOI: 10.1007/978-3-319-42716-4
Claude E. Shannon. 1948. A Mathematical Theory of Communication. The Bell System Technical Journal 27, 3 (1948), 379–423. DOI: 10.1002/j.1538-7305.1948.tb01338.x
Helmut Simonis. 2005. Sudoku as a constraint problem. In Proceedings of the 4th International Workshop on Modelling and Reformulating Constraint Satisfaction Problems, Vol. 12. Sitges, Spain, 13–27. [link]
Carlos Souza, Luciana Berretta, and Sérgio Carvalho. 2025. Consolidating a MAPE-K-Based Architecture for Dynamic Difficulty Adjustment: A Bottom-Up Approach. In Anais do I Workshop sobre Engenharia de Software para Desenvolvimento de Jogos (SE4Games) (Recife/PE). SBC, Porto Alegre, RS, Brasil, 49–52. DOI: 10.5753/se4games.2025.14865
Elio Valenzuela, Hans Schaa, Nicolas A Barriga, and Gustavo Patow. 2025. Using search algorithm statistics for assessing maze and puzzle difficulty. Entertainment Computing 53 (2025), 100925. DOI: 10.1016/j.entcom.2025.100925
Su Xue, Meng Wu, John Kolen, Navid Aghdaie, and Kazi A Zaman. 2017. Dynamic difficulty adjustment for maximized engagement in digital games. In Proceedings of the 26th International Conference on World Wide Web Companion. 465–471. DOI: 10.1145/3041021.3054170
Georgios N. Yannakakis and Julian Togelius. 2011. Experience-Driven Procedural Content Generation. IEEE Transactions on Affective Computing 2, 3 (July 2011), 147–161. DOI: 10.1109/T-AFFC.2011.6
Takayuki Yato and Takahiro Seta. 2003. Complexity and completeness of finding another solution and its application to puzzles. IEICE Transactions on Fundamentals of Electronics, Communications and Computer Sciences 86, 5 (2003), 1052–1060. [link]
Jichen Zhu and Santiago Ontañón. 2020. Player-Centered AI for Automatic Game Personalization: Open Problems. In Proceedings of the 15th International Conference on the Foundations of Digital Games (Bugibba, Malta) (FDG’20). Association for Computing Machinery, New York, NY, USA, Article 6, 8 pages. DOI: 10.1145/3402942.3402951
Publicado
08/09/2026
Como Citar
CAVALCANTE, Francisco Wendel Almeida; RODRIGUES, Maria Andréia Formico.
A Software Architecture to Support Difficulty Adaptation in Puzzle Game Level Design. In: WORKSHOP SOBRE ENGENHARIA DE SOFTWARE PARA DESENVOLVIMENTO DE JOGOS (SE4GAMES), 2. , 2026, São Paulo/SP.
Anais [...].
Porto Alegre: Sociedade Brasileira de Computação,
2026
.
p. 55-62.
DOI: https://doi.org/10.5753/se4games.2026.33055.