protected virtual void CompareOffer(NegotiationOffer offer, Boolean sendReject = true) { if (offer == null) { return; } if (RoundsPassed == 0) { if (offer.Equals(CurrentOffer)) { AcceptOffer(); return; } } else if (RoundsPassed < Domain.NumberOfRounds - 1) { if (AllOptions[offer].Utility >= BestFScoreUtilityOffers.Values.Min(x => x.Utility)) { AcceptOffer(); return; } } else { if (AllOptions[offer].Utility >= BestCombinedUtilityOffers.Values.Min(x => x.Utility)) { AcceptOffer(); return; } } if (sendReject) Client.RejectOffer(); }
protected void SendOffer(NegotiationOffer offer, Boolean sendIdentical = true) { if (offer != null) { if (sendIdentical || !CurrentOffer.Equals(offer)) { CurrentOffer = offer; Client.SendOffer(CurrentOffer); } } }
protected virtual void CompareOffer(NegotiationOffer offer, Boolean sendReject = true) { if (offer == null) { return; } if (RoundsPassed >= 0 && RoundsPassed <= 7) { if (offer.Equals(BestOffer)) { AcceptOffer(); return; } } else if (RoundsPassed >= 8 && RoundsPassed <= 11) { if (AllOptions[offer].Utility >= FScoreOffersByUtility[0].Utility) { AcceptOffer(); return; } } else if (RoundsPassed >= 12 && RoundsPassed <= 13) { if (AllOptions[offer].Utility >= FScoreOffersByUtility[1].Utility) { AcceptOffer(); return; } } else if (RoundsPassed == 14) { if (AllOptions[offer].Utility >= FScoreOffersByUtility[2].Utility) { AcceptOffer(); return; } } if (sendReject) { Client.RejectOffer(); } }
protected virtual void CompareOffer(NegotiationOffer offer, Boolean sendReject = true) { if (offer == null) { return; } if (RoundsPassed == 0) { if (offer.Equals(CurrentOffer)) { AcceptOffer(); return; } } else if (RoundsPassed < Domain.NumberOfRounds - 1) { if (AllOptions[offer].Utility >= BestFScoreUtilityOffers.Values.Min(x => x.Utility)) { AcceptOffer(); return; } } else { if (AllOptions[offer].Utility >= BestCombinedUtilityOffers.Values.Min(x => x.Utility)) { AcceptOffer(); return; } } if (sendReject) { Client.RejectOffer(); } }