Wednesday, 20 February 2008

Progress Report

Ok, so this should have been started at the beginning of term, before I had started anything so it was all documented... oh well, better late than never?

First of, what the hell am I doing? Well... my dissertation title goes something like:

"Can a Realistic Squad Based AI be Simulated using Advanced AI Techniques in Real Time?"

Sexy eh?
Now what does that mean? If you've ever played the game Cannon Fodder, then you'll understand my ultimate aim, to make a sexy realistic version of that. Although, to be honest, I’ve not really played it much, just love the idea.
My idea is to have a very polished looking game at the end, one that I will be happy to show people and one that will get me at least a B (as getting a 2:1 looks most likely now... unless I get an A for maths...) So with that in mind, I want.

  • A squad of units that the player can control and order about a battlefield
  • Each Unit is its own entity, with its own stats, health etc. and can operate completely on its own (or an Agent in AI speak)
  • Each unit will have full A* pathfinding allowing transversing of the battlefield.
    • Line of sight might be used first to speed up the pathfinding in a low obstacle environment.
  • The squad as a whole will have a basic flocking algorithm:
    • Cohesion for keeping the squad together and moving as one
    • Avoidance to stop the units bumping into each other, or occupying the same position
  • With Fuzzy Cognitive Maps controlling all the AI

First thing I did was head to the library and pick up a load of books. "Fuzzy Thinking" was the first of these that I started reading and was a fairly useful book. It taught me the basics of Fuzzy Logic but appeared to repeat the first several pages over and over for the first 100 pages, so instead of reading all that I switched onto another book, "Understanding Neural Networks and Fuzzy Logic: Basic Concepts and Applications". I have never seen so much maths in a programming book so it was quickly put to one side and onto the next book, which was by far the most useful book I've read on AI, "AI for Game Developers"

Fuzzy Cognitive Maps is where the "Realistic" part comes in. FCMs are a branch of Fuzzy Logic, which itself is a branch of Finite State Machines. FCMs take in lots of distinct inputs and by using various weightings on these inputs together with the current state of the FCM, "fuzzifys" the numbers and generates a fuzzy output. This fuzzy output is "Defuzzified" into a distinct output for use within the Finite State Machine part of the FCM system.
All this good stuff was detailed within that awesome book :D

"AI for Game Developers" also had a great chapter on A* pathfinding as well as one on flocking, so is pretty complete for what I want to do.

On Saturday the 16th February I started coding the project, probably about 2 months behind the schedule I had to make up for the Dissertation Proposal, but creating the Gantt chart was a pointless exercise at the time as there was not enough information and an accurate one for me would have looked very bad... Perhaps that’s due to my interesting working style and maybe that’s what should change, but it seams to be working so far :P
So far, after only that 1/2 day of programming, I have a basic framework set up (in C# woo feel the <3) with a Unit, Squad and Terrain class, with the terrain class loading in my amazing programmer art and being able to scroll about the screen. The next thing to do is get a Unit on the screen and get A* pathfinding working based around this terrain.

Tuesday 19th February
Progress Meeting with bob (Súhyl):
Fairly useless as always, things he wants me to do in the next two weeks:
Implement A*
Progress Report
GUI

No comments: