Module homomorphism

Module homomorphism 

Source

Functions§

compute_mdp_homomorphism
Main loop of MDP‐homomorphism refinement:
compute_signature_parallel
Compute the “signature” of one state under the current partitioning. For each action, record (reward, next_partition_id).
Sorting these pairs gives us a fingerprint used to decide which states are equivalent. This version is specifically so it can be used in parallel with rayon.
get_abstraction
Top-level API: either load from cache to save time or compute the exact homomorphism. Returns (all_states, clusters), and saves to disk for next time.
get_all_states
BFS to enumerate all reachable states from the initial game state. Each unique state is assigned a unique index from [0, N]. N is the number of reachable states.