First mistake:
void setup() {
// put your setup code here, to run once:
...
boolean stateledBot=false;
boolean stateledBMid=false;
boolean stateledTMid=false;
boolean stateledTop=false;
}
When you put the name of a type, such as boolean or int, before an assignment, you are actually creating new variables, not referring to the ones you previously declared. These new variables only exist until the next } and are then destroyed. So if you want to update an existing variable, don't put a type in front of it.
Another example:
if (stateledBot==true and stateledBMid==false){
int r=random(1,10);
}