Neural Network AI
by Dan Keller · 02/07/2008 (1:40 pm) · 3 comments
In my last blog, I talked about an a* system in torque. The pathfinding behaviors were chosen by a simple state machine that I added temporarily to test the pathfinding. Over the last few days, I've been implementing a neural net system instead. The nets are generated randomly, so the bots are somewhat "stupid," but they still work OK. The benefit of using a* in conjunction with the neural net is that even with no training, the bot can still look like it knows what it's doing. (Except for the ones that just stand there.) So a random net will just make the bot always run away, for example, instead of spinning in circles.
This is the second part of a three-part AI system that I'm working on. The third part will be a genetic algorithm to "evolve" smarter nets from existing ones. The idea is that, on a high level, the genetic algorithm will cause the population to adapt and get smarter, on a lower level each bot will use the neural net assigned to it to decide what to do, and on the lowest level, a* will tell the bots how to get where they want to go.
This is the second part of a three-part AI system that I'm working on. The third part will be a genetic algorithm to "evolve" smarter nets from existing ones. The idea is that, on a high level, the genetic algorithm will cause the population to adapt and get smarter, on a lower level each bot will use the neural net assigned to it to decide what to do, and on the lowest level, a* will tell the bots how to get where they want to go.
#2
02/07/2008 (6:05 pm)
Cool stuff. I've used GA's to evolve Naive Bayes classifiers with pretty good success. It's a great combo to use a GA in conjunction with a learner, for sure. :)
#3
Can't wait for the next update. I'd love to see some of this stuff in action, by the way -- a video or something would be nice once you have more to show off.
02/28/2008 (7:22 pm)
Sounds great, Dan.Can't wait for the next update. I'd love to see some of this stuff in action, by the way -- a video or something would be nice once you have more to show off.
Torque 3D Owner Lance Hampton
I just started work on some GA code. It's in Lisp at least until I get the prototype worked out. After that I was toying with the idea of turning it into a dll (I have some licensing issues there) or redoing it in C++ for easier use in torque. I'm very interested in where you're going with this.
-Lance