List <float> GetJoyRowProbDeviations(MachineTestLuckyMode mode, SpinResultType resultType, List <float> rowProbs) { int joyRowCount = MachineTestUtility.GetJoyRowCount(_machineConfig, mode, resultType); List <float> result = new List <float>(joyRowCount); for (int i = 0; i < rowProbs.Count; i++) { float expectProb = MachineTestUtility.GetJoyOverallHit(_machineConfig, mode, resultType, i); float v = rowProbs[i] - expectProb; result.Add(v); } return(result); }
private void WriteSingleLuckyModeResult(MachineTestLuckyMode mode, MachineTestAnalysisLuckyModeResult luckyModeResult) { Write("LuckyMode=" + mode.ToString() + ":"); string s = string.Format("TotalConsumedBetAmount:{0}, TotalWinAmount:{1}, RTP:{2}", luckyModeResult._totalConsumedBetAmount, luckyModeResult._totalWinAmount, luckyModeResult._rtp); Write(s); s = string.Format("SpinCountInCurrentMode:{0}", luckyModeResult._spinCountInCurrentMode); Write(s); s = string.Format("EnterSpecialSmallGameStateCount:{0}, EnterSpecialSmallGameStateCountProb:{1:N6}", luckyModeResult._enterSpecialSmallGameStateCount, luckyModeResult._enterSpecialSmallGameStateCountProb); Write(s); s = string.Format("RespinCount:{0}, RespinCountProb:{1:N6}", luckyModeResult._respinCount, luckyModeResult._respinCountProb); Write(s); Write(""); if (mode != MachineTestLuckyMode.Hybrid && MachineTestAnalysisHelper.Instance.ShouldAnalysisDetail(MachineConfig.Instance)) { //payout results bool payoutAssert = (luckyModeResult._payoutRowCounts.Count == luckyModeResult._payoutRowProbs.Count) && (luckyModeResult._payoutRowCounts.Count == luckyModeResult._payoutRowProbDeviations.Count); Debug.Assert(payoutAssert); Write("Payout result:"); Write("Id, RowCount, RowProb, ExpectProb, RowProbDeviation"); for (int i = 0; i < luckyModeResult._payoutRowCounts.Count; i++) { float expectProb = MachineTestUtility.GetJoyOverallHit(MachineConfig.Instance, mode, SpinResultType.Win, i); s = string.Format("{0}, {1}, {2:N6}, {3:N6}, {4:N6}", i + 1, luckyModeResult._payoutRowCounts[i], luckyModeResult._payoutRowProbs[i], expectProb, luckyModeResult._payoutRowProbDeviations[i]); Write(s); } float expectWinTotalProb = MachineTestUtility.GetJoyTotalProb(MachineConfig.Instance, mode, SpinResultType.Win); s = string.Format("TotalProb:{0:N6}, ExpectTotalProb:{1:N6}, TotalProbDeviation:{2:N6}", luckyModeResult._payoutTotalProb, expectWinTotalProb, luckyModeResult._payoutTotalProbDeviation); Write(s); Write(""); //nearHit results bool nearHitAssert = (luckyModeResult._nearHitRowCounts.Count == luckyModeResult._nearHitRowProbs.Count) && (luckyModeResult._nearHitRowCounts.Count == luckyModeResult._nearHitRowProbDeviations.Count); Debug.Assert(nearHitAssert); Write("NearHit result:"); Write("Id, RowCount, RowProb, ExpectProb, RowProbDeviation"); for (int i = 0; i < luckyModeResult._nearHitRowCounts.Count; i++) { float expectProb = MachineTestUtility.GetJoyOverallHit(MachineConfig.Instance, mode, SpinResultType.NearHit, i); s = string.Format("{0}, {1}, {2:N6}, {3:N6}, {4:N6}", i + 1, luckyModeResult._nearHitRowCounts[i], luckyModeResult._nearHitRowProbs[i], expectProb, luckyModeResult._nearHitRowProbDeviations[i]); Write(s); } float expectNearHitTotalProb = MachineTestUtility.GetJoyTotalProb(MachineConfig.Instance, mode, SpinResultType.NearHit); s = string.Format("TotalProb:{0:N6}, ExpectTotalProb:{1:N6}, TotalProbDeviation:{2:N6}", luckyModeResult._nearHitTotalProb, expectNearHitTotalProb, luckyModeResult._nearHitTotalProbDeviation); Write(s); Write(""); } }