Mr. Robot is a mind-bending drama/thriller that has had many twists and turns. As the series comes to a close with its fourth and final season set to air its last episode on December 29, we have gotten to know the cast of characters pretty well.

The series follows reclusive hacktivist Elliot Alderson (Rami Malek) who suffers from social anxiety and depression, and is fed up with the world, mega corporations ruling over society, and people doing terrible things. He sets out to take down the biggest conglomerate, E Corp., which he refers to as “Evil Corp,” using his hacktivist group fsociety. And he follows orders from an anarchist known as Mr. Robot (Christian Slater).

Through the series, we find out a lot about who Elliot really is, his past, his friends and family, and what’s up with Mr. Robot. While most characters on the series are incredibly smart, some are smarter than others. Here’s a ranking of them all. Note: spoilers about the series ahead.

Fernando Vera

Fernando (Elliot Villar) is first introduced as the drug supplier of Elliot’s girlfriend Shayla. He quickly proves how menacing he is when he murders Shayla and shows her body to Elliot.

In the final season, he kidnaps Elliot - not to hurt him, but to pick his brain. He’s so enamored with Elliot and his abilities that he wants to partner up. But while Fernando clearly has enough smarts to have launched his own little empire, he is really nothing more than a low-life drug dealer with high aspirations of being a kingpin. But he would never get there because he didn’t have the smarts to back it up.

Angela Moss

Angela (Portia Doubleday) has good intentions, and she has always been a great friend to Elliot and his sister Darlene, growing up with them as kids and sharing a bond of having parents who died due to a factory leak. While she’s clearly a smart woman, she lets emotions cloud her judgment. She eventually gets caught up with the enemy, Whiterose, who promises to help her live a life that erases away all of her past sadness, including the death of her mother.

She slowly descends into a state that can only be considered madness as she desperately tries to become someone else, wanting to believe what Whiterose promises is true.

Phillip Price

While mostly motivated by greed, Phillip (Michael Cristofer) is not an unintelligent person. As the CEO of E Corp., he managed to position himself at the top, though he eventually realized that he really answered to Whiterose.

However, he managed to turn E Corp. into a bigger conglomerate than it was before he took over, entering new areas of business like technology and media. In the end, he showed enough smarts to find a way to turn on Whiterose, making it his final valiant act.

Tyrell Wellick

Tyrell (Martin Wallstrom) is smarter than he let on, but his intelligence was often masked by his desperate desire to move up the corporate ladder and his obsession with Elliot’s abilities. As the former Senior Vice President of Technology at E Corp., he’s the person Whiterose wants to take over when Phillip says he’s stepping down.

He’s a knowledgeable technician who actually knows how to code rather than just being a brain in a suit who doesn’t know how to do the job of his underlings.

Dominique DiPierro

While many of the characters on the series possess smarts related to computing, Dominique (Grace Gummer) has a different type of smarts. As an FBI agent, she is always thinking several steps ahead of the people she’s investigating. And even when her back is against the wall, she finds a way to get out of a life-threatening jam.

She is a gifted investigator who got caught up in the Five/Nine Hack and solved the case, though it led to a domino effect of trouble that she just couldn’t seem to shake.

Krista Gordon

Played by Gloria Reuben, Krista is Elliot’s court-appointed therapist who, while she makes terrible decisions in her personal romantic life, is gifted at her job. She seems to be the only person Elliot trusts beyond his sister Darlene, and the only person who can get him to open up. For this very reason, Fernando kidnapped her in an effort to find out Elliot’s weaknesses (arguably his only clever move.)

Krista doesn’t come from Elliot’s world, but it is revealed in the final season that she understood all along what was causing so much of Elliot’s pain, and who Mr. Robot really was. But she didn’t reveal that truth to Elliot because she felt he wasn’t ready yet to accept it.

Darlene Alderson

Elliot’s younger sister, Darlene (Carly Chaikin) is just as smart a coder as he is, proficient in hacking and programming. Working alongside him in fsociety, there’s no task she can’t handle with a computer or smartphone in her hand. While sharing the same troubled childhood as Elliot, she isn’t as reclusive as him, though she shares the same distaste for the state of the world.

A brilliant mind, Elliot could never have achieved the Five/Nine Hack without her. And she can go with him toe-to-toe on any hacking job.

Whiterose

As the leader of the Chinese hacker group the Dark Army, Whiterose, known publicly as a prominent Chinese government official, Minister Zhi Zhang (BD Wong), is a transgender woman with a sinister and mysterious plot that Elliot wants to stop.

Whiterose is incredibly smart, using her job, power, and influence to pull the strings behind the scenes for multiple corporations and governments from around the world. And she surrounds herself with even smarter people to achieve her goals. While she doesn’t really have a moral compass, she has worked studiously to get world powers on board and do her bidding.

Mr. Robot

Seeing as (spoiler alert) Mr. Robot (Christian Slater) is actually a representation of Elliot’s split personality, taking on the form of his dead father, he would logically have to rank alongside Elliot as the smartest of the group.

As the co-founder and leader of fsociety, Mr. Robot is more confident than Elliot and willing to take risks whereas Elliot is often unsure and afraid. Once Mr. Robot takes over, though, Elliot is more willing to do something questionable, like hack into a device or network, that he wouldn’t have the courage to do as himself.

Elliot Alderson

When it comes down to it, even though Mr. Robot is more confident than Elliot (Rami Malek), it’s Elliot himself who is the true genius. He came up with the brilliant plan for Five/Nine, even if he needed to rely on a dissociated personality to go through with it. He hacked into anyone and anything to achieve the impossible. And he took down the biggest corporation in America.

A cybersecurity engineer by occupation, he is more focused on his career as a vigilante hacker, stopping big corporations and individuals, alike, from doing terrible things – whether it’s hoarding consumers’ money or cheating on a spouse. There’s no hacking job too big, or too small, for his gifted, though troubled, mind.