According to James Toback, before his screenplay was accepted at Paramount Pictures, and was making the rounds with actors, Peter Boyle was first interested in playing the lead. Robert De Niro lobbied hard for the role, to the point where De Niro started to dress like the writer. Toback pressured director Karel Reisz to meet with De Niro. After meeting him, Reisz said that he would not, and could not consider De Niro for the role, and if Toback kept insisting, he would not be allowed to collaborate on the film further.
Though the film is inspired by Dostoevsky's novella "The Gambler," the classroom discussion on "2 +2 = 5" and the concept of free will is based on Dostoevsky's "Notes from the Underground."
Robert Evans was keen to produce the film as his first credited production at Paramount Pictures, but Irwin Winkler, according to writer James Toback, wouldn't bow out, despite attempts by the studio to give him other projects. Evans went on to make Chinatown (1974) instead.