public static TransportType GetBestNextTransportWithEpsilonMush(QFuncInfo qFuncInfo, TransportType[] availableTransportTypes) { var bestTransportType = qFuncInfo.GetBestTransportType(); return(randomizer.GetRandomDouble() > Epsilon ? bestTransportType : TransportTypes.GetRandomTransportWithoutType(bestTransportType, randomizer, availableTransportTypes)); }
public static TransportType GetBestNextTransportWithEpsilonMush(QFuncInfo qFuncInfo) { var bestTransportType = qFuncInfo.BusReward > qFuncInfo.CarReward ? TransportType.Bus : TransportType.Car; if (rnd.NextDouble() > Epsilon) { return(bestTransportType); } return(PassengersHelper.GetOtherRandomTransportType(bestTransportType)); }