How to programatically spawn some pawns and attach controllers to them?

Hi, im also trying to spawn cubes (to make a tetris game) from an AIController class, and the issue is that everytime a cube is spawned, the AiController Blueprint is duplicated at run time. The issue is that in BeginPlay() method, spawn is called so everytime AiController Blueprint is duplicated for the new pawn another SpawnActor() loop is run. it leads to endless spawning thus UE4 Crashes.
I’d like one single AiController_BP (at run time) for my whole cubes array. How to do so please ?