-
Notifications
You must be signed in to change notification settings - Fork 33
Question on the hash_state_action function #1
Copy link
Copy link
Open
Description
graph_adversarial_attack/code/graph_attack/nstep_replay_mem.py
Lines 54 to 66 in 57b2853
| def hash_state_action(s_t, a_t): | |
| key = s_t[0] | |
| base = 179424673 | |
| for e in s_t[1].directed_edges: | |
| key = (key * base + e[0]) % base | |
| key = (key * base + e[1]) % base | |
| if s_t[2] is not None: | |
| key = (key * base + s_t[2]) % base | |
| else: | |
| key = (key * base) % base | |
| key = (key * base + a_t) % base | |
| return key |
Is this hash function problematic? It seems that this function is equivalent to key = a_t % base.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels