Neural Network NPC AI

The tool is under development.

Neural Network NPC AI is a tool that lets you breathe awareness into the Non-player characters of computer games. Advanced decision-making algorithms, based on neural networks, make NPCs able to react to events they are witnessing or directly experiencing. NPC will choose the job he is best suited for, will run away when attacked or fightback, when he decides he has a chance to win!

ACTIVITY CHOOSING

The mechanism is completely universal and the type of reaction depends on the game in which NNNA is implemented. It’s easy!

Each possible action is tested on the basis of four parameters:

 ➢ Attitude – determines whether the NPC likes to do the action. For example, NPC can love fishing, but hate lumberjacking, which translates, for example, into the amount of earnings or the quality of work.

 ➢ Conscience – determines if the activity is consistent with the conscience of the character. NPC may not want to do the thing, because it’s against his beliefs, for example robbing others or pulling money.

 ➢ Importance – an important parameter defining the priority of the action. It may be that at the moment an escape from a burning city is more important than growing a flower bed.

 ➢ Skills – another very important parameter. The NPC is aware of its own weaknesses and strengths. He knows, for example, that an attempt to do blacksmithing without the right skills will end in failure.

A library is provided to the developer’s hands, which includes decision functions. Their use is very easy. For example, a function call:

double TestAction(double attitude, double conscience, double actionImportance, double skill);

will give a negative or positive result. All you need to do is test the currently available activities to be done, sort the result of the test and choose the one with the highest score!
 

ONLINE TRAINING

Although it is up to the developer to determine the input parameters of the neural network described above, the conditions of each game are different. In one world, the skill parameter may be key to survival, but not important in the other. The neural network must learn how to interpret the situation and how to react. For this occasion, an online learning module has been prepared, which investigates the actions of non-playable characters, experiments with weights and mixes experiences of the best individuals, trying in this way to create the ideal neural network to the given conditions.

By using the library provided in NNNA, you can create a learning module to be used for neural networks (NPCs) to be studied. Then, by defining the way of scoring non-playable characters, you can pursue successive periods of research until you get a satisfying response. The library itself deals with the proper mixing of strong individuals or the elimination of those weak ones, unable to adapt.

EXAMPLE RPG GAME

In order to test Neural Network NPC AI, we have created our own experimental environment, which can also be called a simple RPG game. We implemented all the most important mechanisms that are mandatory in this game genre. We have statistics, several activities such as fishing and blacksmithing, and the possibility of fighting between characters. A number of tools have been also implemented to allow debugging mechanisms. At the time of completion of NNNA, this environment will also serve as an example of the implementation of our solution.

Currently, it is possible to download an exemplary RPG demo, although it has only illustrative purposes and is devoid of neural network mechanisms.

DOWNLOAD

 ➢ Demo EXE – A playable demo of an example RPG that serves as a test environment for NNNA