You need to compute a hash key of a position in your game. For some games, a Zobrist key is a very convenient way to go about it, but perhaps this isn't the case for your game.
Can you describe what a position in your game looks like?
EDIT: Also, your Math seems wrong: 2*20*5*20*20*2*4*5*4*5 entries * 8 bytes/entry ~= 488 MB