The One Ring had certain amount of self awareness and self control, as it could change it’s size to fall off of the person wearing it, as it did with Isildur and Gollum or use it’s own innate power to compel the wearer to a degree in order to benefit it’s return to Sauron.
Why does Gollum want the Ring in The Hobbit?
The version of the story given in the first edition became the lie that Bilbo made up to justify his possession of the Ring to the Dwarves and Gandalf. In the new version, Gollum pretended that he would show Bilbo the way out if he lost the riddle-game, but he actually planned to use the Ring to kill and eat him.