def gen_mdp(nrows=3,ncols=4,terminals = [(3,2),(3,1)],main_reward = -0.04,
            terminal_rewards = [1,-1],block_coords = [(1,1)]):
    """
    Generates a list of list to feed to the main GridMDP class from simple user API
    nrows: Number of rows
    ncols: Number of columns
    terminals: Coordinates of terminal points, list of tuples
    main_reward: The default reward for traversing the grid world
    block_coords: Coordinates of solid blocks, list of tules
    """
    
    x = [[main_reward] * ncols for i in range(nrows)]
    for i,t in enumerate(terminals):
        x[t[1]][t[0]]=terminal_rewards[i]
    for b in block_coords:
        x[b[1]][b[0]]=None
    x.reverse()
       
    return x