As has been stressed herein, you will find that it is necessary to assume the vorious roles and personae of all creatures not represented by players. This can be particularly difficult in combat situations. You must be able to quickly determine what the monsters involved will do in any given situation, and this can be particularly difficult in combat situations.
It is necessary that you make a rule to decide what course of action the monsters will follow BEFORE the party states what they are going to do. This can be noted on the area key or jotted down on paper. Having such notes will save you from later arguments, as it is a simple matter to show disgruntled players these ”orders” when they express dissatisfaction with the results of such an encounter. The intelligence and wisdom of concerned monsters are principal determinants of their actions and/or reactions. Consider also cunning and instinct. It is also important to remember that lawful indicates an organized and ordered approach, while chaotic means a tendency towards random, individual action and disorganization; but these modifiers must also be judged in light of the monsters concerned, of course.
-DMG, pg 104