Hmm ai is very circumstational, and i personally think it cant be taught, only practiced. You need to have a good understanding of what you want to achieve and how to achieve it.
In realisitic ai, the most simple of looking things is damn hard to do.
i mean lets take path finding. To a player it is completly ignored, they do not care, or maybe even realise that the enemy has just navigated thier way past 5 turns to get to the player - put the process has took over 500 lines of code, and being flash, at all times the flash players power was a mjour factor.
I mean lets brake down some of the things you would need in advanced ai.
Pathfinding - hundreds of methods, all quite complicated. Which 1 suits your needs.
Line of sight - again lots of ways of doing it, accuracy or speed?
Cone of view - bit easier, but you gotta know how to react to it.
Movment - goin from platform game going left and right, to movin in complete random direction, to have a target and finding its own way to get there.
Attack - it dosnt look very good when an enemy jus walks up to you and attacks, it must seem like they are thinking for thierslf, be it blocking, moving around the player - etc.
And ofc there is more - alot more - like calling for backup, giving them a sense of hearing.
The list would never end, you can always find sumithing to make them more intelegant.
I conclude by slightly refining what i said at the start - ai can be taught - functions can be made for every1 of those cituations, and u can learn from them.
But, the only way to make true ai, if you want it to be advanced, is to make your own - or get som1 to do it for you =D
In my eyes realisitic ai is one of the hardest things to do.