Wednesday, April 21, 2010

Woot

Finished


- Posted from iPhone.

Tuesday, March 23, 2010

Debugging

Spent the day debugging my neural net code and fixed some critical bugs where the list of neurons in each layer were going out of the scope of the back propagation loop giving me bogus deltas. The bug had a knock on effect that would offset the result of the entire neural net. I plan to be reading training data from a text file by the end of a week so that I can actually use the training data I'm pulling from the quake game engine. Then it's just a matter of putting it in to the actual game engine itself and everything should be finished.

Friday, March 19, 2010

Events

Been watching tv for the last 3 hours while my project collects training data. I wonder how many events it has recorded.


- Posted from iPhone.

Thursday, March 18, 2010

ioQuake3 compiles

I spend the guts of today trying to get ioquake3 to compile and I've finally managed to get it working. The Microsoft visual studio solution will compile now creating the different game engine components. I've had to write a batch file that will copy the dlls and the exe to the necessary folders so that it will run.

I also wrote my very first quake3 mod today. It's a simple modification that prints "Thinking Bitch" to the console every time a bot thinks.

The batch file is as follows:

@echo OFF
copy "C:\Users\Andrew\Documents\College\DT228 4\FYP\quake3\build\cgame_release\cgamex86.dll" "C:\Program Files (x86)\ioquake3\missionpack\"
copy "C:\Users\Andrew\Documents\College\DT228 4\FYP\quake3\build\q3_ui_release\uix86.dll" "C:\Program Files (x86)\ioquake3\missionpack\"
copy "C:\Users\Andrew\Documents\College\DT228 4\FYP\quake3\build\game_release\qagamex86.dll" "C:\Program Files (x86)\ioquake3\missionpack\"
copy "C:\Users\Andrew\Documents\College\DT228 4\FYP\quake3\build\quake3_release\ioquake3.exe" "C:\Program Files (x86)\ioquake3\"
copy "C:\Users\Andrew\Documents\College\DT228 4\FYP\quake3\build\cgame_release\cgamex86.dll" "C:\Users\Andrew\AppData\Roaming\Quake3\baseq3\"
copy "C:\Users\Andrew\Documents\College\DT228 4\FYP\quake3\build\q3_ui_release\uix86.dll" "C:\Users\Andrew\AppData\Roaming\Quake3\baseq3\"
copy "C:\Users\Andrew\Documents\College\DT228 4\FYP\quake3\build\game_release\qagamex86.dll" "C:\Users\Andrew\AppData\Roaming\Quake3\baseq3\"
"C:\Program Files (x86)\ioquake3\ioquake3.exe"
@echo ON

Monday, March 15, 2010

Wish I could use inheritance -_-

Working on my Bayesian graph and having problems with writing the structures.
Code is something like this:



typedef struct _b_Node
{
//Identifier, will be an action
int id;
//Linked list infrastructure
struct _b_Node *next;
b_NodeList *connections;
//Data
float *probs;
} b_Node;

typedef struct _b_NodeList
{
b_Node *head;
b_Node *tail;
int size;
} b_NodeList;

typedef struct _b_Graph
{
b_NodeList * nodes;
} b_Graph;



Problem is that when the preprocessor goes to compile the header file, the list of pointers to nodes hasn't been defined yet. Where this problem could be avoided completely in an OOP language with inheritance, there's no way to order these. A solution might be using a void pointer to a list instead. I'm not entirely how efficient casting pointers is though, or how much extra work I'm going to have to do to ensure it is robust at the memory level.

Friday, March 12, 2010

Heh, Ulster University

Ulster University are offering phds in AI where they are using reinforcement learning to make diverse adaptive characters in games. That is essintially sums up my final year project.

http://www.compeng.ulster.ac.uk/rgs/displayPhDProposal.php?id=264&ri=4

Thursday, March 11, 2010

The closest thing to UML that I've got



After some careful considerations I have reviewed my high level design. I think I was looking at things the wrong way. Instead of the Bayesian network classifying actions to take given events, that will be the neural networks job. the Bayesian network's purpose is to recognize events.

Events will trigger queries to compute the probability of actions a bot might take, and they will be fed to the neural net, alongside botstate data from the bot using the neural net to make decisions, and each output neurons of the neural network should classify the best action to take.

This approach should make taking training data from the game engine a lot easier, however in order to get the neural net working the way it should I need to have a fully functional Bayesian Net.

The actions and variables I've decided to compute the probability for in the Bayesian net are as follows:

Probable Actions:
Seeking Health
Seeking Armor
Seeking Ammo
Seeking Enemy
Running Away

Variables
Health
Ammo
Armor