示例#1
0
 def bid(self, player_state, available_locations, current_bid_by_player_id,
         current_highest_bid):
     if current_highest_bid >= player_state.money or \
             (len(player_state.cards) > 0 and max(available_locations) < sum(player_state.cards) / len(player_state.cards)) or \
             (len(player_state.cards) > 0 and min(available_locations) > sum(player_state.cards) / len(player_state.cards)) or \
             current_highest_bid >= 10:
         return BidResponse(forfeit=True)
     return BidResponse(bid=current_highest_bid + 1)
示例#2
0
 def bid(self, player_state, available_locations, current_bid_by_player_id,
         current_highest_bid):
     if max(available_locations) - min(
             available_locations) <= self.difference:
         return BidResponse(forfeit=True)
     if player_state.money <= current_highest_bid:
         return BidResponse(forfeit=True)
     if self.investment_value(
             max(available_locations)) < current_highest_bid:
         return BidResponse(forfeit=True)
     return BidResponse(bid=current_highest_bid + 1)
示例#3
0
    def bid(self, player_state, available_locations, current_bid_by_player_id,
            current_highest_bid):
        if len(available_locations) == 3 and available_locations[0] >= 19:
            return BidResponse(forfeit=True)

        if current_highest_bid <= available_locations[-1] - 15:
            if current_highest_bid >= player_state.money:
                return BidResponse(forfeit=True)
            return BidResponse(bid=current_highest_bid + 1)

        return BidResponse(forfeit=True)
示例#4
0
 def bid(self, player_state, available_locations, current_bid_by_player_id, current_highest_bid):
     if current_highest_bid >= player_state.money:
         return BidResponse(forfeit=True)
     locations = available_locations
     locations.sort()
     dif = locations[-1] - locations[0]
     if dif <= 3:
         return BidResponse(forfeit=True)
     elif dif >= 10:
         if current_highest_bid <= locations[-1] / 2:
             return BidResponse(bid = current_highest_bid + 1)
     return BidResponse(bid=current_highest_bid + 1)
示例#5
0
    def bid(self, player_state, available_locations, current_bid_by_player_id,
            current_highest_bid):
        if current_highest_bid >= player_state.money:
            return BidResponse(forfeit=True)

        # Take into account the possible profit
        if (
                max(available_locations) - min(available_locations)
        ) < self.__location_limit or current_highest_bid >= self.__raise_limit:
            return BidResponse(forfeit=True)

        return BidResponse(bid=current_highest_bid + 1)
示例#6
0
    def bid(self, player_state, available_locations, current_bid_by_player_id, current_highest_bid):
        """ MUST """



        if  current_highest_bid >= player_state.money:
            return BidResponse(forfeit=True)
        if max(available_locations) - min(available_locations) <=4:
            return BidResponse(True)
        elif max(available_locations) - min(available_locations) > 20:
            if current_highest_bid < 13:
                return BidResponse(bid=current_highest_bid + 1)
        return BidResponse(True)
示例#7
0
	def bid(self, player_state, available_locations, current_bid_by_player_id, current_highest_bid):
		self.__max_raise_limit = player_state.money / 5
		self.__med_raise_limit = player_state.money / 10
		self.__min_raise_limit = player_state.money / 15
		highest_card = max(available_locations)
		lowest_card = min(available_locations)
		if highest_card - lowest_card <= self.__max_take_difference:
			return BidResponse(forfeit = True)
		if highest_card > 20:
			#pay up to max limit
			if current_highest_bid < self.__max_raise_limit:
				return BidResponse(bid = current_highest_bid + 1)
			return BidResponse(forfeit = True)
		if highest_card > 10:
			#pay up to medium limit
			if current_highest_bid < self.__med_raise_limit:
				return BidResponse(bid = current_highest_bid + 1)
			return BidResponse(forfeit = True)
		#pay up to medium limit
		if current_highest_bid < self.__min_raise_limit:
			return BidResponse(bid = current_highest_bid + 1)
		return BidResponse(forfeit = True)
示例#8
0
 def bid(self, player_state, available_locations, current_bid_by_player_id, current_highest_bid):
     if (current_highest_bid >= player_state.money) or (random.random() < self.__random_level):
         return BidResponse(forfeit=True)
     return BidResponse(bid=current_highest_bid + 1)
示例#9
0
 def bid(self, player_state, available_locations, current_bid_by_player_id, current_highest_bid):
     return BidResponse(forfeit=True)
示例#10
0
 def bid(self, player_state, available_locations, current_bid_by_player_id,
         current_highest_bid):
     if current_highest_bid >= player_state.money:
         return BidResponse(forfeit=True)
     return BidResponse(bid=current_highest_bid + 1)