Re "Infamous wargaming AI". That's a bit harsh. Maybe you meant "famous" and not "infamous".
Re AI decisions. The AI is what I refer to as "generic" in that it's not tied to a specific scenario or situation. Each unit has agency. It is aware of the situation around it and aware of the orders it has. When it receives orders it calls on its plan doctrine to develop courses of action and ultimately a plan of action. It allocates any resources under command to the various tasks in its plan and sends orders. When it commences a task it consults its task doctrine to determine what event it will execute next. Eg If it's a Move task then it will go through a series of assessments to ensure it can still move - ie it has enough fuel, it's not exhausted, everyone in the formation is where they should be etc. If it can, it schedules a new Move event for the next minute. It then executes its Move event.
After that it goes through a function called the ScheduleNextEvent(). This does a lot of the reaction and reassessment test. If none of these are activated then it will schedule the next event and so it will move along the road to its Move task's objective location. But if it encounters enemy it may well react by halting, deploying, firing, calling in fire support etc. It may reassess and change its route or abandon the task and bunker down. There are lots of different options considered every minute of the game. Once it arrives at its objective, it will determine if the task if fulfilled and if so, go onto the next scheduled task or hold in place till it receives new orders.
So at its heart, we have agents that are situationally aware and able to plan and react according to doctrine. They sometimes react in an uncontrolled manner - eg when they rout, because we model not just hard factors but soft factors like morale, cohesion, and fatigue. The doctrine are a set of rules written as C++ code. So it's a lot of if, then, else type structures. There is a set of plan and task doctrine for each type of task/order. In addition, we have code that handles force allocations, scheduling, intel, pathing, formation movement, resupply and all the base mechanics like firing, bombarding, construction, demolition, deployment, facing, fatigue, cohesion, sighting etc.