public override void Initialize(Negotiation.Models.NegotiationDomain domain, Negotiation.Models.SideConfig strategyConfig, string opponentSide, Negotiation.Models.INegotiationClient client) { base.Initialize(domain, strategyConfig, opponentSide, client); m_BestCombinedUtilityOffers = new Dictionary <string, OfferUtility>(BestCombinedUtilityOffers); m_BestFScoreUtilityOffers = new Dictionary <string, OfferUtility>(BestFScoreUtilityOffers); m_typeUtilities = Domain.OwnerVariantDict[OpponentSide].Keys.ToDictionary(k => k, k => 0.0); }
public override void Initialize(Negotiation.Models.NegotiationDomain domain, Negotiation.Models.SideConfig strategyConfig, string opponentSide, Negotiation.Models.INegotiationClient client) { base.Initialize(domain, strategyConfig, opponentSide, client); m_BestCombinedUtilityOffers = new Dictionary <string, OfferUtility>(BestCombinedUtilityOffers); m_BestFScoreUtilityOffers = new Dictionary <string, OfferUtility>(BestFScoreUtilityOffers); var opponentTypes = domain.OwnerVariantDict[opponentSide].Keys; m_typeProbabilites = opponentTypes.ToDictionary(k => k, x => (1.0 / opponentTypes.Count)); var utilitySums = opponentTypes.ToDictionary(k => k, k => AllOptions.Values.Sum(x => x.UtilityDataDict[k].OpponentUtility)); m_offerProbabilities = AllOptions.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.UtilityDataDict.ToDictionary(kvp2 => kvp2.Key, kvp2 => kvp2.Value.OpponentUtility / utilitySums[kvp2.Key])); }