r/MachineLearning - [D] Deriving perfect hash function and possibly encoding as well

#artificialintelligence 

I'm trying to create a toy poker hand evaluator. There are a little over 133 million possible 7 card combinations in a 52 card deck ( c(52,7)) but there there are less than 4 thousand possible resulting hands given that the best 5 cards are taken, equal flushes are ties, etc. Further, there exists a fast solution (two-plus-two) that uses a giant table where each card indexes to the next card and the final card is the index to the answer. So this is effectively a kind of "split up hash function" if you will, I believe there must be a hash function that could be used without using this large multi-index table strategy. So my question is, how would one use machine learning to go about solving this problem? I can uniquely encode all 133 million combinations and I can put them together with the answer they should produce.