How do you fight frontier brains?

Each facility in the battle frontier has a frontier brain to challenge them beat each facility 3 times in a row the next time you get to the 7th trainer it will be the frontier brain.