changing graphstate to 2d bool array for AB/BA