If you label the device as follows:
A B C
1 2 3
4 5
6 7 8
Then the buttons A, B, and C have these general cycles:
A - (I)1,4,7 (II)1,6 (III)1,4,6 (IV)1,6
B - (I)2,5,8 (II)2,4,7 (III)2,5,7 (IV)2,4,6
C - (I)3,8 (II)3,5,8 (III)3,8 (IV)3,5,7
Sounds simple, doesn't it? Well, I soon learned otherwise.
Those are the typical cycles for each button, yes, but I immediately started finding exceptions to these rules. For starters, when the device is empty, all the buttons reset to the beginning of their cycle. All right, that's not so bad. Next, if 1,2,3,4,5,7 are active, forming an upside down pyramid, everything goes to the end of its cycle. Okay. Also, under certain conditions, including 5 being active and 4 not, button B will reset its cycle and begin going backwards. This is starting to get a little more complex than I bargained for. . . Oh, and button C will change to the third position in its cycle if specific dots such as 3,4,5,7,8 are active. Button B goes to the 4th spot in its cycle if 1,2,3,4,6 are active. If it was recently emptied, and button B was pressed first, buttons A and C change to the third position in their cycle. If B was just on its reverse cycle, button C will reset to its first position. Button B resets and goes forward again if any other button is pressed in the middle of its cycle except for button C on position 1. Button A will change to its third part of the cycle if it is clicked immediately after button B has been used going in reverse and dot 4 is active while dot 7 is inactive, it will then reset B to its normal forward cycle. B goes to the third point in its cycle if it was not the last button pressed and dots 4 and 5 are active. B also will go into reverse if button A has been pressed fewer than two times before it and A was pressed immediately after the device had been emptied. AAAHHH!
And those aren't all the exceptions I've found. I continue to find unique behaviors dependent upon other circumstances. Does anybody know the algorithm used by this thing in its calculations? I figure that Gandreas must have designed some absurdly simple code that this device follows, but I don't know it. So I've been essentially adding patches to my attempt at a recreation, trying to account for what I consider to be anomalous behavior.
If you want to see what I've done so far, go here. There is a visual key there and some possible orders I found that create certain patterns. Does anybody else have any possible button orders to suggest? I'll gladly add whatever anyone finds. On the bottom of that webpage is a javascript version of the Strange Device, or at least my attempt at one. I'm sorry if it responds sluggishly, but the device's exceptions have been getting too complex for me to follow, so I've been stuck adding a lot of otherwise unnecessary functions and variables to track changes that only affect certain buttons in certain parts of their cycles.
My original intent with this was to understand the Strange Device well enough to exactly duplicate it, but it has proven to be more complex than I had initially thought. I know that the javascript version doesn't match the in-game one in a lot of ways, but still feel free to let me know what specific instances you've found where the two diverge. I appreciate any testing anyone wants to do on it. Also, if anybody has found a more efficient algorithm for determining which dots to activate and which to deactivate, one that matches the game's device more closely, please let me know.
This post has been edited by The Wizard: 06 March 2011 - 02:44 AM