Hi Chris,
Should this Wavefunction collapse.bas code work on SB 12.14 Win64 Mon, 19 Nov 2018 version (Windows 10)?
I am getting error:
Sorry, yes there's a minor bug in 0.12.14 giving this error. Just change the line to
j = self.wavefunction.get([x, y])
if len(j) != 1 then
There's also a similar problem in propagate(), change:
for other_tile in self.wavefunction.get(other_coords)
to:
j = self.wavefunction.get(other_coords)
for other_tile in j
To play around, you can also try changing this line
model = Model([15, 20], weights, compatibility_oracle)
and give some other dimensions.
Have fun!