I have been trying to make an AI like in alien isolation just did the memory part for my game please check

In my game there are 2 AI’s trying to find the player when the player hides inside a closet or something The director AI send the head part to the location of the player within a 500 radius of the player. If the player uses the same hiding spot too many times in hear i set it to 3 if the player chooses the place for more than 3 the AI will go to that spot directly first checks if the player is found inside The body part will notified to the point and Does an attack that kills the player. Please check and tell me if there are any potential problems or anythinghttps://drive.google.com/file/d/1TBpDjOOe5RRHQccpXvWWsZPUZHDTHj50/view?usp=sharing

The 3-strike memory is a good idea. A few things in the way you described it will play wrong.

  • The director should not receive the player’s live location while they are hidden. A search point inside 500 units of the real transform is still a wallhack, even with the radius. Store a last-known position that updates only from sight or a noise event (door, footstep). Search that position plus a small random offset, not the actor’s current transform.
  • Decay the closet count. Add one when the player is sensed using that spot, and subtract on a timer. Without decay the AI permanently memorizes the first three closets and ignores the rest of the level.
  • Do not attack on path complete. Reaching the point only means the search finished. Attack only after a second sense check that overlaps the closet volume and has line of sight into it. Otherwise you kill a player who already left, and you miss a player who is in the closet but not standing on the nav point.
  • Do not notify the body on every director tick. That restarts the move, and the two AIs stack on the same spot. One shared blackboard key (InvestigateLocation plus a State). The director writes it; the body reads it only when State changes. While State is Attack, ignore new investigate points.
  • Two agents pathing into one closet block each other, and the attack overlap can hit the other AI. Put the body on a slot beside the door. If the director is only a coordinator, do not path it there at all.

The failure mode to test is a player who leaves the closet before the body arrives, and a player who reuses a spot after a long quiet period. Both should fail the kill if the sense check and the decay are in place.