Different AI


I failed in my attempts to use vectors to create autonomous characters, and so for the sake of this assignment I have had to create my AI using different methods.

These are the AI I have developed:

Wanderer: shuffles about randomly with no particular purpose.
I did this by generating 4 random numbers. Depending on the value provided the player either moves up, left, right or down.

Seeker: follows the player but can not find paths around walls.
If the enemies x or y axis is less than or greater than the players x and y axis. The enemy value is added or subtracted from the enemy to move it towards the player.

Pursuer: follows the player and finds paths around walls.
The pursuer follows the path generated by the A* search. More details in A* search.

Transformer (FSM) : alternates between different states. More details on the Finite State Machine post.