Hamlet and Pi are greatly disparate characters, as are their stories. Your are not, however, being asked to force similarities between the two characters; you should instead be looking for points of comparison to use for discussion of how different/similar they are. For example, both characters lose their parents in violent ways. What are the conflicts that arise from this? Are these inner conflicts or external conflicts? How do the characters resolve these conflicts? Hamlet has Horatio to use as a sounding board; Pi has Richard Parker--what is the role of confidant in helping each character in his struggle? Both characters spend some time struggling to survive on an ocean voyage. Wherever you find a connection between the two works, there is plenty of room for discussion.