Skip to content

some code errors in the package /envs/Packing #3

@happy-astrouant

Description

@happy-astrouant

First, in file /envs/Packing/env.py, there is an issue with the definition of the type of mask in the following code snippet:

self.observation_space = spaces.Dict(
    {
        "obs": spaces.Box(low=0, high=max(self.bin_size), shape=(obs_len, )),
        "mask": spaces.Discrete(self.k_placement)  # actually, mask is an array
    }
)

Second, in the file /envs/Packing/ems.py, there is an issue with the caluation process of the ems. In func compute_ems, the key variable y_border seems to be an error value:

x_borders = list(np.unique(np.where(x_diff_hm_1 != 0)[0]))
y_borders = list(np.unique(np.where(y_diff_hm_1 != 0)[0]))

As the variable y_diff_hm_1 means h[i, j] - h[i, j+1], the y_border index is np.where(y_diff_hm_1 != 0)[1]) instead of np.where(y_diff_hm_1 != 0)[0])

At last, I want to know if such an error impact the expriment results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions