In some cases, even when using non-random criteria, the Assemblage is different if the AssemblyObjects are ordered differently when composing the set and/or the order of Rules in the Heuristics Set is different.

This has to do with the way Assembler sorts rules, with how an algorithm searches for singularities (a minimum or a maximum) and the fact that Assembler uses discrete approximation.

Assembler sorts rules in a Data Tree with a branch path shaped as {HeS;rT} where HeS is the Heuristics Set and rT the AssemblyObject receiving type. Inside each branch, rules retain the sort order of the given input list of rules.

Candidates are selected shortlisting this Data Tree of rules (lower AssemblyObject types first).

The search for a min (or max)

Who takes the point? Yellow or Red?

Who takes the point? Yellow or Red?

Suppose that you have a bunch of objects and you want to find the one (or the ones) that have the minimum distance from a specified point. The pseudocode goes like this:

. set a variable called minDist to the maximum possible conceivable value (say, the width of the known universe)
. set a variable called minIndex to -1 (indexes go from 0 to n)

. for each object in the set to compare:
		. measure the distance from the object to the target
		. is the distance smaller than minDist? If so:
						. minDist now has the value of the distance
						. minIndex is the index of the object I am comparing

What you end up with is the minimum distance and its corresponding object index.

But what happens if more than one items in the list is the minimum? There are 2 possible cases:

if (value < minimum)

you will end up with the index of the first minimum value in the list (equal values result in a false condition).

if (value <= minimum)

you will end up with the index of the last minimum value in the list (equal values result in a true condition).

In Assembler this can happen, for example with the scalar value in a Field. Since a Field is a discrete 3D array of points in space, it’s possible for different candidates to sample the same closest scalar value. In such cases, Assembler uses case A.

Things can change if Weights are used.

For a more in-depth explanation see The logic of choice