AI strategy to avoid connecting the third side of a box.

AI strategy to avoid connecting the third side of a box.
Modified inheritance pattern of ai.