How does an atom decide what to bond to?
Solution 1:
I'm afraid there's no real science behind this. Each bonder has a priority number likely based on the internal data structure (array, linked list, whatever). The game just processes this list in a first through last order. So the bonding order in game is just how the bonders happen to be arranged. I would be nice if they were labeled, but as far as I know there's no way to get their priority in game. So with two bonders linked, it just goes through the list sequentially. For example, with 4 bonders the list of checked links would look something like this:
- (1, 2)
- (1, 3)
- (1, 4)
- (2, 3)
- (2, 4)
- (3, 4)
Which is simply an ordered list of the pairs of priority numbers. With that knowledge, you just need to know which bonder has which priority. Though experimentation I've found that:
For 4 bonders in a fresh level the bonder priority numbers are:
1 - 2
| . |
4 - 3
For a fresh level with 8 bonders the bonder priority numbers are:
1 - 2
| . |
4 - 3
| . |
5 - 6
| . |
8 - 7
Solution 2:
I don't think that there is a strict order of bonder preference; it is based on something else.
I did the following experiment: three bonders in a horizontal row, with an unbonded H at each one. I recorded the results of the six combinations of bonders.
# order result side
a 1 2 3 H-H H L
b 3 2 1 H-H H L
c 2 3 1 H H-H R
d 1 3 2 H-H H L
e 3 1 2 H H-H R
f 2 1 3 H H-H R
I reran this many times, and there was always a 50% split with one group preferring 'L' bonding, one group preferring 'R' bonding, and one group being split. (Each group is identified by the bonder in the middle.)
So there is evidently some structure to the evaluation, but each of these six cases is contradicted by another one (if we assume the bonders evaluate in order); i.e., if (a) is the correct order, then why in (b) does the bonder prefer (2,3) over (1,2)? This is true for every case.
The mouse wheel trick seems to be doing something (it made a click and I assume processed an action), but I could not change the output of (a).