def strategy_best(cookies, cps, history, time_left, build_info):
    """
    Always buy the item offering the lowest cost per cps in the time left.
    """
    info_object = build_info.clone()
    items_list = info_object.build_items()
    item_to_buy = None
    min_cost_per_cps = float("inf")

    for item in items_list:
        item_cost = info_object.get_cost(item)
        item_cps = info_object.get_cps(item)
        item_cost_per_cps = item_cost / item_cps
        if (item_cost - cookies) / cps > time_left:
            continue
        elif item_cost_per_cps < min_cost_per_cps:
            min_cost_per_cps = item_cost_per_cps
            item_to_buy = item

    return item_to_buy