Like Tony Danza (kinda?), Alby is the de facto leader of the Glade gang. It is a role that has been thrust upon him, due to the recent demise of the previous leader, so he's doing his best to not screw things up. His main motivation is to maintain the order that has been established by the previous leaders at all costs.
A sort of moral compass that the other boys look toward for guidance, Alby often has to do the hard thing rather than what'd be easier at the time. When Ben tries to kill Thomas Alby is the one who shoots him in order to stop the attack, but you can tell he only resorts to violence as a last-ditch effort. Then, when Ben survives the arrow to the face, Alby is the one to oversee the Banishment ceremony:
"You brought this on yourself, Ben," Alby said. Then he shook his head […] "If we let shanks like you get away with that stuff," Alby said, "we never would've survived this long." (13.55, 14.15)
During Keeper meetings, Alby is the one who insists on following formal protocol for the proceedings, even though it makes him look like a huge nerd.
In other words, Alby is The Man.
Of all the characters in the book, Alby probably undergoes the most dramatic evolution. After he gets stung by a Griever and receives the Grief Serum he demonstrates why the whole process is called the Changing. Immediately upon awakening he summons Thomas to try to tell him what he remembers from before, but begins choking himself with his own hands in the process. The Creators have some kind of physical control over his body, so now he's forced to suffer his truth in silence. (What a waste though—if we were Creators we'd at least have fun with it… dancing to "Thriller" while wearing tighty whiteys sounds pretty good to us.) All Alby can do is warn Newt and Thomas to protect the Maps, showing that no matter how far gone he is, he's still trying to save the others.
Like everyone else before him, there is a new darkness that seems to shimmer just below the surface after the Changing, like his memories are causing him to slowly rot from the inside. Later, Alby admits that he's not really himself, and says that he'll remain the leader but Newt needs to be the guy actually making decisions—the man behind the curtain, if you will. And for good reason: in a moment of insanity (perhaps Creator-induced?) Alby tries to destroy the Maps, going so far as to fake his own assault in order to throw the other boys off his scent. That just smacks of desperation, doesn't it? So he goes from a reluctant but firm leader to someone who is duplicitous and undermining of the whole enterprise—at least until he sacrifices himself to make the escape possible.
Alby's transformation from leader to martyr happens because of the control the Creators and his newfound memories have over him. Because he can now remember the Flare and the horrors that come with it, he desperately clings to the Glade and the idyllic life it can offer (if booger-monsters can be described as such). But how much of the traitorous behavior is him being a jerkface, and how much is he just a puppet obeying his strings? Through his actions we see exactly how morally bankrupt the Creators are, and to what lengths they are willing to stoop to in order to manipulate those in their experiment.