public override Dictionary <string, string> toValueMap() { Dictionary <string, string> vals = new Dictionary <string, string>(); vals[GameParamsValueNames.EVADERS_COUNT.key] = A_E.Count().ToString(); vals[GameParamsValueNames.PURSUERS_COUNT.key] = A_P.Count().ToString(); vals[GameParamsValueNames.PURSUERS_VELOCITY.key] = r_p.ToString(); vals[GameParamsValueNames.PURSUERS_DETECTION_PROB.key] = p_d.ToString(); vals[AdvRoutingGameParamsValueNames.CAN_PURSUERS_ELIMINATE.key] = canEliminate ? "1" : "0"; vals[AdvRoutingGameParamsValueNames.SINK_ALWAYS_DETECTED.key] = sinkAlwaysDetectable ? "1" : "0"; vals[AdvRoutingGameParamsValueNames.CAN_SENSE_ACCURATE_LOCATION.key] = accurateInterception ? "1" : "0"; vals[AdvRoutingGameParamsValueNames.SINGLE_SOURCE.key] = singleSourceRouter? "1" : "0"; vals[AdvRoutingGameParamsValueNames.CONTINUOUS_ROUTERS.key] = forceContinuousTransmission ? "1" : "0"; if (R != null) { vals[GameParamsValueNames.REWARD_FUNCTION_NAME.key] = R.GetType().Name; vals[GameParamsValueNames.REWARD_FUNCTION_ARGS.key] = R.ArgsCSV; vals.AddRange(R.ArgsData()); } else { vals[GameParamsValueNames.REWARD_FUNCTION_NAME.key] = GameParamsValueNames.REWARD_FUNCTION_NAME.val; vals[GameParamsValueNames.REWARD_FUNCTION_ARGS.key] = GameParamsValueNames.REWARD_FUNCTION_ARGS.val; } return(vals); }
public override Dictionary <string, string> toValueMap() { Dictionary <string, string> vals = new Dictionary <string, string>(); vals[GameParamsValueNames.EVADERS_COUNT.key] = A_E.Count().ToString(); vals[GameParamsValueNames.PURSUERS_COUNT.key] = A_P.Count().ToString(); vals[GameParamsValueNames.PURSUERS_VELOCITY.key] = r_p.ToString(); vals[GameParamsValueNames.EVADERS_TRANSMISSION_RANGE.key] = r_e.ToString(); vals[GameParamsValueNames.EVADERS_SENSING_RANGE.key] = r_s.ToString(); vals[GameParamsValueNames.PURSUERS_DETECTION_PROB.key] = p_d.ToString(); vals[GameParamsValueNames.REWARD_FUNCTION_NAME.key] = R.GetType().Name; vals[GameParamsValueNames.REWARD_FUNCTION_ARGS.key] = R.ArgsCSV; vals.AddRange(R.ArgsData()); vals[GameParamsValueNames.EVADERS_CAN_RECEIVE_SIMULTENOUS_BROADCASTS.key] = (canEvadersReceiveMultipleBroadcasts == true)?("1"):("0"); vals[GameParamsValueNames.SINKS_SENSE_PURSUERS.key] = (canSinksSensePursuers == true)? ("1") : ("0"); vals[GameParamsValueNames.SINKS_SAFE_POINTS.key] = (areSinksSafe == true) ? ("1") : ("0"); vals[GameParamsValueNames.EVADERS_CIRCUMFERENCE_ENTRY_KILL_PROB.key] = EvaderCircumferenceEntranceKillProb.ToString(); return(vals); }