Having run off into the woods, Tom fantasizes about what it would be like to "die temporarily." He soon grows less depressed, imagining his exploits as various heroes, from an Indian to a pirate, after he runs away from St. Petersburg.
He begins preparing for to run away, first digging for a box he hid under a log. He's upset to find only one marble in it, because he had thought that by burying the box the single marble would multiply into many more. He follows up with rituals involving a doodle-bug and more marbles.
Rather than accept that magic doesn't exist, Tom simply keeps inventing new tricks that might work. Magic can always come to his aid, for it can never really be disproved. In this way, it does in fact have quite curative effects over the spirit. Yet, for Tom to mature he must start to learn from his experiences, which requires leaving his superstitions behind.
When Joe Harper arrives, Tom declares the woods to be "Sherwood Forrest." They play at sword-fighting, then take on almost every role from Robin Hood as various characters are killed off. Heading home, they agree they'd rather be outlaws than Presidents.
The rules of the boys' fantasy world are not strict like those of the adult world. In their world they can be and do whatever they want. The romantic tale of Robin Hood appeals to Tom, as its improbable twists and turns echo his perception of the world. Tom's ability to remember the intricacies of the plot of Robin Hood, with all its characters and quotations, reveal that he is much more intelligent than his failures in the classroom would suggest.