//Verify DTMC: SSP public bool verifyMDPSSP(Simulation sml, Policy policy, out string report) { report = null; policy.reSetPlan(); while (policy.hasPolicy()) { reSetRunTest(); report += policy.reportAdversary(policy.updatePolicy()); bool result = singleSamplingTest(sml); string st = result ? "Hypothesis Accepted!" : "Hypothesis Rejected!"; report += "\nSingle Sampling Plan Result:\n" + sprtcount + "/" + sprttotal + "\n" + st; if (!result) return false; } return true; }
//Verify DTMC: SPRT public bool verifyMDPSPRT(Simulation sml, Policy policy, out string report) { report = null; policy.reSetPlan(); while (policy.hasPolicy()) { reSetRunTest(); report += policy.reportAdversary(policy.updatePolicy()); bool result = sequentialProbRatioTest(sml); // following two statements only used for string st = result ? "Hypothesis Accepted!" : "Hypothesis Rejected!"; report += "\nSeqential Ration Plan Result:\n" + sprtcount + "/" + sprttotal + "\n" + st; if (!result) return false; } return true; }