<?xml version="1.0" encoding="UTF-8"?>
<article article-type="research-article" dtd-version="1.3" xml:lang="ru" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://metafora.rcsi.science/xsd_files/journal3.xsd">
  <front>
    <journal-meta>
      <journal-id journal-id-type="publisher-id">moitvivt</journal-id>
      <journal-title-group>
        <journal-title xml:lang="ru">Моделирование, оптимизация и информационные технологии</journal-title>
        <trans-title-group xml:lang="en">
          <trans-title>Modeling, Optimization and Information Technology</trans-title>
        </trans-title-group>
      </journal-title-group>
      <issn pub-type="epub">2310-6018</issn>
      <publisher>
        <publisher-name>Издательство</publisher-name>
      </publisher>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.26102/2310-6018/2026.54.3.006</article-id>
      <article-id pub-id-type="custom" custom-type="elpub">2190</article-id>
      <title-group>
        <article-title xml:lang="ru">Метод реализации псевдореалистичного перемещения неигровых персонажей в открытых виртуальных мирах</article-title>
        <trans-title-group xml:lang="en">
          <trans-title>A method for implementing pseudo-realistic movement of non-player characters in open virtual worlds</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>Shutov</surname>
              <given-names>Kirill Igorevich</given-names>
            </name>
          </name-alternatives>
          <email>kubirill@rambler.ru</email>
          <xref ref-type="aff">aff-1</xref>
        </contrib>
        <contrib contrib-type="author">
          <name-alternatives>
            <name name-style="eastern" xml:lang="ru">
              <surname>Лобанов</surname>
              <given-names>Александр Анатольевич</given-names>
            </name>
            <name name-style="western" xml:lang="en">
              <surname>Lobanov</surname>
              <given-names>Aleksandr Anatolyevich</given-names>
            </name>
          </name-alternatives>
          <email>a.a.lobanoff@ya.ru</email>
          <xref ref-type="aff">aff-2</xref>
        </contrib>
      </contrib-group>
      <aff-alternatives id="aff-1">
        <aff xml:lang="ru">МИРЭА - Российский технологический университет</aff>
        <aff xml:lang="en">MIREA – Russian Technological University</aff>
      </aff-alternatives>
      <aff-alternatives id="aff-2">
        <aff xml:lang="ru">МИРЭА - Российский технологический университет</aff>
        <aff xml:lang="en">MIREA – Russian Technological University</aff>
      </aff-alternatives>
      <pub-date pub-type="epub">
        <day>01</day>
        <month>01</month>
        <year>2026</year>
      </pub-date>
      <volume>1</volume>
      <issue>1</issue>
      <elocation-id>10.26102/2310-6018/2026.54.3.006</elocation-id>
      <permissions>
        <copyright-statement>Copyright © Авторы, 2026</copyright-statement>
        <copyright-year>2026</copyright-year>
        <license license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/">
          <license-p>This work is licensed under a Creative Commons Attribution 4.0 International License</license-p>
        </license>
      </permissions>
      <self-uri xlink:href="https://moitvivt.ru/ru/journal/article?id=2190"/>
      <abstract xml:lang="ru">
        <p>На современном рынке игр с открытым миром существует запрос на правдоподобное, но управляемое поведение неигровых персонажей (NPS) при ограниченных вычислительных ресурсах. Существующие решения предлагают две крайности. Либо они перегружают систему попыткой полной симуляции, либо дают предсказуемые скриптовые паттерны. Цель работы – предложить метод псевдореалистичного перемещения NPC, заполняющий разрыв между этими крайностями. Метод основан на проверке достижимости появления NPC: используется матрица кратчайших расстояний между областями игрового мира. При входе игрока в область алгоритм выбирает тех неигровых персонажей, которые физически могли туда добраться с учетом прошедшего времени, заданной скорости и доступных маршрутов, что интерпретирует встречу как следствие скрытого перемещения, а не мгновенного появления. Частота встреч регулируется системой приоритетов. Разработчик может управлять редкостью отдельных персонажей без детальной симуляции их маршрутов. Выбор кандидатов ускоряется переупорядочением почти отсортированного списка, уменьшая стоимость повторных выборок при близких входных условиях. Эксперименты на сгенерированных графах показали, что время выполнения основной части алгоритма на стороне клиента остается в пределах миллисекунд при численности до 1000 NPC. Метод обеспечивает правдоподобие и контролируемость встреч при низкой нагрузке и может быть интегрирован в существующие системы для настройки сложности и баланса.</p>
      </abstract>
      <trans-abstract xml:lang="en">
        <p>The open-world game market increasingly demands NPC (non-player character) behaviour that feels believable yet remains designer-controllable under tight computational budgets. Common solutions tend to be extreme: either they attempt full simulation and overload the system, or they rely on predictable scripted patterns. This paper proposes a pseudo-realistic NPC movement method that bridges these extremes. The core idea is to verify spawn reachability using a matrix of shortest-path distances between world areas. When the player enters an area, the algorithm selects only those NPCs that could have physically reached it given elapsed time, movement speed and available routes, making an encounter consistent with hidden travel rather than instantaneous spawning. Encounter frequency is controlled via a priority scheme, allowing designers to tune event density and the rarity of specific characters without maintaining a detailed simulation. Candidate selection is further accelerated by reordering an almost-sorted list, reducing the cost of repeated queries under similar conditions. Experiments on synthetic graphs show that the core client-side runtime stays within milliseconds for up to 1000 NPCs. The method delivers believability and control at low computational cost and can be integrated into existing engines to adjust difficulty and balance.</p>
      </trans-abstract>
      <kwd-group xml:lang="ru">
        <kwd>гейм-дизайн</kwd>
        <kwd>гейм-дев</kwd>
        <kwd>видеоигры</kwd>
        <kwd>алгоритм поиска пути</kwd>
        <kwd>алгоритм сортировки</kwd>
        <kwd>NPC</kwd>
        <kwd>неигровой персонаж</kwd>
      </kwd-group>
      <kwd-group xml:lang="en">
        <kwd>game design</kwd>
        <kwd>game development</kwd>
        <kwd>video games</kwd>
        <kwd>pathfinding algorithm</kwd>
        <kwd>sorting algorithm</kwd>
        <kwd>NPC</kwd>
        <kwd>non-player character</kwd>
      </kwd-group>
      <funding-group>
        <funding-statement xml:lang="ru">Исследование выполнено без спонсорской поддержки.</funding-statement>
        <funding-statement xml:lang="en">The study was performed without external funding.</funding-statement>
      </funding-group>
    </article-meta>
  </front>
  <back>
    <ref-list>
      <title>References</title>
      <ref id="cit1">
        <label>1</label>
        <mixed-citation xml:lang="ru">Uludağlı M.Ç., Oğuz K. Non-player character decision-making in computer games. Artificial Intelligence Review. 2023;56(12):14159–14191. https://doi.org/10.1007/s10462-023-10491-7</mixed-citation>
      </ref>
      <ref id="cit2">
        <label>2</label>
        <mixed-citation xml:lang="ru">Da Silva G.A., de Souza Ribeiro M.W. Development of Non-Player Character with Believable Behavior: a systematic literature review. In: 2021: Companion Proceedings of the 20th Brazilian Symposium on Games and Digital Entertainment, 18–21 October 2021, Gramado, Brazil. Porto Alegre: Sociedade Brasileira de Computação; 2021. P. 319–323. https://doi.org/10.5753/sbgames_estendido.2021.19660</mixed-citation>
      </ref>
      <ref id="cit3">
        <label>3</label>
        <mixed-citation xml:lang="ru">Yang D., Kleinman E., Harteveld C. GPT for Games: An Updated Scoping Review (2020–2024). arXiv. URL: https://arxiv.org/abs/2411.00308 [Accessed 5th October 2025].</mixed-citation>
      </ref>
      <ref id="cit4">
        <label>4</label>
        <mixed-citation xml:lang="ru">Yakan S.A. Analysis of Development of Artificial Intelligence in the Game Industry. International Journal of Cyber and IT Service Management. 2022;2(2):111–116. https://doi.org/10.34306/ijcitsm.v2i2.100</mixed-citation>
      </ref>
      <ref id="cit5">
        <label>5</label>
        <mixed-citation xml:lang="ru">Cormen Th.H., Leiserson Ch.E., Rivest R.L., Stein C. Introduction to Algorithms. Cambridge: MIT Press; 2022. 1312 p.</mixed-citation>
      </ref>
      <ref id="cit6">
        <label>6</label>
        <mixed-citation xml:lang="ru">Шутов К.И., Акатьев Я.А., Лобанов А.А. Анализ особенностей поведения неигровых персонажей в виртуальных мирах. E-Scio. 2023;(3):140–154.</mixed-citation>
      </ref>
      <ref id="cit7">
        <label>7</label>
        <mixed-citation xml:lang="ru">Guimarães M., Santos P.A., Jhala A. Emergent Social NPC Interactions in the Social NPCs Skyrim Mod and Beyond. arXiv. URL: https://doi.org/10.48550/arXiv.2207.13398 [Accessed 3rd October 2025].</mixed-citation>
      </ref>
      <ref id="cit8">
        <label>8</label>
        <mixed-citation xml:lang="ru">Park J.S., O'Brien J., Cai C.J., et al. Generative Agents: Interactive Simulacra of Human Behavior. In: UIST '23: Proceedings of the 36th Annual ACM Symposium on User Interface Software and Technology, 29 October – 01 November 2023, San Francisco, CA, USA. New York: ACM; 2023. https://doi.org/10.1145/3586183.3606763</mixed-citation>
      </ref>
      <ref id="cit9">
        <label>9</label>
        <mixed-citation xml:lang="ru">Guo S., Adamo N., Mousas Ch. Developing a Scale for Measuring the Believability of Virtual Agents. In: ICAT-EGVE 2023: 33rd International Conference on Artificial Reality and Telexistence, 28th Eurographics Symposium on Virtual Environments, 06–08 December 2023, Trinity College Dublin, Ireland. Eurographics Association; 2023. P. 45–52. https://doi.org/10.2312/egve.20231312</mixed-citation>
      </ref>
      <ref id="cit10">
        <label>10</label>
        <mixed-citation xml:lang="ru">Sprevak M., Smith R. An Introduction to Predictive Processing Models of Perception and Decision-Making. Topics in Cognitive Science. 2023. https://doi.org/10.1111/tops.12704</mixed-citation>
      </ref>
      <ref id="cit11">
        <label>11</label>
        <mixed-citation xml:lang="ru">Clark A. The Experience Machine: How Our Minds Predict and Shape Reality. New York: Pantheon Books; 2023. 320 p.</mixed-citation>
      </ref>
      <ref id="cit12">
        <label>12</label>
        <mixed-citation xml:lang="ru">Bai X., Coester Ch. Sorting with Predictions. In: Advances in Neural Information Processing Systems 36 (NeurIPS 2023), 10–16 December 2023, New Orleans, LA, USA. 2023. URL: https://papers.neurips.cc/paper_files/paper/2023/file/544696ef4847c903376ed6ec58f3a703-Paper-Conference.pdf</mixed-citation>
      </ref>
      <ref id="cit13">
        <label>13</label>
        <mixed-citation xml:lang="ru">Durrani O.Kh., AbdulHayan S. Performance Measurement of Popular Sorting Algorithms Implemented using Java and Python. In: 2022 International Conference on Electrical, Computer, Communications and Mechatronics Engineering (ICECCME), 16–18 November 2022, Maldives. IEEE; 2022. P. 1–6. https://doi.org/10.1109/ICECCME55909.2022.9988424</mixed-citation>
      </ref>
      <ref id="cit14">
        <label>14</label>
        <mixed-citation xml:lang="ru">Michail D. JHeaps: An open-source library of priority queues. SoftwareX. 2021;16. https://doi.org/10.1016/j.softx.2021.100869</mixed-citation>
      </ref>
      <ref id="cit15">
        <label>15</label>
        <mixed-citation xml:lang="ru">Mubarak A., Iqbal S., Naeem T., Hussain Sh. 2 mm: A new technique for sorting data. Theoretical Computer Science. 2022;910:68–90. https://doi.org/10.1016/j.tcs.2022.01.037</mixed-citation>
      </ref>
      <ref id="cit16">
        <label>16</label>
        <mixed-citation xml:lang="ru">Auger N., Jugé V., Nicaud C., Pivoteau C. On the Worst-Case Complexity of TimSort. In: Proceedings of the 26th Annual European Symposium on Algorithms (ESA 2018), 20–22 August 2018, Helsinki, Finland. Schloss Dagstuhl – Leibniz-Zentrum für Informatik; 2018. https://doi.org/10.4230/LIPIcs.ESA.2018.4</mixed-citation>
      </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>