13th episode of the first season of Star Trek: The Original Series
screenwriter: Barry Trivers
director: Gerd Oswald
Wikipedia