コード例 #1
0
        public static TransportType GetBestNextTransportWithEpsilonMush(QFuncInfo qFuncInfo, TransportType[] availableTransportTypes)
        {
            var bestTransportType = qFuncInfo.GetBestTransportType();

            return(randomizer.GetRandomDouble() > Epsilon
                ? bestTransportType
                : TransportTypes.GetRandomTransportWithoutType(bestTransportType, randomizer, availableTransportTypes));
        }
コード例 #2
0
        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));
        }