is it possible that i instruct an ai to move on what pseudo-code i gave it in game?

hello! we are planning to create a game in unity3d. Our concept is that an AI will pass a maze. In the beginning, without using the mouse or keyboard arrows to move. We instruct the ai to move on what direction he will go using a pseudo-code. After constructing the pseudo-code. The ai moves and definitely it’ll pass the maze.

You would need a data structure to represent your maze in the first place. It could be easily represented by a Dimensional Boolean array. Then, you would need to use a pathfinding algorithm (preferably A-Star). Then you would simply move your gameobject according to the result you get from A* algorithm.