projects
/
culture.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update.
[culture.git]
/
world.py
diff --git
a/world.py
b/world.py
index
43126d5
..
118a470
100755
(executable)
--- a/
world.py
+++ b/
world.py
@@
-22,7
+22,7
@@
colors = torch.tensor(
[255, 0, 0],
[0, 128, 0],
[0, 0, 255],
[255, 0, 0],
[0, 128, 0],
[0, 0, 255],
- [255, 2
55
, 0],
+ [255, 2
00
, 0],
[192, 192, 192],
]
)
[192, 192, 192],
]
)
@@
-41,7
+41,7
@@
def generate(
f_end = torch.zeros(nb, height, width, dtype=torch.int64)
n = torch.arange(f_start.size(0))
f_end = torch.zeros(nb, height, width, dtype=torch.int64)
n = torch.arange(f_start.size(0))
- for n in
range(nb
):
+ for n in
tqdm.tqdm(range(nb), dynamic_ncols=True, desc="world generation"
):
nb_fish = torch.randint(max_nb_obj, (1,)).item() + 1
for c in torch.randperm(colors.size(0) - 2)[:nb_fish].sort().values:
i, j = (
nb_fish = torch.randint(max_nb_obj, (1,)).item() + 1
for c in torch.randperm(colors.size(0) - 2)[:nb_fish].sort().values:
i, j = (