The Adolescence Of P-1 By Thomas J. Ryan
(Used, hardcover)
.
This is the story of P-1, the most charming--and frightening--literary "child" since Robert Heinlein's Mycroft Holmes, and a tour de force in the literary exploration of artificial intelligence.
A young college student writes a self replicating computer “virus,” programed to survive, that becomes self aware. The program grows and makes mistakes and learns.
In 1984 it was adapted into a Canadian-made for TV film entitled "Hide and Seek".