From: François Fleuret Date: Wed, 27 Mar 2024 08:06:02 +0000 (+0100) Subject: Update. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=picoclvr.git;a=commitdiff_plain;h=888106500badae460e9ae2183512c7124601acad Update. --- diff --git a/greed.py b/greed.py index 20cef79..dc11d14 100755 --- a/greed.py +++ b/greed.py @@ -77,6 +77,8 @@ def generate_episodes(nb, height=6, width=6, T=10, nb_walls=3, nb_coins=2): rnd = rnd * (1 - wall.clamp(max=1)) rnd = torch.rand(nb, height, width) + rnd[:, 0, 0] = 0 # Do not put coin at the agent's starting + # position coins = torch.zeros(nb, T, height, width, dtype=torch.int64) rnd = rnd * (1 - wall.clamp(max=1)) for k in range(nb_coins):