Goal-oriented action planning
Also said as GOAP, AI planner
You give the character goals and a list of actions, each with what it needs and what it causes. A search then finds the cheapest chain of actions that reaches the goal.
A character can solve a problem no one scripted, and adding a new action makes old plans better. The cost is that planning takes time, and you can't easily tell what it will decide.
Say it
“Do not script the soldier's reload. Give him a Shoot action that needs a loaded weapon, and a Reload action that causes one, and let the planner work it out.”
Where you’ve seen it
Jeff Orkin built F.E.A.R.'s soldiers this way, described in his GDC 2006 talk Three States and a Plan: a state machine of only three states, with A* planning the actions.
Not to be confused with behaviour tree
A behaviour tree is the plan, written by hand in advance. GOAP writes the plan at run time, from the rules.