

def test_number_of_cells():
    ' Ensure create appropriate # of cells (despite ``discretization``) '
    mapDir = os.path.join(__rlpy_location__, 'Domains', 'GridWorldMaps')
    mapname = os.path.join(mapDir, '4x5.txt')
    domain = GridWorld(mapname=mapname)
    memory = 30
    num_tilings = [2]
    resolutions = [4]
    dimensions = [[0, 1]]
    rep = TileCoding(domain, memory, num_tilings, resolutions, resolution_matrix=None, dimensions=dimensions, safety='super')
    assert (rep.features_num == memory)

dataset/ETHPy150Open rlpy/rlpy/tests/test_representations/test_TileCoding.py test_number_of_cells/original