Altered next on agent to return action matrix.
Updated next to shape y correctly.
Updated replay dataset to shape phi correctly.