Dancing fly formations explained

Everything about the various Boulder Dash tools, and other stuff created by the fans.

Moderator: Admin

User avatar
Dustin
Member
Posts: 590
Joined: Sun Sep 23, 2007 1:15 am
Location: Erlangen, Germany

Post by Dustin »

"Breaking" News about the Fright formations!
The Fright formations actually also fascinate butterflies! Dozens and hundreds of BF have been watched trying to imitate a Fright formation or at least something similar, but without success. Depressed, but full of admiration, two butterflies watched a Fright-5 formation and decided to overcome their shyness and ask the fireflies for help. "Well", the fireflies said, "you can at least accompany us so we can continue our journey to the Eastpole together!" The BFs couldn't believe it. Was it really possible to travel together with these confident and good-looking fireflies? "No problem", the FFs explained. "We're now in phase 1. You", they pointed at one of the BFs, "place yourself to the right of our topmost firefly and look at his back. And you", they pointed at the second BF, "make a vortex with your friend." And a few seconds later - the BFs still couldn't believe it - but they travelled to the Eastpole together with five sexy fireflies! What a lucky day that was! ;D

It's not just a story, but I actually just discovered it when toying around with BF and FF with the slight hope to find a new formation ;D It looks as follows - capital letters are FFs, small letters are BFs, "-" is empty space.

---r
-Ll-
D-R-
-R-R

This is Phase 1 of Fright-5 with an additional B-vortex. The FF influence the BF but not vice versa, so it's not a real new formation but the BFs are free riders, just as it was possible with the lifted F-vortex formation! The same works with Fright-4 and 3. I hope I'm really telling you something new, but at least in this thread, it wasn't yet mentioned ;D
Boulder Dash X Rock, Paper, Scissors:
ROCKFORD collects DIAMOND, digs DIRT
DIAMOND outvalues DIRT & BOULDER
DIRT carries BOULDER, blocks FIREFLY
BOULDER kills FIREFLY & ROCKFORD
FIREFLY kills ROCKFORD, guards DIAMOND
User avatar
Arno
Site Admin
Posts: 2826
Joined: Sat Mar 17, 2007 2:26 pm
Location: netherlands
Contact:

Post by Arno »

Dustin wrote:"Breaking" News about the Fright formations!
...
Oh that's very cool! Well spotted and nice story! :D
I've added this set of formations to the list of formations with free riders in the first post.

I also tried it out in the Construction Kit and discovered that these 3 formations are also possible with 1 free riding butterfly (instead of a vortex of 2 BF).
Very interesting to watch these in slow motion to see what happens! :)
So basically, we now have 6 variants of this formation! :D

Finally, all these formations can be launched by first launching a Fright-x and let it collide with a prepared BF vortex (or single spinning BF). So these are very well usable in (hardcore) caves! :)

Thanks a lot for experimenting Dustin! :D
User avatar
Dustin
Member
Posts: 590
Joined: Sun Sep 23, 2007 1:15 am
Location: Erlangen, Germany

Post by Dustin »

Thanks Arno, it was very fun to discover this! ;D

I examined this more precisely - the formation in my last post isn't actually one of the 3 phases. These are

Phase 1
-u-r-
-L---
D-R--
-R-R-

Phase 2
--r--
--Ud-
-D-U-
D-R--

Phase 3
---r-
-LlU-
--R--
-R-R-

Phase 1*
--u-r
--L--
-D-R-
--R-R

Between phase 2 and 3 as well as between phase 3 and 1*, the same butterfly is influenced by a FF, while the other butterfly is just freely spinning - those two BF will change roles in the next short loop. As the BF don't influence each other, it's logical that each of them can be left away and the formation will still work the same way - then with a short loop of 6 frames, however. Having found two independant places where a BF can accompany the Fright formation, it may be interesting to search on for more such places ;D
Boulder Dash X Rock, Paper, Scissors:
ROCKFORD collects DIAMOND, digs DIRT
DIAMOND outvalues DIRT & BOULDER
DIRT carries BOULDER, blocks FIREFLY
BOULDER kills FIREFLY & ROCKFORD
FIREFLY kills ROCKFORD, guards DIAMOND
User avatar
Arno
Site Admin
Posts: 2826
Joined: Sat Mar 17, 2007 2:26 pm
Location: netherlands
Contact:

Post by Arno »

There are video's available showing the Fright-x formations with free riding butterflies:
- Free Riding Buterflies: All 6 combinations: the 3 Fright-x formations with 1 or 2 additional butterflies.
- Taxi for Butterflies: Launch-cave for Fright-3 plus 2 butterflies.
- Globetrotters: Launch-cave for Fright-4 plus 2 butterflies, including a split of the formation into Crawling-F4 and BnB! :)

Also I've made pictures of all 3 Fright-x formations extended with 2 butterflies. See below.

In each of these 3 formations, the two butterflies swap role after each short loop. It is indeed possible to leave any of the 2 BF out; then the short loop becomes twice as long.

Funny to note is that the rival-fireflies have an additional task now, since they are also responsible for half of the butterfly pushes to the right side. Each time a rival-FF breaks into the vortex, he pushes a BF as well.

In Fright-3 and -5, the light green BF is pushed to the right 2 times; the light red BF zero times, so on average either BF is pushed 1 time per short loop.
In Fright-4 the light green BF is pushed 3 times; the light red BF 1 time, so on average both are pushed 2 times per short loop.

Fright 3 plus 2 BF:
Image

Fright 4 plus 2 BF:
Image

Fright 5 plus 2 BF:
Image

Lastly, I'd like to note the following. When you showed me these extended formations, I immediately thought about another formation, "The 4 Elements", 4 butterflies going down-left, which can also be extended with 1 free-riding firefly. The working of this extension seems quite similar to these Fright-x extentions. A topic for a next episode... :D
Last edited by Arno on Sat Oct 12, 2019 11:14 am, edited 1 time in total.
User avatar
Dustin
Member
Posts: 590
Joined: Sun Sep 23, 2007 1:15 am
Location: Erlangen, Germany

Post by Dustin »

Actually, Mr Teacher, I admit that I pre-learned a bit and have already rebuilt some formations that you haven't yet taught us in the articles. Namely the 4 elements and the Sinking-F5. I got under the impression that the vortex-with-jealous-rivals-trying-to-break-in-issue is far from over yet... ;D
I'm especially excited about the Big 5 formation, as you noted there that they have a unique moving pattern. I wonder whether or not it is also built around a vortex... but of course, Mr Teacher, I will kindly sit in my chair and patiently wait for the next lessons... ;D
Boulder Dash X Rock, Paper, Scissors:
ROCKFORD collects DIAMOND, digs DIRT
DIAMOND outvalues DIRT & BOULDER
DIRT carries BOULDER, blocks FIREFLY
BOULDER kills FIREFLY & ROCKFORD
FIREFLY kills ROCKFORD, guards DIAMOND
User avatar
Arno
Site Admin
Posts: 2826
Joined: Sat Mar 17, 2007 2:26 pm
Location: netherlands
Contact:

Post by Arno »

Dustin wrote:Actually, Mr Teacher, I admit that I pre-learned a bit and have already rebuilt some formations that you haven't yet taught us in the articles. Namely the 4 elements and the Sinking-F5.
I'd say it's very cool that you share your discoveries, even if several steps ahead! :) After all, this is a forum, not an online course. ;) Indeed the 4 Elements and Sinking-F5 are also built around a vortex. Just the underlying stories of the dancing-couple-and-jealous-rivals become slightly different... every episode has it's own drama! ;)
Dustin wrote:I'm especially excited about the Big 5 formation, as you noted there that they have a unique moving pattern. I wonder whether or not it is also built around a vortex...
The Big 5 formation is quite special in that a vortex is not involved. Except for FnF and BnB, I wasn't aware of any (bigger) formation without vortex. Until I took a closer look at Big 5.
I will try if I can prove or argue that >=5 flies are needed for such formation. Then we know that all 3 or 4-fly formations are based around a vortex. :)
User avatar
Arno
Site Admin
Posts: 2826
Joined: Sat Mar 17, 2007 2:26 pm
Location: netherlands
Contact:

Post by Arno »

Episode 8: Mirrored pairs and p-mirrored formations

Sometimes we encounter a set of two of dancing fly formations which seem to be related. For example, when you compare FnF with BnB, the movement phases look very similar. Both formations are just going in a different direction: FnF goes left while BnB goes up. Also Lifted F-vortex and Lifted B-vortex look similar, but in a different way: the movements look similar but both formations go upwards.

When I observed these symmetries I got curious and investigated what the relations between these pairs of dancing formations exactly are. In this episode I will share what I found by introducing two types of symmetry relations between dancing fly formations: a strong 2-way relation called mirrored pair and a weaker 1-way relation called partially mirrored formation (abbreviated to p-mirrored formation). I will explain both relations and show you examples of formations for which these relations hold.
Perhaps these concepts are useful to discover new dancing fly formations, based on existing ones. Or they help understanding why certain types of formations do not exist.

Mirrored pairs

A pair of dancing fly formations is called a mirrored pair if they have the same number of phases in the short loop, and each phase of either formation can by transformed into a phase of the other formation by:
- Replacing fireflies by butterflies and vice versa.
- Mirroring the location and direction of all flies in the diagonal line from top-left to bottom-right.
Why should the diagonal line be used as a mirror, instead of any other line? Well, the combination of the following properties of the diagonal mirror assure that it may work:
- The moving direction of flies is swapped. For example, fireflies moving counter-clockwise are replaced by butterflies moving clockwise.
- Cave scanning from left to right becomes equivalent to cave scanning from top to bottom.
- Cave scanning from top to bottom becomes equivalent to cave scanning from left to right.
Let’s look at an example to clarify these matters.

FnF & BnB

The simplest example of a mirrored pair is FnF & BnB. Below picture shows all phases of both formations and illustrates the mirroring in the diagonal line for each phase.

Image

So, each phase of FnF is the mirrored image of a phase of BnB and vice versa. This mirroring only works in the diagonal line, because only then it is possible that the movements of fireflies correspond to movements of butterflies, including the interaction between two flies.
Some time ago, I wondered why FnF goes left while BnB goes up. My reasoning: “Fireflies move left and butterflies move right, so if FnF goes left then BnB must go right.” To me, it felt strange at first that BnB goes up instead of right. Now, with the concept of mirrored pair, and the fact that the diagonal line must be used as mirror, the difference in moving directions is easily explained: if you draw an arrow pointing to the left and mirror it in the diagonal, the result will be an arrow pointing upwards.

Not every dancing formation forms a mirrored pair with some mirrored counterpart. This is because the BD engine scans all elements in a cave row-by-row, so first from top to bottom and then from left to right. Mirroring a formation in the diagonal line does not change this order - the BD engine will still work in the same way is it usually does. But it depends on the formation whether this order is relevant. The condition under which a formation forms a mirrored pair could be formulated as follows:

Condition for mirrored pair:
In each phase, the movements of the flies are the same when either row-by-row (from top to bottom, from left to right) or column-by-column (from left to right, from top to bottom) cave scanning would be applied.


For FnF and BnB, this condition is satisfied, because only two flies are involved, and at any time when they interact, both are always present on the same row or on the same column. So row-by-row and column-by-column scanning always result in the same movements of both flies.

Partially mirrored formations (and pairs)

Next to the concept of mirrored pair discussed above, let’s introduce the following weaker variant of this relation. A dancing fly formation A is said to have a partially mirrored formation (or p-mirrored formation) B if B is a dancing fly formation which results (directly or indirectly) from mirroring any of the phases of A in the diagonal line and replacing fireflies by butterflies (and vice versa).
So, in order to check whether a dancing formation A has a p-mirrored formation, you have to do the following: For each phase, build in the Construction Kit the mirrored setup (with swapped types of flies and the locations/directions mirrored in the diagonal), and test whether this setup results in a dancing formation. If you have found at least one dancing formation, this is a p-mirrored formation B of A.

Note that it is allowed that the mirror image of a phase of A is not directly a phase of B; it is allowed that when running the cave, the resulting setup transforms indirectly (after some frames) into a phase of B.
Nevertheless, if the mirror image of the A phase is directly a phase of B, then we know that, conversely, A is also a partially mirrored formation of B, so then the relation is two-way and we could speak of a partially mirrored pair.

Are you still following me?
Here's a summary of the possible situations:
- If for all phases of A the mirror image does not give a dancing formaton, then there is no relation at all.
- If for at least 1 phase of A its mirror image leads indirectly to a dancing formation B, then B is a p-mirrored formation of A.
- If for at least 1 phase of A its mirror image is directy a phase of dancing formation B, then A and B are a p-mirrored pair.
- If for all phases of A the mirror image is directly a phase of dancing formation B, and A and B have the same number of phases, then A and B are a (fully) mirrored pair.

Clearly, if any pair of formations is a mirrored pair, it is also a partially mirrored pair: this is a weaker relation.
Also, it is possible that a dancing fly formation has multiple p-mirrored counterparts, while it forms a (fully) mirrored pair with at most one other formation.

Lifted vortex formations

An example of a p-mirrored pair is Lifted F-vortex & Lifted B-vortex. Below picture shows each phase of Lifted B-vortex together with its mirrored image.

Image

The following remarks can be made per phase:
- Phase 1: The mirrored image does not give a dancing formation. Instead, the 3 flies keep spinning around.
- Phase 2: Idem.
- Phase 3: The mirrored image is not a phase of any known formation, but after one frame it equals phase 3 of Lifted F-vortex, and as such it transforms indirectly to this formation. This proves that Lifted F-vortex is a p-mirrored formation of Lifted B-vortex.
- Phase 4: The mirrored image equals phase 3 of Lifted F-vortex. Now we know that also conversely, Lifted B-vortex is a p-mirrored formation of Lifted F-vortex, so both formations form a p-mirrored pair.
- Phase 5: The mirrored image equals phase 4 of Lifted F-vortex.
As we have seen earlier, the break-in of the FF into the B-vortex happens just after phase 5 of the Lifted B-vortex. Interesting to note is that a similar break-in does not happen for the mirrored image. Instead, the break-in of the BF into the F-vortex happens one frame later. Due to the Boulder Dash engine rules, both dancing formation have a different natural point of breaking in, which aren't each other’s mirrored point in the diagonal:
- Lifted F-vortex: the break-in point is at the left/top of the vortex: the BF moves right (clockwise) and is scanned first at that point.
- Lifted B-vortex: the break-in point is at the top/right of the vortex: the FF moves left (counter-clockwise) and is scanned first at that point.
So, although both formations are based on the same principles, they are not exactly each other’s mirror image. Instead of a mirrored pair, they form a p-mirrored pair.

What about Gear Wheels?
The Gear Wheels formation is a combination of the Lifted F/B-vortex formations. It turns out that this formation forms a p-mirrored pair with itself!
Below picture shows phase 3 of Gear Wheels together with its mirrored image.

Image

The mirrored image is not exactly a phase of Gear Wheels, however, after one frame it equals phase 1 of Gear Wheels.

Fright-x formations

There are several dancing fly formations which stand alone, in the sense that a (partially) mirrored counterpart formation does not exist.
Below picture shows the crucial phase 7 of Fright-3 (when the rival-FF breaks into the vortex), together with its mirrored butterfly image. (For simplicity, the colors of the butterfly image are the same as for the corresponding fireflies.)

Image

Because of the row-by-row scanning, the green firefly breaks into the vortex. However, the green butterfly does not yet break in at this point. So the next frame will be different for the butterfly setup. The green butterfly will move 2 positions around the vortex and break in at the left/bottom side. This step splits the vortex without forming a new vortex, which ultimately leads to all 3 butterflies spinning around individually.
It is possible to do a similar test for all other phases of Fright-3. For all these phases, the mirrored image leads to a similar set of 3 butterflies spinning around.
So, Fright-3 does not have a (partially) mirrored counterpart. By the way, this should not come as a surprise, since we already know from previous episode that a dancing fly formation with 3 BF does not exist.

But what about Fright-4?
Perhaps surprisingly, the Fright-4 forms a p-mirrored pair with The 4 Elements. This formation consists of 4 BF moving down-left, and will be discussed in more detail in the next episode. Actually, I already had a feeling that Fright-4 and The 4 Elements might be related, but now this relation is confirmed.
Below picture shows phase 8 of Fright-4 together with its mirrored image.

Image

This mirrored images is exactly one of the phases of The 4 Elements. Although the green FF breaks in after this phase, the green BF won’t do so yet. Instead, it breaks in two frames later, after which it starts a new vortex with the blue BF behind him.
For the other phases of Fright-4, some of them lead to 4 spinning butterflies, some lead indirectly to a phase of The 4 Elements, and some are directly equal to a phase of The 4 Elements.
So clearly, Fright-4 & The 4 Elements are a p-mirrored pair.

And Fright-5?
Given that Fright-4 forms a p-mirrored pair with The 4 Elements, one might guess that Fright-5 also forms some sort of pair with an “extended version” of The 4 Elements. This is not the case. Below picture shows phase 3 of Fright-5 together with its mirrored image.

Image

For this phase, and also for the others, the mirrored image ultimately leads to 5 spinning butterflies. The problem here is similar to Fright-3's mirrored image. When the yellow BF breaks in at the left/bottom corner, it starts a new vortex with the purple BF. Afterwards, the green BF approaches, but at the moment of breaking in, he is alone: there is no BF behind him to start a new vortex. So the vortex is split and all 5 BF take an individual position, where they start spinning around independently.

Until now, we have discussed the following relations:
- FnF & BnB: mirrored pair;
- Lifted F-vortex & Lifted B-vortex: p-mirrored pair;
- Gear Wheels: p-mirrored pair with itself;
- Fright-4 & The 4 Elements: p-mirrored pair.
Several other (p-)mirrored pairs exist, for example, the mirrored pair Crawling-F4 & Crawling-B4, which will be treated in a later episode.

So what’s next?

The existence of (p-)mirrored pairs can be used to discover new dancing fly formations. From now on, whenever a new dancing fly formation is discovered, it is a good idea to check for each phase whether its mirrored image results in another dancing fly formation.
In the upcoming articles, when I discuss a dancing formation, I'm planning to also discuss the existence of any (p-)mirrored counterpart formations.
User avatar
Dustin
Member
Posts: 590
Joined: Sun Sep 23, 2007 1:15 am
Location: Erlangen, Germany

Post by Dustin »

So I wonder whether the 4 elements can also be accompanied by two fireflies, just as is the case with the p-mirrored counterpart?
Boulder Dash X Rock, Paper, Scissors:
ROCKFORD collects DIAMOND, digs DIRT
DIAMOND outvalues DIRT & BOULDER
DIRT carries BOULDER, blocks FIREFLY
BOULDER kills FIREFLY & ROCKFORD
FIREFLY kills ROCKFORD, guards DIAMOND
User avatar
Arno
Site Admin
Posts: 2826
Joined: Sat Mar 17, 2007 2:26 pm
Location: netherlands
Contact:

Post by Arno »

Dustin wrote:So I wonder whether the 4 elements can also be accompanied by two fireflies, just as is the case with the p-mirrored counterpart?
With 2 fireflies, the formation breaks. But it is possible with one firefly! Then indeed, The 4 Elements + 1FF is a p-mirrored counterpart of Fright-4 + 1BF.
User avatar
Dustin
Member
Posts: 590
Joined: Sun Sep 23, 2007 1:15 am
Location: Erlangen, Germany

Post by Dustin »

Arno wrote: Condition for mirrored pair:
In each phase, the movements of the flies are the same when either row-by-row (from top to bottom, from left to right) or column-by-column (from left to right, from top to bottom) cave scanning would be applied.
I'm trying to concretize this condition - I think the only way to break it is that two flies are at the top-right and bottom-left corners of a 2x2-square and compete for the same unit to move into. There are 8 possibilities. Fireflies=big letters, butterflies=small.
-U -U -d -d
R- l- R- l-

-L -L -r -r
D- u- D- u-

In each case, the top-right fly wins, but in the mirrored version the other -"transsexual"- fly would win, so there's a difference and the symmetry is broken.

I find it amazing that the only formations so far that do not have one of those eight pictures in any phase are FnF and BnB.
Also, it seems, that even if symmetry is broken, it's still "relatively likely" that mirroring still gives you another DFF - at least much more likely than just trying out randomly and without a plan ;D
Boulder Dash X Rock, Paper, Scissors:
ROCKFORD collects DIAMOND, digs DIRT
DIAMOND outvalues DIRT & BOULDER
DIRT carries BOULDER, blocks FIREFLY
BOULDER kills FIREFLY & ROCKFORD
FIREFLY kills ROCKFORD, guards DIAMOND
User avatar
Arno
Site Admin
Posts: 2826
Joined: Sat Mar 17, 2007 2:26 pm
Location: netherlands
Contact:

Post by Arno »

Dustin wrote:I'm trying to concretize this condition - I think the only way to break it is that two flies are at the top-right and bottom-left corners of a 2x2-square and compete for the same unit to move into.
I think you're indeed right! However, next to the 8 possibilities you mention, I could think of others, like:

-Dx
D*-

or

*L
Ux

Where x is any fly and * is the empty position where 2 FF compete for. Still, these setups contain 2 flies positioned top-right and bottom-left in a 2x2-square competing for the same position. This equivalent condition is very useful as it makes it easier to check for a given setup whether the symmetry will be broken for the mirror image.
Many thanks for this addition! :)

As an example, I checked Fright-3. Only in phase 1 and 7 such situations occur. When I tested the mirror image of phase 2 in the Constr.Kit, for a while it looked for like a 3-butterfly dancing formation moving downward. Until it arrived at phase 7, when after a few frames the 3 butterflies were spinning individually.
User avatar
Dustin
Member
Posts: 590
Joined: Sun Sep 23, 2007 1:15 am
Location: Erlangen, Germany

Post by Dustin »

Ah true, I didn't think of the possibility of a third fly being involved!
Peanut - in your second example, "U" should be a butterfly.
Another observation came to my mind - if you look at a cave like a chessboard, each fly will change the colour of its square every frame - unless there is a phase where a fly stands still for one frame - Sinking F5 would be an example. But if this does not happen, the difference of flies on "dark squares" and flies on "light squares" is a constant for the whole formation. Looking at FnF and BnB this way, it is clear why they are fully mirrored - the two flies have different "square colours" and so the condition can never be broken. However, I don't know whether this chessboard thing might be of any other use ;D
Boulder Dash X Rock, Paper, Scissors:
ROCKFORD collects DIAMOND, digs DIRT
DIAMOND outvalues DIRT & BOULDER
DIRT carries BOULDER, blocks FIREFLY
BOULDER kills FIREFLY & ROCKFORD
FIREFLY kills ROCKFORD, guards DIAMOND
User avatar
Arno
Site Admin
Posts: 2826
Joined: Sat Mar 17, 2007 2:26 pm
Location: netherlands
Contact:

Post by Arno »

Dustin wrote:Peanut - in your second example, "U" should be a butterfly.
Oops... typo indeed!
Dustin wrote:However, I don't know whether this chessboard thing might be of any other use ;D
It's an interesting idea for sure! In the Fright-x and Lifted F/B-vortex formations, all flies are placed in a chessboard pattern (so on the same "square colour") and in these formations we see various interactions breaking the condition. In general, looking at the known formations, it seems that the more flies are "spread" over the dark and light squares, the more likely that a fully mirrored counterpart exist.
User avatar
Arno
Site Admin
Posts: 2826
Joined: Sat Mar 17, 2007 2:26 pm
Location: netherlands
Contact:

Post by Arno »

I've just added to the first post of this thread a picture showing all unique dancing fly formations and their relations. :)
User avatar
Dustin
Member
Posts: 590
Joined: Sun Sep 23, 2007 1:15 am
Location: Erlangen, Germany

Post by Dustin »

Cool! I can't wait to see the Big 5 in action, but I'm too lazy to try out all 4^5 possible combinations of initial directions of the butterflies - so I'll be patient until there's a video/article about them ;D
Boulder Dash X Rock, Paper, Scissors:
ROCKFORD collects DIAMOND, digs DIRT
DIAMOND outvalues DIRT & BOULDER
DIRT carries BOULDER, blocks FIREFLY
BOULDER kills FIREFLY & ROCKFORD
FIREFLY kills ROCKFORD, guards DIAMOND
Post Reply