The likely first reference to Ranka is a poem written by Ki no Tomonori (a Japanese poet & court official) in ~ 900 A.D. The poem describes his return from China to Japan:
furusato wa ... ... Here in my hometownThe legend involves a woodcutter called Wang Chih who encounters 2 immortals deep in the mountains who are playing a game of Go:
mishi goto mo arazu ... ... things are not as I knew them.
ono no e no ... ... How I long to be
kuchishi tokoro zo ... ... in the place where the axe shaft
koishikarikeru ... ... moldered away into dust.
Wang Chih was a hardy young fellow who used to venture deep into the mountains to find suitable wood for his axe. One day he went farther than usual and became lost. He wandered about for a while and eventually came upon two strange old men who were playing go, their board resting on a rock between them. Wang Chih was fascinated. He put down his axe and began to watch. One of the players gave him something like a date to chew on, so that he felt neither hunger nor thirst. As he continued to watch he fell into a trance for what seemed like an hour or two. When he awoke, however, the two old men were no longer there. He found that his axe handle had rotted to dust and he had grown a long beard. When he returned to his native village he discovered that his family had disappeared and that no one even remembered his name. [Source]