Oscar Johnson

Logo

Graduate Game developer

I am a young and aspiring graduate (First class, BSc) with a passion for video games! Feel free to browse my projects or get in touch via the links below. Here's a copy of my CV

View My LinkedIn Profile

View My GitHub Profile

15 May 2019

Organic Non-playable characters

by Oscar Johnson

For my final year project I undertook the task of researching the viability of using neural networks to drive npc behavior in a single player experience and then create a solution which not only worked but performed better, on average, than existing solutions such as behavior trees or finite state machines. After a year of hard work, I am proud to present Organic Non-playable characters!


About

Neural networks had started picking up traction in the video game space a few years ago when developers realised that they could use image recognition to train a computer to beat classic video games such as mario or even drive cars in GTA. Hype grew further when it was announced that EA were working with NNs to develop AI for their upcoming battlefield game, and it was this video that got me interested on the subject. This was also the year that Elon musk’s openAI project first beat a professional team in the e-sports title DoTA 2 (A game I am very fond of).

With all this said, neural networks had never been used in a purely single player approach, where the goal wasn’t to necessarily beat the player but to act like realistic, living, breathing organisms, each with their own goals and motivations. Therefore, my goal was to create ‘sims like’ NPCs that could be plugged into an open-world rpg setting and aid with the immersion of the player.

This was achieved by using a series of neural networks all trained independently to achieve separate goals (Such as combat, idle activity, goal management) working together under one master network that would decide at any given moment what the NPC should be doing. This included eating, sleeping, going to work, socialising with other NPCs and the player, and even fighting when allies were under attack or laws were being broken.

For additional reading on this project, my final report can be read here.

My final project includes;

This project was coded in C# by myself over the course of my final year in university. The original unity project can be viewed and downloaded from my github repository here.