I read something up on the Black & White AI. The idea (and it sounds relativelly simple), is that the creature has desires, and an intensity for each desire, so it choses the desire with the highest intensity and goes with that. For each desire, you get some sub-data that goes with it, for example, if the creature is hungry it will scan all objects around it, so there might be a rock, and a sheep. It can try and eat the rock, and decide that the taste for that is not so good, so the rock's intensity goes down. It might then try and each a sheep, and find it tatses really good. So over time, the desires become more and more refined, so it wouldn't just be "I feel like eating", it would be "I feel like eating a sheep", As time goes by, desires are added to a list, and the cycle begins all over again, so it already knows sheep are good to eat, and rocks arent, so it might try and eat a normal sheep, then a fat one, and the fat one tastes better, so, eating a fat sheep is added to it's desires.
The intensities of each desire is not just affected by taste or whatever, but how the player treats it when performing an action. Other ways are how the creature watches the player and tries to copy it, so obviously the creatures have a data base where knowledge can be added to.
What I'm guessing about the creature that hurt a guy just to heal him again was, that the creature somehow learned that big impulse = pain. What it wanted to do was to heal someone, but someone had to be in pain. So it appears, that desires can link to each other somehow. That bit, sounds hard