At DAE we were taught about different Artificial Intelligence techniques for video games. We started off with simple steering behaviours that would steer an actor towards a specific direction depending on the situation. We were then taught about pathfinding algorithms which we then applied on a Navigation mesh. After that we were introduced to Decision Making Structures to make complex behaviours. And last of all we were introduced to the basics of Machine Learning.
Steering Behaviours
For the first lesson we had to create multiple different simple steering behaviours which would steer an actor in a certain direction. Some examples are:
- Seek: Move straight towards a target
- Flee: Move in the opposite direction from where the target is
- Wander: Move around in a semi random direction
- Pursuit: Intercept a moving target
- Circle: Circle a target
- Hide: Hide behind obstacles to avoid a target
- Interpose: Go to the middle of two targets
- Obstacle Avoidance: Move away from close obstacles
We would then combine these behaviours using a weight for every specific behaviour. This would blend the steering behaviours together and create more complex actions

Flocking
Flocking is a specific type of steering behaviour which takes into account all other agents around him to calculate a direction.
We were also informed about space partitioning, which would sort agents into squares and would drastically improve performance

Pathfinding
The next step for AI was to calculate an optimal path around objects. We first started of using an algorithm called Dijkstra, which would find the shortest path using a connection graph.
We then optimised this algorithm to A*, which is a more complex but faster path finding algorithm

Navigation Mesh
A Navigation mesh are a bunch of connected triangles that go around in accessible places. Using A* and a way to create a connection graph we can upgrade our path finding algorithm to a 2D/3D space and increase precision

Decision Making
One of the most important parts of an AI is its decision making structure. The structure decides which behaviour an actor should do and when to do it. We were taught 3 decision making structures
- Finite State Machine: contains a bunch of states and connectors between those states
- Behaviour Tree: always starts with a top decision which chooses the decisions beneath it, and so forth
- Influence Map: uses a grid which gets populated with good and bad squares depending on what is on it. it then goes towards the most favourable square

Exam Assignment
For our exam assignment we were tasked to create an AI for a simple zombie game they provided to us. We weren’t allowed to see the source code of the actual zombie game and our actor was only able to see entities in front him inside of a small cone.
We had to fill our own behaviour structures and blend steering behaviours while also managing the inventory and dodging/killing zombies.


Leave a comment