Run Plays - Hole Direction?

So I’m looking at the plays.xml.
And I’m looking at the commands for running plays.
If you tell the RB to “dive” how does he know whether to dive left or right?
Which gap is he hitting? A gap between the C-G or B gap between G-T
I see on “sweep” command left or right is included? But again which gap is he hitting?
Does it depend on linemen blocking?
I see one dive play where all linemen “run block center”
And another where the Center and the right side “run block center” and the left side has “run block left”
Does that mean the RB knows that gap where left block and center block are? (Does that make sense)
So on the dive play where the entire line run blocks center does that back just run straight up the middle?
If so, is that the same on the sweep play where almost the entire line is blocking left? How would the RB know where to go in that case?
Sorry for all the questions. I just want to know what I’m doing when I create run plays.
And I’m looking at the commands for running plays.
If you tell the RB to “dive” how does he know whether to dive left or right?
Which gap is he hitting? A gap between the C-G or B gap between G-T
I see on “sweep” command left or right is included? But again which gap is he hitting?
Does it depend on linemen blocking?
I see one dive play where all linemen “run block center”
And another where the Center and the right side “run block center” and the left side has “run block left”
Does that mean the RB knows that gap where left block and center block are? (Does that make sense)
So on the dive play where the entire line run blocks center does that back just run straight up the middle?
If so, is that the same on the sweep play where almost the entire line is blocking left? How would the RB know where to go in that case?
Sorry for all the questions. I just want to know what I’m doing when I create run plays.