def __init__(self)self num_agents self actions [[' '' '' '],[' '' '' ']self players ['agent does''agent does' def play(selfactions)return {(' '' ')( )(' '' ')( )(' '' ')( )(' '' ')( )(' '' ')( )(' '' ')( )(' '' ')( )(' '' ')( )(' '' ')( }[actions choose onegm shoppinggame(gm soccergame(gm gameshow(gm uniquenegameexample( choose one of the combinations of learnerssim=simulategame(gm,[stochasticqagent(gm actions[ ])stochasticqagent(gm actions[ ])])sim go( simsimulategame(gm,[simpleqagent(gm actions[ ])simpleqagent(gm actions[ ])])sim go( sim=simulategame(gm,[simpleqagent(gm actions[ ]),stochasticqagent(gm actions[ ])])sim go( sim=simulategame(gm,[stochasticqagent(gm actions[ ]),simpleqagent(gm actions[ ])])sim go( sim plot_dynamics( empirical proportion that agents did their action at index sim action_dist([ , ] (unnormalizedemprirical distribution for agent sim agents[ dist maslearn py -(continued solution to exercise (iof poole mackworth class stochasticqagent_i(gameagent)"""this agent maintains the -function for each state (or just the average reward as the future state is all the samechooses the best action using version june