at least he didn`t ask for an AI function, some people think AI can just be a function (eg position object (AI positions) lol ), you can have aspects that can be reduced to functions (pathfinding for eg), but even then the pathfinding for a turn based strategy is totaly different from the pathfinding in a space flight combat simulation.
There just comes a point where you have to get your fingers dirty and just go in and code the thing from scratch, the ideas are what matter, understand what the articles are talking about and you have most of the method mapped out for you, from that to the final code is a small step, like all coding the hardest part is getting an idea of how to do it in the first place.
Mentor.
PC1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, ATI radeon 9800 pro gfx, 6 way surround sound, PC2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster, ups.