Auto assigning rooms can be done in 2 ways : linearly or globally.

The automated planner takes the hard path of global assignment :it takes ALL your objectives, preferences and constraints to build the optimal solution.

It is a very complex mathematical approach called Operational Research.

You can create constraint and awards