Pages

Wednesday, 14 June 2017

Platoon AI Project

During the third year of university, for my dissertation I wanted to focus on game AI and the techniques that are used to create AI, or at least, the semblance of AI, in video games.

For this task I had to research various techniques which are used to create AI, such as Hierarchical Task Management and Goal Orientated Action Processing. It was a great opportunity to learn a lot more about a field I had only briefly glanced over during my first year of university. It was great to hear how the logic of game AI worked and has helped me in my further projects when thinking about how to create AI.

The actual dissertation project was to 'Create an AI which mimicked real world Platoon Level Tactics'. Now, to the uninitiated in military organisational structure, a platoon is simply a group of men. No doubt you will have heard the term 'squad', well, a platoon is essentially a group of 'squads' alongside machine gunner teams, mortar teams and under the leadership of a lieutenant. Squad AI is something which has been done before, but I was more interested in creating a simple algorithm which could control a group of groups effectively.

The demo itself uses SFML to represent graphics. There are two teams of dots, red and green. The yellow and blue dots are 'officers' of each team. They act as rally points for the squad members, but I will explain more about that later. The blue squares are 'cover' which improves survivability, and the green squares are open ground

The algorithm itself is separated into two specific parts. The individual soldier's logic, and the platoon order logic.

The individual soldiers use a GOAP algorithm to decide their actions. They take in information about the world such as how far they are from enemies, where their officer is located and where cover is, as well as what their orders are in order to make a decision about what they are going to do.

The Platoon order Logic uses a basic HTM system to decide whether the soldiers orders should be to attack or defend. The soldiers then use this information to work out their preferential tactics.

Overall the system is a good representation of the techniques, however it lacks a little in quality of life features and debug information to properly showcase the algorithm. I also feel I did not use enough C++11 features during development, and that is something I will continue to work on.

You can download the codebase for your leisurely browsing from the github link below.

You will need Visual Studio 2015 in order to run the demo. It currently does not run in release, you will have to build it and run it in debug. You will also have to use the visual studio 'stop debugging' button in order to quit, as the window quit function does not work.

https://github.com/Falsan/AIPlatoonProject

No comments:

Post a Comment