alexfrom0815 / Online-3D-BPP-PCT

Code implementation of "Learning Efficient Online 3D Bin Packing on Packing Configuration Trees". We propose to enhance the practical applicability of online 3D Bin Packing Problem (BPP) via learning on a hierarchical packing configuration tree which makes the deep reinforcement learning (DRL) model easy to deal with practical constraints and well-performing even with continuous solution space.
247 stars 45 forks source link

How to add limitation that can affect the model output? #29

Closed Shawn9257 closed 7 months ago

Shawn9257 commented 7 months ago

I've tried modifying it in the get_reward function of bin3D.py and found that it doesn't affect the results given by the model. So, if I want to give the model some constraints or preferences, should I modify the forward function in the DRL_GAT ?

    def forward(self, items, deterministic = False, normFactor = 1, evaluate = False):
        # action_log_prob, pointers, dist_entropy, hidden, dist
        o, p, dist_entropy, hidden, _= self.actor(items, deterministic, normFactor = normFactor, evaluate = evaluate)
        values = self.critic(hidden)
        return o, p, dist_entropy,values

But I can't think of a reasonable way to pass the existing state information in the environment into forward, any suggestions?