<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.3 20210610//EN" "JATS-journalpublishing1-3.dtd">
<article article-type="research-article" dtd-version="1.3" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:lang="ru"><front><journal-meta><journal-id journal-id-type="publisher-id">ellibs</journal-id><journal-title-group><journal-title xml:lang="ru">Электронные библиотеки</journal-title><trans-title-group xml:lang="en"><trans-title>Russian Digital Libraries Journal</trans-title></trans-title-group></journal-title-group><issn pub-type="epub">1562-5419</issn><publisher><publisher-name>Казанский (Приволжский) федеральный университет</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.26907/1562-5419-2025-28-4-957-986</article-id><article-id custom-type="elpub" pub-id-type="custom">ellibs-604</article-id><article-categories><subj-group subj-group-type="heading"><subject>Research Article</subject></subj-group><subj-group subj-group-type="section-heading" xml:lang="ru"><subject>Статьи</subject></subj-group></article-categories><title-group><article-title>Разработка адаптивной системы генерации игровых квестов и диалогов на основе больших языковых моделей</article-title><trans-title-group xml:lang="en"><trans-title>Development of an Adaptive System for Generating Game Quests and Dialogues Based on Large Language Models</trans-title></trans-title-group></title-group><contrib-group><contrib contrib-type="author" corresp="yes"><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Трофимчук</surname><given-names>Всеволод Тарасович</given-names></name><name name-style="western" xml:lang="en"><surname>Trofimchuk</surname><given-names>Vsevolod Tarasovich</given-names></name></name-alternatives><email xlink:type="simple">vselord.beta@gmail.com</email><xref ref-type="aff" rid="aff-1"/></contrib><contrib contrib-type="author" corresp="yes"><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Кугуракова</surname><given-names>Влада Владимировна</given-names></name><name name-style="western" xml:lang="en"><surname>Kugurakova</surname><given-names>Vlada Vladimirovna</given-names></name></name-alternatives><email xlink:type="simple">vlada.kugurakova@gmail.com</email><xref ref-type="aff" rid="aff-1"/></contrib></contrib-group><aff-alternatives id="aff-1"><aff xml:lang="ru"><institution>Казанский (Приволжский) федеральный университет</institution></aff><aff xml:lang="en"><institution>Kazan (Volga region) Federal University</institution></aff></aff-alternatives><pub-date pub-type="collection"><year>2025</year></pub-date><pub-date pub-type="epub"><day>19</day><month>12</month><year>2025</year></pub-date><volume>28</volume><issue>4</issue><fpage>953</fpage><lpage>993</lpage><permissions><copyright-statement>Copyright &amp;#x00A9; Трофимчук В.Т., Кугуракова В.В., 2025</copyright-statement><copyright-year>2025</copyright-year><copyright-holder xml:lang="ru">Трофимчук В.Т., Кугуракова В.В.</copyright-holder><copyright-holder xml:lang="en">Trofimchuk V.T., Kugurakova V.V.</copyright-holder><license xml:lang="ru" license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>Данная работа распространяется под лицензией Creative Commons Attribution 4.0.</license-p></license><license xml:lang="en" license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>This work is licensed under a Creative Commons Attribution 4.0 License.</license-p></license></permissions><self-uri xlink:href="https://ellibs.elpub.ru/jour/article/view/604">https://ellibs.elpub.ru/jour/article/view/604</self-uri><abstract><p>Рассмотрена проблема создания динамических нарративных систем для видеоигр с интерактивностью в реальном времени. Представлены разработка и тестирование компонента интеграции GPT для генерации диалогов, выявившие критическое ограничение облачных решений – задержку в 30 с., неприемлемую для игрового процесса. Предложена гибридная архитектура адаптивной системы, сочетающая LLM с механизмами обучения с подкреплением. Особое внимание уделяется решению проблем консистентности игрового мира и управлению долгосрочным контекстом взаимодействий с NPC через RAG-подход. Обоснован переход к парадигме Edge AI с применением методов квантования для достижения целевой задержки 200–500 мс. Разработаны метрики оценки персонализации и динамической адаптации контента.
</p></abstract><trans-abstract xml:lang="en"><p>This article addresses the problem of creating dynamic narrative systems for video games with real-time interactivity. It presents the development and testing of a GPT integration component for dialogue generation, which revealed a critical limitation of cloud-based solutions – a 30-second latency unacceptable for gameplay. A hybrid architecture of an adaptive system is proposed, combining LLMs with reinforcement learning mechanisms. Particular attention is given to solving the problems of game world consistency and managing long-term context of NPC interactions through a RAG approach. The transition to the Edge AI paradigm with the application of quantization methods to achieve a target latency of 200–500 ms is substantiated. Metrics for evaluating personalization and dynamic content adaptation have been developed.
</p></trans-abstract><kwd-group xml:lang="ru"><kwd>видеоигры</kwd><kwd>большие языковые модели</kwd><kwd>LLM</kwd><kwd>генерация диалогов</kwd><kwd>диалогогенерация</kwd><kwd>генерация квестов</kwd><kwd>квестогенерация</kwd><kwd>адаптивные квесты</kwd><kwd>процедурная генерация контента</kwd><kwd>агентное поведение</kwd><kwd>игровой искусственный интеллект</kwd><kwd>машинное обучение в играх</kwd></kwd-group><kwd-group xml:lang="en"><kwd>video games</kwd><kwd>large language models</kwd><kwd>LLM</kwd><kwd>dialogue generation</kwd><kwd>quest generation</kwd><kwd>adaptive quests</kwd><kwd>procedural content generation</kwd><kwd>agent behavior</kwd><kwd>game AI</kwd><kwd>machine learning in games</kwd></kwd-group></article-meta></front><back><ref-list><title>References</title><ref id="cit1"><label>1</label><citation-alternatives><mixed-citation xml:lang="ru">Gallotta R. et al. Large language models and games: A survey and roadmap // IEEE Transactions on Games. 2024.</mixed-citation><mixed-citation xml:lang="en">Gallotta R. et al. Large language models and games: A survey and roadmap // IEEE Transactions on Games. 2024.</mixed-citation></citation-alternatives></ref><ref id="cit2"><label>2</label><citation-alternatives><mixed-citation xml:lang="ru">Inworld. Future of NPCs report // inworld [Electronic resource]. – February 2023. URL: https://www.inworld.ai/blog/future-of-npcs-report</mixed-citation><mixed-citation xml:lang="en">Inworld. Future of NPCs report // inworld [Electronic resource]. – February 2023. URL: https://www.inworld.ai/blog/future-of-npcs-report</mixed-citation></citation-alternatives></ref><ref id="cit3"><label>3</label><citation-alternatives><mixed-citation xml:lang="ru">Sweetser P. Large language models and video games: A preliminary scoping review // Proceedings of the 6th ACM Conference on Conversational User Interfaces. 2024. P. 1–8.</mixed-citation><mixed-citation xml:lang="en">Sweetser P. Large language models and video games: A preliminary scoping review // Proceedings of the 6th ACM Conference on Conversational User Interfaces. 2024. P. 1–8.</mixed-citation></citation-alternatives></ref><ref id="cit4"><label>4</label><citation-alternatives><mixed-citation xml:lang="ru">Wang Q. et al. GenQuest: An LLM-based Text Adventure Game for Language Learners // arXiv preprint arXiv:2510.04498. 2025.</mixed-citation><mixed-citation xml:lang="en">Wang Q. et al. GenQuest: An LLM-based Text Adventure Game for Language Learners // arXiv preprint arXiv:2510.04498. 2025.</mixed-citation></citation-alternatives></ref><ref id="cit5"><label>5</label><citation-alternatives><mixed-citation xml:lang="ru">Hardiman J.P.W. et al. AI-powered dialogues and quests generation in role-playing games using Google's Gemini and Sentence BERT framework // Procedia Computer Science. 2024. Vol. 245. P. 1111–1119.</mixed-citation><mixed-citation xml:lang="en">Hardiman J.P.W. et al. AI-powered dialogues and quests generation in role-playing games using Google's Gemini and Sentence BERT framework // Procedia Computer Science. 2024. Vol. 245. P. 1111–1119.</mixed-citation></citation-alternatives></ref><ref id="cit6"><label>6</label><citation-alternatives><mixed-citation xml:lang="ru">Ashby T. et al. Personalized quest and dialogue generation in role-playing games: A knowledge graph-and language model-based approach // Proceedings of the 2023 CHI Conference on Human Factors in Computing Systems. 2023. P. 1–20.</mixed-citation><mixed-citation xml:lang="en">Ashby T. et al. Personalized quest and dialogue generation in role-playing games: A knowledge graph-and language model-based approach // Proceedings of the 2023 CHI Conference on Human Factors in Computing Systems. 2023. P. 1–20.</mixed-citation></citation-alternatives></ref><ref id="cit7"><label>7</label><citation-alternatives><mixed-citation xml:lang="ru">Bolshakov E.S., Kugurakova V.V. Generative simulation of a game environment in real time // Russian Digital Libraries Journal. 2025. Vol. 28, No. 2. P. 188–212 (In Russian).</mixed-citation><mixed-citation xml:lang="en">Bolshakov E.S., Kugurakova V.V. Generative simulation of a game environment in real time // Russian Digital Libraries Journal. 2025. Vol. 28, No. 2. P. 188–212 (In Russian).</mixed-citation></citation-alternatives></ref><ref id="cit8"><label>8</label><citation-alternatives><mixed-citation xml:lang="ru">Nurygayanov N.R., Kugurakova V.V. An approach to creating a corpus of video game texts based on a universal structure // Russian Digital Libraries Journal. 2024. Vol. 27, No. 4. P. 578–597 (In Russian).</mixed-citation><mixed-citation xml:lang="en">Nurygayanov N.R., Kugurakova V.V. An approach to creating a corpus of video game texts based on a universal structure // Russian Digital Libraries Journal. 2024. Vol. 27, No. 4. P. 578–597 (In Russian).</mixed-citation></citation-alternatives></ref><ref id="cit9"><label>9</label><citation-alternatives><mixed-citation xml:lang="ru">Akoury N., Yang Q., Iyyer M. A framework for exploring player perceptions of llm-generated dialogue in commercial video games // Findings of the Association for Computational Linguistics: EMNLP 2023. P.2295–2311.</mixed-citation><mixed-citation xml:lang="en">Akoury N., Yang Q., Iyyer M. A framework for exploring player perceptions of llm-generated dialogue in commercial video games // Findings of the Association for Computational Linguistics: EMNLP 2023. P.2295–2311.</mixed-citation></citation-alternatives></ref><ref id="cit10"><label>10</label><citation-alternatives><mixed-citation xml:lang="ru">Jin C., Cao P., Zaïane O. Role-Playing Based on Large Language Models via Style Extraction // International Conference on Neural Information Processing. Singapore: Springer Nature Singapore, 2024. P. 433–447.</mixed-citation><mixed-citation xml:lang="en">Jin C., Cao P., Zaïane O. Role-Playing Based on Large Language Models via Style Extraction // International Conference on Neural Information Processing. Singapore: Springer Nature Singapore, 2024. P. 433–447.</mixed-citation></citation-alternatives></ref><ref id="cit11"><label>11</label><citation-alternatives><mixed-citation xml:lang="ru">Tseng Y.M. et al. Two tales of persona in llms: A survey of role-playing and personalization // arXiv preprint arXiv:2406.01171. 2024.</mixed-citation><mixed-citation xml:lang="en">Tseng Y.M. et al. Two tales of persona in llms: A survey of role-playing and personalization // arXiv preprint arXiv:2406.01171. 2024.</mixed-citation></citation-alternatives></ref><ref id="cit12"><label>12</label><citation-alternatives><mixed-citation xml:lang="ru">Trofimchuk V.T. Development of a component for GPT integration into video games: Bachelor's qualifying work, spec. 09.03.04 – Software Engineering, scientific supervisor Khafizov M.R., Kazan Federal University, Institute of Information Technology and Intelligent Systems, 2024. 54 p.</mixed-citation><mixed-citation xml:lang="en">Trofimchuk V.T. Development of a component for GPT integration into video games: Bachelor's qualifying work, spec. 09.03.04 – Software Engineering, scientific supervisor Khafizov M.R., Kazan Federal University, Institute of Information Technology and Intelligent Systems, 2024. 54 p.</mixed-citation></citation-alternatives></ref><ref id="cit13"><label>13</label><citation-alternatives><mixed-citation xml:lang="ru">URL: https://kpfu.ru/student_diplom/10.160.178.20_FLP3APBW54SAM3JYPPT73DBLRFUS75DXQEBT_Z5F6LD7O0KAF7_F_Trofimchuk.pdf (In Russian)</mixed-citation><mixed-citation xml:lang="en">URL: https://kpfu.ru/student_diplom/10.160.178.20_FLP3APBW54SAM3JYPPT73DBLRFUS75DXQEBT_Z5F6LD7O0KAF7_F_Trofimchuk.pdf (In Russian)</mixed-citation></citation-alternatives></ref><ref id="cit14"><label>14</label><citation-alternatives><mixed-citation xml:lang="ru">Abdelrahman E. Edge AI and Edge Computing: Powering Real-Time Intelligence [Electronic resource] // Ultralytics. URL: https://www.ultralytics.com/ru/blog/edge-ai-and-edge-computing-powering-real-time-intelligence</mixed-citation><mixed-citation xml:lang="en">Abdelrahman E. Edge AI and Edge Computing: Powering Real-Time Intelligence [Electronic resource] // Ultralytics. URL: https://www.ultralytics.com/ru/blog/edge-ai-and-edge-computing-powering-real-time-intelligence</mixed-citation></citation-alternatives></ref><ref id="cit15"><label>15</label><citation-alternatives><mixed-citation xml:lang="ru">Kuderin D. Edge AI: how neural networks work on devices with limited resources [Electronic resource] // TProger. URL: https://tproger.ru/articles/edge-ai--kak-rabotayut-nejroseti-na-ustrojstvah-s-ogranichennymi-resursami (In Russian).</mixed-citation><mixed-citation xml:lang="en">Kuderin D. Edge AI: how neural networks work on devices with limited resources [Electronic resource] // TProger. URL: https://tproger.ru/articles/edge-ai--kak-rabotayut-nejroseti-na-ustrojstvah-s-ogranichennymi-resursami (In Russian).</mixed-citation></citation-alternatives></ref><ref id="cit16"><label>16</label><citation-alternatives><mixed-citation xml:lang="ru">Martindale J. Input lag and response time aren’t the same. Here’s which is more important [Electronic resource]. 2024. URL: https://www.digitaltrends.com/computing/input-lag-vs-response-time/</mixed-citation><mixed-citation xml:lang="en">Martindale J. Input lag and response time aren’t the same. Here’s which is more important [Electronic resource]. 2024. URL: https://www.digitaltrends.com/computing/input-lag-vs-response-time/</mixed-citation></citation-alternatives></ref><ref id="cit17"><label>17</label><citation-alternatives><mixed-citation xml:lang="ru">Kugurakova V.V. A formal approach to spatio-temporal modeling of game systems // Uchenye Zapiski Kazanskogo Universiteta. Seriya Fiziko-Matematicheskie Nauki. 2024. Vol. 166, No. 4. P. 532–554 (In Russian).</mixed-citation><mixed-citation xml:lang="en">Kugurakova V.V. A formal approach to spatio-temporal modeling of game systems // Uchenye Zapiski Kazanskogo Universiteta. Seriya Fiziko-Matematicheskie Nauki. 2024. Vol. 166, No. 4. P. 532–554 (In Russian).</mixed-citation></citation-alternatives></ref><ref id="cit18"><label>18</label><citation-alternatives><mixed-citation xml:lang="ru">Chen B. Optimization Strategies for Role-Playing Games Based on Large Language Models // Proceedings of the 2nd International Conference on Data Science and Engineering: ICDSE 2025. P. 632–637.</mixed-citation><mixed-citation xml:lang="en">Chen B. Optimization Strategies for Role-Playing Games Based on Large Language Models // Proceedings of the 2nd International Conference on Data Science and Engineering: ICDSE 2025. P. 632–637.</mixed-citation></citation-alternatives></ref><ref id="cit19"><label>19</label><citation-alternatives><mixed-citation xml:lang="ru">Sakhibgareeva G.F., Kugurakova V.V., Bolshakov E.S. Game balancing tools // Russian Digital Libraries Journal. 2023. Vol. 26, No. 2. P. 225–251 (In Russian).</mixed-citation><mixed-citation xml:lang="en">Sakhibgareeva G.F., Kugurakova V.V., Bolshakov E.S. Game balancing tools // Russian Digital Libraries Journal. 2023. Vol. 26, No. 2. P. 225–251 (In Russian).</mixed-citation></citation-alternatives></ref></ref-list><fn-group><fn fn-type="conflict"><p>The authors declare that there are no conflicts of interest present.</p></fn></fn-group></back></article>
