I have a fair amount of experience in my past with working on AI, specifically for Quake-C back in the late 90's and early 2000's so I'm going to throw my 2c (or 2p, if you're a brit) at the screen here.
I see a LOT of problems with the current implementation of AI in Game-Guru and would advocate a complete re-write. There's several major contingencies that are killing it as far as I can see.
1) the hitbox/collision detection is a serious issue. There's way too much faulty interfacing and I'm not entirely sure why as I've only taken cursory swipes at the code. This is very clearly a problem though. The box around the AI is generally too poorly interpreted and causes it to either not recognize walls or allow elements of the mesh to push through
2) There's not enough error checking in the code, causing weirdness like shooting through walls and what not.
3) Once the AI is active, it stays active, eating a massive amount of CPU
4) There's no way to idle the AI or aggregate it's function with other AI to minimize CPU hits
5) Raycasting is... odd. I don't know why, but it seems like it never quite works how I think it will.
Good elements about Game-Guru that are not used fully: the node system. I've got a LOT of work in my book here that I can't divulge directly (yay contracts) but I can make vague statements
... the node system is your friend. If you want your AI to function BETTER (maybe not flawless, but better) learn to use the node system. It is a lifesaver.
Extra functions (candy) for the AI are not necessary at this point and will only further complicate code that needs a lot more modularization and cleanup. I would take this tract (which I intend to, eventually) with the AI code:
1) Break down things that work and things that don't.
2) Rewrite all code as functions and modules.
3) Have the primary state loop operate off said functions and modules in a way that is small and simple.
4) Fix all error checks, work on optimizing the code's function in core mechanics:
- states
- functions (shooting, checks, movement, etc)
- optimizing utilization by putting in state idles and giving the CPU back some love, optimizing for faster code and processing by minimizing redundant
and unnecessary calls (like ray tracing a dozen times in a second for one hit detection after a hit was already done, stuff like that).
5) start building additional utility functions such as group aggregation via centroid computation, better node pathing, group logic by sharing target data, building a linked list of friends and a hash table to fast compute targeting info.
6) add more candy like additional stuff - strafing, fuzzy logic trees for better response in combat, etc.
Just my thoughts. I was planning on using my weather system's state change setup as a foundation for it. I'll get there one day LOL