View Full Version : AI format Flight Sims

27-09-2005, 09:29 PM
Talk about starting onthe hard stuff :wink:

I'd like to hear some opinions on approaches to implement this kinda of AI. I was thinking of a combination of Neural Networks, Flocking and other techniques. Transition between the states would be handled by a state machine that each system would feed into.

sounds kinda easy when you put it like that.

OK my starting point was the neural net implementation I found in the Pythian Project (who remembers that :wink:)

http://www.koders.com/delphi/fidBD23E776122993412F320B9C88E52BF4D718D627.aspx?s =neural

This seemed like a good place to start (my neural networking is rusty , I havne't played with this stuff since Uni). Bu tI'm having trouble training the net to even handle a basic xor gate. has anyone looked at this Network implementation? Or have any recommendations on other implementations that will work under Delphi 5 and Free Pascal?


28-09-2005, 07:39 AM
I believe the site is wellknown already, but www.ai-junkie.com (http://www.ai-junkie.com) may be of some help. It has a section on NN with samples written in Delphi. Also ai-depot.com (http://ai-depot.com) is a good place to start (I noticed they've updated the site heavily).

I'm interested to see where this is going to, so please do keep us posted!

29-09-2005, 12:31 AM
I'd also have to recommend http://www.ai-junkie.com/! Mat Buckland is the author of the tutorials on his site AND a book that has been added to the Game Development Series(unfortunately uses C code, but it's the theory that counts most!)

If you try any of the Delphi demos, know that the minesweeper demo for Delphi is garbage. There is a member 'Lucky" that has made a working copy, but I cannot recall where it can be located now. (It was some time ago)

But so far using NNs with GAs is probably the nicest method of using NNs for anything. However you will require a 'trainning mode' or 'trainner' for your NNs to evolve them and teach them how to do the tasks you require.

29-09-2005, 06:05 PM
Thanks for the input guys. :D

I'll check out those sites. I've started implementing an xml driven Backpropogation network. the netowork is defined by a specific xml schema and the training data will also be provided in xml. I'll be posting all the code on the Cerebral Bicycle (http://www.cerebral-bicycle.co.uk) site once I've got it working. The schema I have is this

<Input layer="" neuron="" weight=""/>

in the Input section the layer is the index (zero based) of the layer we are inputing from and neuron is the index (zero based) of the neuron in that layer. This will allow me to define quite complex multi layer networks.

the ActivationFunction might be a piece of script or just the name of a pre defined funtion.

I have the feed forward mode written, just need to do the training part.

As for GA's breeding NN's, this is something I played with back at uni (I did my disteration on GA's and PBIL's (http://portal.acm.org/citation.cfm?id=865146&coll=GUIDE&dl=GUIDE&CFID=55972143&CFTOKEN=16194069) ), it's a fantastic technique which allows you to bread the layout of the network rather than defining the path's manually. If I get a chance I'll implement that as well, and release all the code with that. However that might have to wait for now :cry: