Browsed by
Category: Artificial Intelligence

Weight-based randomization

Weight-based randomization

What do games using loot drops and games using AI driven by behavioural parameters such as sleep, hunger and happiness have in common? At first glance, not much. But it is very likely that both of them deploy the same algorithm. Let’s start by example: There’s plenty of games using loot drops today. It’s an easy way to implement a form of replayability in a game, where character progression is tied to the gear they are wearing. By not guaranteeing…

Read More Read More

AI sight and memory – finished!

AI sight and memory – finished!

It took longer than anticipated, but the prototype described in the previous post has been coded and documented! There were a few changes and additions along the way, but that just goes to show how nothing is ever really final, until you sit down and produce it. Most notably was the addition of a new class called TagClass, which is used to verify if an observed object should be memorized, and how the memory should be flagged. Before I outline…

Read More Read More

Developing AI sight and memory

Developing AI sight and memory

This post is going to be a little bit different than what I have written so far, as the project presented here is a work in progress. However, it is for that reason exactly, that I thought it would be interesting to write about. Instead of presenting a fully functioning prototype, I will submit what I have done in the process so far, and update the post as work comes along. This will hopefully give you an idea of how…

Read More Read More

Finite state-machine example

Finite state-machine example

Working on our Ecosystem student project, I deemed it appropriate to use a finite state-machine to dictate the logic of our animals. An implementation of the theory can be found here, although it makes little sense without the explanations from this article. Download the Unity Package file here A finite state-machine (FSM) is a way to graph and control AI behavior. While it is less commonly used in game development vs behavior trees (which facilitate more complex behaviors with longer…

Read More Read More

AI move system

AI move system

As a followup to my post about search path generation, here is the prototype which the path is being fed to. As an added bonus, at the end of this post I will show you how I combined the two prototypes, which illustrates how an animal might randomly explore an obstacled environment. When working with AI agents that can change behaviors at any time, it is important to have a very robust movement system to facilitate these changes. This prototype…

Read More Read More

AI search behavior

AI search behavior

Working on a simulated ecosystem, it was necessary to create a Search Behavior for our animals. They would use this behavior if they ever needed something, but had no memory of seeing it elsewhere (eg. I am hungry but have no memories of seeing food). Executing this behavior generates a spiral pattern out from the animal, starting at a random angle. The points in this pattern are then shuffled randomly, to create a field of points instead of a line….

Read More Read More

Vector-based cloud system

Vector-based cloud system

During my studies, I was tasked with making a cloud spawning system. It had to be easily modifiable (in case the designer wanted to make changes) and work with a vector to describe the direction of the wind, alongside a value to represent the speed of the wind. By creating a prototype for this, it was determined that the easiest way to illustrate where the clouds would appear, was to restrain them to a bounding box. A random coordinate would…

Read More Read More