plot#

Functions#

plot_bandit_percent_optimal_action

Creates a plot of the percentage of optimal actions over the training episodes.

plot_bandit_probabilities

Plots the mean and variance of the bandit probabilities.

plot_bandit_rewards

Plots the rewards received by the agent(s) playing the bandits game.

prt_sim.jhu.plot.plot_bandit_percent_optimal_action(optimal_bandits: ndarray, actions: ndarray) None[source]#

Creates a plot of the percentage of optimal actions over the training episodes.

Parameters:
  • optimal_bandits (np.ndarray) – array of optimal bandit indexes

  • actions (np.ndarray) – actions chosen by the agent(s) with shape (# agents, # episodes)

prt_sim.jhu.plot.plot_bandit_probabilities(env: KArmBandits) None[source]#

Plots the mean and variance of the bandit probabilities.

Parameters:

env (KArmBandits) – bandits environment

prt_sim.jhu.plot.plot_bandit_rewards(rewards: ndarray) None[source]#

Plots the rewards received by the agent(s) playing the bandits game.

Parameters:

rewards (np.ndarray) – rewards received by the agent(s) with shape (# agents, # episodes)