I think Richard did know Locke, and the reason he was disappointed when he met the "young" Locke was because he was searching for him due to their having met in the past, but when young Locke failed the test, Richard thought he hadn't found the right John Locke and would have to keep looking.
That was my supposition as well. That Alpert had come looking for John Locke but assumed after the test that he had found a different Locke.
Because of the knife.
But I knew Alpert had found the right Locke because Locke never wanted to be what others want him to be. He wants to be his own man and few others ever got that except Ben, but he still thought he could prevent that by disposing of him. Alpert wants Locke to lead, but Locke doesn't really want to lead, per se, despite his apparent jealousy of Jack. Locke is a trailblazer or scout, not a traditional leader. He doesn't want people to follow and obey him like Ben, or even to be looked to regularly, like Jack, he wants to be out ahead and to understand. His leadership is not based on influence, but on accumulated wisdom.
But the island wants a "wild card," and a "starting over" point now, and so it has been maneuvering for Locke for a long time. It wants to escape the Ben-Widmore tesseract. That's why it had Ben move it.
It wants to be moved beyond that particular paradigm, solve that series of conflicts once and for all, and figures Locke is the man to do that.
And he is.
Locke is the wild card that refuses to be pigeon-holed and thereby refuses to be "led." He also refuses to "lead" in the traditional sense. He's a background man. Man behind the scenes. In some ways he is a spymaster like Ben, but he isn't interested in manipulating others so much as manipulating events. To discover what is really going on.
Locke has been way ahead of everyone else for a long time, so far ahead he doesn't know where he is going yet because he got so far out in front he couldn't "see behind him anymore."
He got to the end of the trail before he realized he should be observing how it led backwards, or where he had come from.
That's why he's got to keep skipping backwards.
He's backtracking to try and figure out everything he missed along the way.
He's a tracker who forgot to put down his golden thread so he could get back out of the labyrinth.
But he'll get there and I wouldn't be surprised if he gets Sawyer or someone else to kill him to do it.