def evaluate_random(agent_type, env, agent, num_episodes, verbose=True):
    num_positive = 0
    num_negative = 0
    total_profit = 0.0
    total_steps = 0
    for _ in range(num_episodes):
        (profit, step) = evaluate(env, agent, verbose=False)
        if (profit > 0):
            num_positive += 1
        else:
            num_negative += 1
        total_profit += profit
        total_steps += step
    avg_num_steps_per_episode = (total_steps / num_episodes)
    if verbose:
        print('###[{0:6}] POSITIVE: {1}/{3}, NEGATIVE: {2}/{3}, TOTAL PROFIT: {4:.1f}, AVG. STEP FOR EPISODE: {5:.1f}'.format(agent_type, num_positive, num_negative, num_episodes, total_profit, avg_num_steps_per_episode))
    return (total_profit, avg_num_steps_per_episode)
def evaluate_random(agent_type, env, agent, num_episodes, verbose=True):
    num_positive = 0
    num_negative = 0
    total_profit = 0.0
    total_steps = 0
    for _ in range(num_episodes):
        (profit, step) = evaluate(env, agent, verbose=False)
        if (profit > 0):
            num_positive += 1
        else:
            num_negative += 1
        total_profit += profit
        total_steps += step
    avg_num_steps_per_episode = (total_steps / num_episodes)
    if verbose:
        print('###[{0:6}] POSITIVE: {1}/{3}, NEGATIVE: {2}/{3}, TOTAL PROFIT: {4:.1f}, AVG. STEP FOR EPISODE: {5:.1f}'.format(agent_type, num_positive, num_negative, num_episodes, total_profit, avg_num_steps_per_episode))
    return (total_profit, avg_num_steps_per_episode)