def solve(self): """ Solve the POMDP by executing the solver. Returns: The POMDPAlphaVectors policy solution to the POMDP. """ policy = pav.POMDPAlphaVectors() result = npp._nova.pomdp_pbvi_execute_cpu(self.pomdpPtr, self, policy) if result != 0: print("Failed to execute the 'nova' library's CPU POMDP solver.") raise Exception() return policy
def get_policy(self): """ Get the policy computed by the solver. Returns: The POMDPAlphaVectors policy solution to the POMDP. """ policy = pav.POMDPAlphaVectors() result = nph._nova.pomdp_hsvi2_get_policy(self.pomdpPtr, self, policy) if result != 0: print( "Failed to get the policy for the 'nova' library's CPU POMDP solver." ) raise Exception() return policy