Bugfix for BlockAssembly rich comparison methods
A bug in BlockAssembly.vertexAttributesEquivalent(self, other)
made comparison methods return false negatives. This came from incorrect registration between assemblies with different numbers of blocks. Specifically, if self < other
then the centers of the two assemblies will be different (in general). I fixed this by centering other
on the subset of blocks in other
that are also in self
(this is guaranteed to include all the blocks in self
if the self < other
).
I also fixed a bug in compute_stats.constructGoalState()
that was causing it to return the mirror-image of the actual goal state.
Finally, I modified BlockAssembly.draw(self, file_path, state_index)
to render a typical pyplot figure instead of writing to file if file_path == None
.