new version

added a hash table for storing the heuristic of a state so it will not
calculate equal states heuristic twice.
changed the state array to byte[][]