Fyodor Dostoyevsky
Some see the film as a loose adaptation of the short 1866 novel "The Gambler" by Fyodor Dostoyevsky.