True artificial intelligence is of course extremely challenging, best you can do is look at what you are making and decide how it would usually act
Examples:
Police officer -
Police officers would most likely leave you alone unless you have performed a previous action, so you would save previous actions a police officer would care about, such as driving too fast, stealing, or other crimes. The officer would then follow the player, dodging anything in their path.
Monster/Zombie -
Monsters in pop culture are known to "seek and destroy". Zombies are most likely one of the easiest hostile creatures to program, as they simply need to check if a player is near them, then chase them. For extra realism or making it more interesting, side behaviors such as the monsters keeping in groups, or knowing how to fire weapons, could be worth experimenting with.
Parasite (Such as the Flood seen in the Halo series.) -
Parasites are an interesting opponent, usually small and challenging to shoot, but balanced by almost always being in large groups. Such an enemy would usually chase the player relentlessly, making it near priority for the player to want to kill.
All of these are free use concepts, and you can make up your own to suit the needs of your character/enemy.