Game Design and Artificial Intelligence - Bournemouth University
Game Design and Artificial Intelligence - Bournemouth University
Game Design and Artificial Intelligence - Bournemouth University
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Game</strong> <strong>Design</strong> <strong>and</strong> <strong>Artificial</strong> <strong>Intelligence</strong><br />
David Hopkins<br />
Fig 2.1 – Overview of the data h<strong>and</strong>ling in the game<br />
During this project, it was imperative to try <strong>and</strong> keep the number of global variables to a minimum<br />
if possible as this would be more liable to errors due to repeating names. This was problem was<br />
solved by keeping most of the data rapped up in variables in lists with object orientation. The use<br />
of Object Factories [rollings01] could also have made a large difference in keeping the code tidy,<br />
but a lack of time for the implementation prevented this.<br />
<strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> Finite State Machines<br />
For this project, the <strong>Artificial</strong> <strong>Intelligence</strong> didn’t need to be overly complex, though at one point<br />
further research into genetic algorithms <strong>and</strong> neural networks [aijunkie01] looked a distinct<br />
possibility. Neural networks, based on genetic algorithms, try to simulate the way the human brain<br />
works by taking a number of inputs into a “ neuron” which effectively calculates a result <strong>and</strong> returns<br />
an output. As impressive as this method of AI is, it seemed needlessly awkward considering what<br />
the program required.<br />
During the first attempt at the space combat situation, I had already stumbled on the functionality of<br />
the FSM (finite state machine). I was working on a system that used a switch statement based on a<br />
state which was one of either, fly towards, stop or drift. This is an example of a very simple FSM.<br />
Page 13 of 22