Моделювання поведінки неігрових персонажів на основі штучного інтелекту
Files
Date
Journal Title
Journal ISSN
Volume Title
Publisher
Abstract
UKR: Комп'ютерні та відеоігри – один з найбільших сегментів індустрії розваг, який стрімко розвивається у останні роки. Навіть пандемія пішла на користь цій галузі. Різноманіття ігор вражає, користувачі бажають отримувати якісний різноманітний контент, важливою частиною якого є неігрові персонажі. Неігровий персонаж – це персонаж, керований програмою або майстром. Неігрові персонажі (доброзичливі або ворожі до гравця) слугують важливим засобом створення ігрової атмосфери, вони мотивують гравців робити ті чи інші дії, є основним джерелом інформації про ігровий світ та сюжет гри. Моделювання дій неігрових персонажів є важливою задачею при розробці ігор для покращення якості гри та більшого задоволення гравців. В сучасній розробці ігор для вирішення цієї задачі використовують алгоритми штучного інтелекту (ШІ), в тому числі машинне навчання, наприклад, для створення «розумних» ботів, які будуть боротися із гравцем. Ігровий ШІ не здатний на мислення чи творчість, його дії зумовлені розробниками, він підлаштовується під ситуацію та змінює поведінку залежно від контексту. Основними підходами у розробці поведінки неігрових персонажів є створення на фундаменті базових концепцій ШІ власних рішень для моделювання поведінки персонажів. Дана робота присвячена моделюванню поведінки неігрових персонажів з використанням алгоритмів штучного інтелекту, зокрема дерева поведінки та алгоритму А* пошуку. Дерево поведінки дозволяє неігровому персонажу приймати рішення в залежності від стану середовища та реагувати на його зміни. Переміщення є важливою частиною поведінки неігрових персонажів, які найчастіше некеровані гравцем, але часто логіка гри вимагає переміщення найкоротшим маршрутом задля динаміки гри. Проведена інтеграція змодельованої поведінки у вже існуючі вільні моделі ігрового рушія Unity, доведена коректна робота пошуку найкоротшого шляху за алгоритмом А*, враховуючи різні кейси оточуючого середовища та самого персонажу, а також працездатність системи навігації між сценами. Розроблені моделі поведінки можна у подальшому або інтегрувати у вже існуючі моделі, або використати при створенні нових ігор та персонажів.
ENG: Computer and video games are one of the largest segments of the entertainment industry, which has been developing rapidly in recent years. Even the pandemic benefited this industry. The variety of games is impressive, users want to get high-quality diverse content, an important part of which are non-game characters. A Non-Player Character is a character controlled by a program or wizard. Non-Player Characters (friendly or hostile to the player) serve as an important means of creating a game atmosphere, they motivate players to take certain actions, and are the main source of information about the game world and the plot of the game. Modeling the actions of Non-Player Characters is an important task in game development to improve game quality and enhance player satisfaction. In modern game development, artificial intelligence algorithms are used to solve this problem, including machine learning, for example, to create «smart» bots that will fight with the player. Game AI is not capable of thinking or creativity, its actions are determined by developers, it adapts to the situation and changes behavior depending on the context. The main approaches in the development of the behavior of non-game characters are the creation of own solutions for modeling the behavior of characters based on the basic concepts of AI. This work is devoted to modeling the behavior of Non-Player Character using artificial intelligence algorithms, in particular the Behavior Tree and the A* search algorithm. A Behavior Tree allows a Non-Player Character to make decisions depending on the state of the environment and react to its changes. Movement is an important part of the behavior of Non-Player Characters, which are often not controlled by the player, but often game logic requires movement by the shortest route for the sake of game dynamics. The integration of the simulated behavior into the already existing free models of the Unity game engine was carried out, the correct work of finding the shortest path according to the A* algorithm, taking into account various cases of the environment and the character itself, as well as the functionality of the navigation system between scenes was proven. The developed behavior models can be further integrated into existing models or used in the creation of new games and characters.