这种情节称为“小提琴”情节:
import numpy as np
from matplotlib import pyplot as plt
# Generate 5 actions with different reward distributions
data = np.random.randn(1000, 5) * [1, 0.5, 1.5, 1, 0.5] + [0, 1, -1, 2, -0.5]
plt.violinplot(data)
plt.xlabel('Action')
plt.ylabel('Reward distribution')