Star Trek: Asterisk "Datalore"

Vital Information
Series: The Next Generation
Episode: S01E13
Air Date: January 18, 1988
Written by: Robert Lewin, Gene Roddenberry and Maurice Hurley
Directed by: Rob Bowman

Data goes to his home planet and finds his evil twin who has made friends with a crystalline entity.

So, the Enterprise is passing by Omichron Theta on their way back from another mission and decide to stop by because this is Data's planet of origin. There was a colony on the planet 26 years ago, but they apparently all died after giving an brand new and non-activated Data some of their most important memories. They left him laying out in the open while they disappeared. When Riker assembles an away team to investigate where Data was left, Data explains that the crew that found him tripped a marker beacon that woke him up and he's been with Starfleet ever since.

While examining the rock wall around the place where Data was found, Geordi discovers that it was man-made. He finds and opens a door and leads the team into a very impressive and advanced laboratory. On the walls of the labs are children's pictures of something that looks dangerous. And all Data can remember is Dr. Noonian Soong working at one of the stations. Geordi recognizes this name as Earth's foremost robotics scientists who tried to create a positronic brain, failed, and ran away. Data recognizes this name as "Dad." Apparently he didn't fail.
He succeeded. Twice. (At least.)
They head over to this closet, open it and find parts to an android that look exactly like Data. There's a head, arms, torso, ass - pretty much everything you need to make a "fully functional" android. Data insists that they bring it back and try to put it together. An engineering team puts together the new android while examining Data as a reference. Data tells Dr. Crusher about his off-switch in strictest confidence during the assembly. When the new android wakes up he calls himself Lore. He says he was made to replace the "imperfect" Data.

So, what do you do when you've just activated a new android and have no idea of what it's capable? Teach it how to drive the ship, of course! In an effort to prove that he's just like Data, Lore takes to learning the helm controls. Then Riker asks him a math question that he fumbles on and exhibits a physical tick in his cheek muscles. Clearly there are some kinks to be worked out. For example, he has this odd predilection to knock out Data with champagne and then try to take over his life.
'Cause that's just what evil twins do.
Having tricked the crew into thinking he's Data, he sets off to contact the crystalline entity that had attacked the colony back at Omichron Theta. The crystalline entity feeds off of life forms and Data and Lore survived because, well... they weren't technically alive. When his subspace transmission is detected, Picard sends Wesley to see what's going on. Lore, acting as Data, explains that "Lore" attacked him and he had to knock him out. But he's using contractions and facial ticking and stuff. He plays it off, but Wes knows... Wes... knows...

Back on the Bridge, Lore attempts to take over Data's work and Picard is ready to let him, but Wesley totally objects. In fact, he objects so loudly and so often that Picard is forced to say (all together now...): "SHUT UP, WESLEY!" Meanwhile, the crystalline entity shows up and "Data" contacts it and then suggests giving it a show of force by beaming out a tree and hitting it with a phaser. Picard agrees, and "Data" goes off with Worf to the cargo bay to make it so. Only he doesn't. Instead, he knocks Worf out and plans to lower the shields to let the crystalline entity in to feed.
Klingons got nothin' on androids.
Well, Wesley is forced off the bridge because of his insolence, but instead of going to his room, he goes to Data's room and finds Data laying on the floor. Along with his mother, Wesley goes with Data to the cargo bay to stop Lore in his evil plans. Beverly points a phaser at Lore, but Lore easily takes it from her and then threatens to kill Wesley unless she leaves. She does, but Lore shoots her in the shoulder before she can get far. Data and Lore then fight it out and Data ends up pushing Lore onto the transporter pad while Wesley activates it, beaming him out into space. When Picard arrives with Beverly, he finds everything to be in order and discovers that the entity is going away. He tells Data to change into a proper uniform and they all lived happily ever and learned a valuable lesson about Wesley being a genius.

Overall Thoughts
I love all the background we get on Data in this episode. I'm pretty sure Data is far and away the favorite character in this series for the vast majority of fans, and this episode goes a long way toward digging into his background and what he's made of. Literally. There are a few evil twin cliches this episode could have lived without, but they get away with it by being androids. The important part is that Brent Spiner is a genius.