Implement an epsilon-greedy multi-armed bandit simulation epsilon_greedy(true_rates, n_rounds, epsilon, seed=0):
rng.random() < epsilon pick an arm uniformly with rng.integers(len(arms)); otherwise pick the arm with the highest estimated rate (ties to the lower index; unplayed arms have estimate 0)rng.random() < true_rates[arm] and update that arm's count and running meannp.random.default_rng(seed) with calls in exactly this order each roundReturn (pulls, total_reward) where pulls counts plays per arm.