plotting the following plots the price and number in stock historyagents py -(continued import matplotlib pyplot as plt class plot_prices(object)"""set up the plot for history of price and number in stock""def __init__(selfag,env)self ag ag self env env plt ion(plt xlabel("time"plt ylabel("number in stock price " def plot_run(self)"""plot history of price and instock""num len(env stock_historyplt plot(range(num),env stock_history,label="in stock"plt plot(range(num),env price_history,label="price"#plt legend(loc="upper left"plt draw( pl plot_prices(ag,envag go( )pl plot_run( hierarchical controller to run the hierarchical controllerin folder "aipython"load "agenttop py"using ipython - agenttop pyand copy and paste the commands near the bottom of that file this requires python with matplotlib in this implementationeach layerincluding the top layerimplements the environment classbecause each layer is seen as an environment from the layer above we arbitrarily divide the environment and the bodyso that the environment just defines the wallsand the body includes everything to do with the agent note that the named locations are part of the (top-level of theagentnot part of the environmentalthough they could have been environment the environment defines the walls agentenv py -agent environment version june