An AI is basicly an decider. It decides what to do next.
If you think about the user control is a special form of an AI. It takes the user input to decide what’s next.
All you need to do is “simply” write logic that decides.
Find out what options are present (the analysing part).
Then choose one of the options to be processed (the evaluating and choosing part).
Processing the decision is the same as for the player (e.g. go left, go right, pickup something, open door).
I hope it helps
PS: The decision should be something that the logic can process. “Hating the player” is a bit difficult if not defined in detail, while “turn left by 90 deg” is much more specific.