Dancing fly formations explained

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

Moderator: Admin

Post Reply
User avatar
Arno
Site Admin
Posts: 2826
Joined: Sat Mar 17, 2007 2:26 pm
Location: netherlands
Contact:

Dancing fly formations explained

Post by Arno »

Episode 1: Intro + Overview

This thread is about dancing firefly/butterfly formations. This is a very interesting phenomenon, which is used in several (advanced) BD caves.

The List

Here is a list of all unique dancing formations that have been discovered until now:

Code: Select all

Name                     FF BF    Loop*    Direction**       Note
================================================================================================================================
FnF (Frank & Franka)      2       5 /  5   1 Left            Mirrored pair with BnB.
BnB (Bob & Bobette)          2    5 /  5   1 Up              Mirrored pair with FnF.
Fright-3                  3       7 / 21   1 Right
Fright-4                  4       8 / 32   2 Right           Like Fright-3 with one extra firefly speeding up.
Fright-5                  5       3 / 15   1 Right           Like Fright-4 with one extra firefly speeding up.
Lifted F-vortex           2  1    5 /  5   1 Up
Lifted B-vortex           1  2    5 /  5   1 Up
Lifted Gear wheels        2  2    3 /  6   1 Up              Speed-up combi of the previous two.
The 4 Elements               4    6 / 12   1 Down, 1 Left    Fast pace, smoothly and in a regular pattern.
Crawling-F4               4       7 / 28   1 Down, 1 Left    Slow/irregular pace. Mirrored pair with Crawling B4.
Crawling-B4                  4    7 / 28   1 Up, 1 Right     Slow/irregular pace. Mirrored pair with Crawling F4.
Glider-F5                 5       9 / 54   1 Down, 2 Left    Mirrored pair with B5.
Glider-B5                    5    9 / 54   2 Up, 1 Right     Mirrored pair with F5.
Cassiopeia                   5    7 / 42   1 Up, 1 Right     Unique moving pattern (without vortex).
Sinking-F5                5       8 / 48   1 Down            Slow.
Sinking-F6                6      18 / 54   2 Down            Very slow.
The 6 Elements               6    4 / 16   1 Down 1 Left     Speed-up combi of The 4 Elements.
Swarm-B8                     8    2 / 12   1 Up              Extendable by any number of BF.
Swarm-F8                  7  1    2 / 12   1 Left            Extendable by any number of FF. Exists in some variants.

* #phases per short loop / long loop
** #positions per short loop
As you see, I have chosen some colourful names to distinguish the various formations, but also as mnemonics to remember how they work and look. (Strange names? Suggestions are welcome! ;))

Here are some video links demonstrating these formations:
- Delta, Stop the attack: FnF and BnB.
- Flying quintet: Fright-5, 4 and 3.
- Racing flies 2: Crawling-F4, The 4 Elements.
- Butterfly teamwork: The 4 elements, Crawling-B4.
- Ultimate firefly teamwork: Fright-5, Sinking-F5, Crawling-F4, Fright-3 and FnF.
- Mixed teamwork: Lifted F-/B-vortex and Gear wheels.
- For other formations no video is available yet.

The following picture shows all dancing formations and their relations:
Image

Goal of this thread

In this thread I will publish some short articles about the “research” I’m doing on these dancing formations. In each post I will do an in-depth analysis of one or more particular dancing formation(s) and answer natural questions like how it works, why it looks as it looks, and why it moves in the direction it goes.
This is interesting for several reasons. Uncovering the exact working gains insight into the BD mechanics. Understanding these mechanics helps, for instance, to find a way to “launch” a particular formation while playing a cave. Or perhaps it is possible to find all existing formations under certain conditions (e.g. “at most 3 flies”). By adding complexity, perhaps new formations will be discovered. This ultimately leads to new cave design ideas. And last but not least, it is fun to do (well, at least for me).

I hope you like these insights. Any reactions, additional information or questions are welcome, so feel free to chime in!

Definition & Scope

First some explanation on the terminology and research scope. A dancing fly formation is a group of fire/butterflies, within open space, without touching (open) borders, influencing each other’s movements, such that the whole group moves gradually into a certain direction.
Perhaps good to know what is not a dancing fly formation:
- A group of flies moving along a wall (video) (or more generally: a group of flies moving with help of any elements other than empty space and the flies themselves). These phenomena are also very interesting, but out-of-scope for this research.
- A group of flies spinning or “dancing” at the same location. Such group may involve flies influencing each other, but as long as they return to the same position after each cycle I won’t call it a dancing formation.
- A group of flies affected by open border side-effects. For example, we have discovered in Krissz’ BD engine, that when a FnF crosses the vertical open border it suddenly continues moving upwards. Such effects are funny, but really engine-specific and not common BD behaviour. Therefore I leave those out-of-scope.

In addition to the above, there are some dancing fly formations which satisfy the definition, but I will deliberately leave out of the list:
- A combined set of dancing fly formations. It is possible to place 2 or more dancing fly formations closely to each other, such that they move independently, while it visually looks as one dancing formation. Although such constructions look impressive, I exclude them from the above list, not only because the possibilities are unlimited, but also because I’m particularly interested in unique formations.
- An existing formation plus an additional fly “free riding” with the group. This means that the extra fly does not interact with other flies in the group, so the direction and speed of the group is the same with/without the extra fly. Strictly, such group is a dancing formation by itself, but in order to limit the official list I will leave it out.

Just for information, until now, the following formations, extended with free riders, have been found:
- The 4 elements + 1 firefly
- Lifted-F-vortex + 1 or more butterflies (the extra butterfly can lift up another extra butterfly, and so on. This is an unlimited set!)
- Fright-3, 4, 5 + 1 or 2 butterflies
- BnB + a related formation of 3 additional butterflies (name: BnBnB)

Some other terms

In the upcoming articles, I’d like to use the following related terms:
- Frame: shortest unit of time in BD. Within a frame elements exist on each position and during the cave scan, their position for the next frame are determined.
- Phase of a dancing fly formation: one frame within the formation.
- Short loop: set of phases until the flies are positioned equivalently to the original starting phase (but the group as a whole has shifted). Note that the flies may mutually have changed position, for example, firefly A takes over the position of firefly B, B that of C, and C that of A.
- Long loop: set of phases until all individual flies have returned to their original position within the dancing group. Sometimes the short loop and long loop are the same. Otherwise, the long loop consists of multiple short loops.
- Interaction: this means that flies within the group influence each other’s move. For example, a firefly moves forward because its way to the left (first choice) is blocked by another fly.
- Spinning fly: this is a fire/butterfly which is placed freely in space. So in each frame it will simply move to its favourite direction, and thus it will spin around in 4 frames. Note that fireflies are spinning counter-clockwise and butterflies are spinning clockwise.
- Vortex: 2 flies spinning within the same 2x2 square (video). Note that both flies are always placed opposite and do not interact. Both are freely spinning. (Thanks to Shredder for suggesting this term.)
- Mirrored pair: two dancing formations with swapped fireflies and butterflies and all phases are each other's mirror image through a diagonal line. Details in Episode 8.
- P-mirrored pair: partial mirrored pair; similar to mirrored pair but only some phases can be mirrored. Details in Episode 8.
- FF is my abbreviation for firefly.
- BF is my abbreviation for butterfly.

Which BD engines are considered?

All discussed dancing formations have been tested to work on the CLCK engine and Krissz’ BD engine (online BD remake). Both have an editor available which supports fire- and butterflies in all 4 initial directions, which is perfect for testing dancing flies. I expect that the tested formations are also working in other common engines (BD1, PLCK, Gdash, …) as long as the cave scanning methods are the same. (Again, except for open border differences, which I won’t consider.)

Which conditions determine the possible formations?

Now that the scope and terminology has been set, it is also good to know the mechanics in the common BD engines which determine which dancing formations are possible. In fact, there are two basic conditions which limit the possibilities:
1. Cave scan method. Caves are scanned line-by-line, from top to bottom, and from left to right.
2. Moving directions of the flies.
Firefly:
- First tries to move 1 position to its left.
- If this is not possible it will move 1 position forward.
- If this is also not possible, it will turn its direction to its right while staying at the same position.
Butterfly:
- First tries to move 1 position to its right.
- If this is not possible it will move 1 position forward.
- If this is also not possible, it will turn its direction to its left while staying at the same position.

In the next post we will examine one of the most basic dancing fly formations, the FnF!
Last edited by Arno on Wed Jun 03, 2020 10:57 am, edited 13 times in total.
User avatar
Arno
Site Admin
Posts: 2826
Joined: Sat Mar 17, 2007 2:26 pm
Location: netherlands
Contact:

Post by Arno »

Episode 2: The FnF

In this second post we will dive into the details of one of the simples and most well-known dancing fly formations, which I’ve named the FnF, or Frank & Franka (where Frank is named after one of the most active Boulder Dash players at Krissz’ site).

The FnF consists of 2 fireflies moving to the left (video).

First, an overview of the properties of a FnF:
- Name: FnF / Frank & Franka
- Composition: 2 FF
- Short loop: 5 frames
- Long loop: 5 frames
- Shift per short loop: 1 Left

In this article I aim to provide answers to various questions, like:
- How does a FnF work?
- Why does it move to the left (and not to any other direction)?
- Are there any other dancing formations with 2 FF?
- How can you launch this dancing pair when playing a cave containing 2 FF?

How does a FnF work?

Below picture shows the 5 phases of the short loop. The numbers are chosen such that I end with the phase where the group has shifted 1 position to the left (phase 1’).

Image

During phase 1 and 2, both FF are simply spinning. The 2 circles in the corresponding color indicate the path which each FF follows when it is spinning around. So far nothing special.

In phase 3 something exciting happens. Both FF pass each other such that they could no longer move to the left (their first choice). Here is where the order of cave scanning comes into play. Since a cave scan runs from top to bottom, the top FF (dark blue) is scanned first. It cannot move to its left (=down) since the other FF is blocking that position. This is indicated by a red sign. It will therefore move forward (=left), which results in its position as in phase 4. Next, the bottom FF (light blue) is scanned. Initially it could not move to its left (=up) since the top FF was present there. But since the top FF is already scanned and moved, this position has become free. So, the bottom FF can still move to its favourite position. This is indicated by a green dot (or green light).

Phase 4 shows again a situation where both FF touch each other. This time both FF occur on the same line and the right FF cannot move to its left. Again, the cave scanning order determines what happens. Since the line is scanned from left to right, the left FF is scanned first. It moves to its left (=down). Now the left side of the right FF has become free (green light) and the FF will move there. Both FF have effectively followed their spinning path.

Phase 5 is, like phase 3, a situation where the top FF cannot go to its left (=down) (red sign). Only this time it is the light blue FF instead of the dark blue FF. Because the cave is scanned from top to bottom, the light blue FF will go forward (=left), while the dark blue FF continues its spinning path.

The cycle ends with phase 1’, similar to phase 1, and the loop starts over again. Note that the only difference between 1 and 1’ is the shift of the whole group to the left. Within the group, both FF occur at the same position. There is no swap of positions or role. For this reason, the long loop and the short loop are the same and both consist of 5 phases.

Out of all phases, phase 3 and 5 are most crucial. These phases are the moments of interaction between both FF. Remember, without interaction there won’t be a dancing formation.
In all phases, the FF are following their spinning path, except phase 3 and 5. In phase 3 the dark blue FF is pushed to the left and in phase 5 the light blue FF is pushed to the left. In the end, the whole group has been pushed to the left.
Because a spinning loop takes 4 frames and both FF use one extra frame to move left (though not the same frame), this makes that the full loop takes 5 phases.

Why does a FnF move to the left?

This direction is determined in phases 3-5. Loosely explained, this formation consists of two spinning FF interacting at some point. Because FF are spinning counter-clockwise, it is expected that at the point of interference the top FF is pointing left, while the bottom FF is pointing right (as in phase 3). Now the cave scanning order determines what happens:
- Phase 3: because cave scan is from top to bottom, the top FF is pushed to the left.
- Phase 4: because cave scan is from left to right, both FF can follow their usual spinning path, so that the bottom FF now gets on top.
- Phase 5: because cave scan is from top to bottom, the other FF is pushed to the left.
Now, both FF are pushed to the left, so that the whole group has moved to the left.
In the end, the combination of how FF move and the cave scanning directions determine the direction of the dance.

(As a side note, a funny exercise to do is check what happens when the cave scanning order would be different. For example, if cave scan were from bottom to top and from right to left, a FF dance to the right would be possible.)

Another way to look at this question is by trying to exclude other directions than the left side. If a formation in this pattern (like phase 1-5) would exist in other directions, you could rotate each phase either 90, 180 or 270 degrees.
Well, if you try to create dance moving to the right, by rotating phase 1 with 180 degrees, you get exactly the same phase 1 again (it has rotation symmetry), which will again result in a left-moving dance. So a dance to the right (with this pattern) is not possible.
In a similar way you can exclude upward and downward dances. For instance, phase 5 rotated 90 degrees gives phase 4, and phase 4 rotated 270 degrees gives phase 5. Therefore, both vertical directions are excluded as well.
Conclusion: this formation can only move to the left. Of course, that does not imply that no other patterns of formation to other directions exist.

Are there any other dancing formations with 2 FF?

There are at least two approaches to tackle this question:
1. Try out all possibilities and look if you see a new dancing formation.
2. Use the theory of BD mechanics to prove that either all formations have been found or others exist.

Approach 1 is generally a lot of work, yet still doable in this case, since only 2 FF are involved. Approach 2 is interesting but (for me) very difficult. We will do a sort of combination. We will first use some simple logic to exclude most possible configurations, and then test the remaining configurations.

Theoretically, there are many possible configurations where 2 FF (in any initial direction) are placed in empty space. Remember, however, that the crucial phases of a dancing pair are the ones where both the FF interact. So it is not necessary to try configurations where both FF can freely move to their left.
In phase 3 and 5 above, one of the FF is pushed forward by the other FF. Any dancing formation will certainly involve such phase, otherwise both FF will simply spin around.

Suppose that one FF (the light blue one) is to be pushed forward. Below picture shows all possible configurations where this happens. The 4 columns represent the 4 target directions for the light blue FF.

Image

Note there are 2 ways to force the light blue FF to move forward:
1. The light blue FF is scanned first and the dark blue FF is present at its left. Because of the cave scanning order, such configurations only occur for 2 target directions: down and left.
2. The dark blue FF is scanned first, and will move (within the frame) to the position at the left of the light blue FF. This conflicting position is indicated by a yellow star.

Each configuration indicates the results after testing it in the Construction Kit. Most of them lead to spinning flies. Some to a vortex of two spinning FF. Two of them are equal to one of the phases (3 or 5) described above and will thus result in a FnF dance. Finally, there are two configurations which lead indirectly (after 1 or more frame) to phase 5 of the FnF and will thus result in an FnF.
Conclusion: no other dancing formation has been found, so FnF is the only dancing formation with 2 FF.

How to launch a FnF?

Suppose that you are playing a cave. 2 FF are available somewhere in the cave and in order to solve it you need a FnF. How can you bring the 2 FF together to create a FnF at the required location?
Basically, you need to produce one of the 5 phases of the FnF discussed above. If you succeed to trigger any of those (and there are no disturbing elements in the way), the FF pair will start following the loop, et voilà, the FnF has been created.
But you don’t need to trigger one of these phases directly. As we have seen above, there are other configurations which, after 1 or more frames, end up in phase 5 of the FnF loop.
Commonly, the following steps are taken:
1. Create a spinning FF.
2. Let the other firefly approach, such that when it hits the spinning FF one of the 5 phases is triggered (either directly or indirectly). This requires perfect timing. If you’re not successful, try to delay the approaching FF with one or more frames (e.g. by removing more (or less) dirt along the path the FF follows).
Exactly this strategy is applied in this video, but there are probably more ways.

A natural question is how the above analyses apply to butterflies instead of fireflies. This will be the topic for the next post. Stay tuned! :)
User avatar
LogicDeLuxe
Member
Posts: 637
Joined: Sun Jul 15, 2007 12:52 pm
Contact:

Post by LogicDeLuxe »

Very interesting topic. You may call your games "Boulder for rocket scientist and super humans". Those are just insane. I wouldn't have thought of creating caves where the player is required to launch such formations.

Although almost the opposite of this is the phenomenon in Boulder Dash 3 Cave F at the bottom near the center. There is a formation with only 1 space seemingly moving randomly, yet that one diamond never falls down.
Image
User avatar
Arno
Site Admin
Posts: 2826
Joined: Sat Mar 17, 2007 2:26 pm
Location: netherlands
Contact:

Post by Arno »

Thanks Logic! Yes, that's an interesting phenomenon too! :)
User avatar
LogicDeLuxe
Member
Posts: 637
Joined: Sun Jul 15, 2007 12:52 pm
Contact:

Re: Dancing fly formations explained

Post by LogicDeLuxe »

Arno wrote:- A group of flies moving along a wall (video) (or more generally: a group of flies moving with help of any elements other than empty space and the flies themselves). These phenomena are also very interesting, but out-of-scope for this research.
Do you intend to make a separate thread and investigate those, though? I find it very interesting that they are able to form such a dense group and move with a slow pace.
User avatar
Arno
Site Admin
Posts: 2826
Joined: Sat Mar 17, 2007 2:26 pm
Location: netherlands
Contact:

Re: Dancing fly formations explained

Post by Arno »

LogicDeLuxe wrote:Do you intend to make a separate thread and investigate those, though? I find it very interesting that they are able to form such a dense group and move with a slow pace.
I do not plan a thread about these "rolling groups" yet, but it may be an idea for the future! :)
Dr Guru
Member
Posts: 34
Joined: Tue Jul 31, 2012 12:35 pm
Location: Germany

Post by Dr Guru »

As a sidenote:

Mathematically speaking, Boulder Dash is a cellular automaton.

Another famous cellular automaton is Conway's Game of Life. A search on Wikipedia or Youtube for Conway's Game of Life shows that it also facilitates many different autonomously moving configurations, e.g. the gliders.
User avatar
Arno
Site Admin
Posts: 2826
Joined: Sat Mar 17, 2007 2:26 pm
Location: netherlands
Contact:

Post by Arno »

Dr Guru wrote:Another famous cellular automaton is Conway's Game of Life. A search on Wikipedia or Youtube for Conway's Game of Life shows that it also facilitates many different autonomously moving configurations, e.g. the gliders.
Yes, I've heard before of Conway's Game of Life and the gliders. Nice simularity! :)
User avatar
shredder
Member
Posts: 13
Joined: Wed Mar 06, 2019 5:23 pm
Location: Poland

Post by shredder »

Dr Guru, what do You say about joining the Krissz's site? :)
Dr Guru
Member
Posts: 34
Joined: Tue Jul 31, 2012 12:35 pm
Location: Germany

Post by Dr Guru »

shredder wrote:Dr Guru, what do You say about joining the Krissz's site? :)
Hi Shredder, I'm currently not planning to join. Lack of time being one reason. Also I guess I would have to undergo some serious reflex training to reach the crazy skills needed for most of the interesting caves. If you know my game Brain Delicacy, you know that all the caves there follow the rule "tricky to solve, but easy to play".

But I enjoy watching the Expert Level caves that Arno posts here in the forum, and I think it's fascinating that you guys still come up with original ideas.
User avatar
V-12/Tropyx
Member
Posts: 42
Joined: Tue May 29, 2012 7:32 am
Location: Poland
Contact:

Post by V-12/Tropyx »

Arno wrote:Thanks Logic! Yes, that's an interesting phenomenon too! :)
Noticed this phenomenom many years ago too.

There is another phenomenom in Professional Boulder Dash from Sijben Soft (which soon became Boulder Dash III) where in cave E two fireflies became killed by a stones, but normally they shouldn't be killed, because there is no movement of stones or fireflies. This bug appears in both mentioned versions and also No One's version. Anyone can explain me how it is possible?
Boulder Dash XII (1999) [own reverse engineering of BDI]
Boulder Dash 2000 (2000)
Fantasy Boulder Dash I (2001)
Zulder Dash (2009)
Power Dash (2012)
User avatar
shredder
Member
Posts: 13
Joined: Wed Mar 06, 2019 5:23 pm
Location: Poland

Post by shredder »

V-12/Tropyx wrote:There is another phenomenom in Professional Boulder Dash from Sijben Soft [...]
Very interesting observation! :) I've checked this one on CCS64 emulator and yes... firefly with boulder above explode just before Rockfords birth.

I think it's a bug of scanning the cave, it looks like scan treat the boulder like a falling one and thats why FF explode...

But it's only my opinion ;)


Hi Dr Guru! :) I'm understand. To bad because it could be great to see You playing and building caves on the Krissz's site :)

And you're right, it takes time to be able to solve some crazy caves :) But it's very motivating and delivers lot of fun :)
User avatar
LogicDeLuxe
Member
Posts: 637
Joined: Sun Jul 15, 2007 12:52 pm
Contact:

Post by LogicDeLuxe »

V-12/Tropyx wrote:There is another phenomenom in Professional Boulder Dash from Sijben Soft (which soon became Boulder Dash III) where in cave E two fireflies became killed by a stones, but normally they shouldn't be killed, because there is no movement of stones or fireflies. This bug appears in both mentioned versions and also No One's version. Anyone can explain me how it is possible?
Those boulders are in fact placed in a falling state. It is unusual, but I wouldn't call it a bug.
User avatar
Arno
Site Admin
Posts: 2826
Joined: Sat Mar 17, 2007 2:26 pm
Location: netherlands
Contact:

Post by Arno »

Episode 3: The BnB

In this episode we examine another very simple dancing fly formation, the BnB, or Bob & Bobette. Here, the Bob is named after a butterfly I got from Rory Agsten many years ago, see this thread.

The BnB is closely related to the FnF from previous episode. It consists of 2 butterflies moving upwards (this video shows both).

We start with the overview of the properties of a BnB:
- Name: BnB / Bob & Bobette
- Composition: 2 BF
- Short loop: 5 phases
- Long loop: 5 phases
- Shift per short loop: 1 Up

In this article we’ll treat similar questions as in the FnF article, like:
- How does a BnB work?
- Why does it move up (and not to any other direction)?
- Are there any other dancing formations with 2 butterflies?
- How could you launch this dancing pair when playing a cave containing 2 butterflies?

How does a BnB work?

Below picture shows the 5 phases of the short loop. Again, we end with the phase where the full group has been lifted 1 position up (phase 1’).

Image

In this picture we use the same symbols (circles, red signs and green lights) as we did in previous article.

All these phases are very similar to the FnF. During phase 1 and 2, both BF are simply spinning.
In phase 3 both BF pass each other such that at first sight they could no longer move to their right (first choice). Since the cave scan runs from left to right, the dark green BF is scanned first and moves forward (=up). Next, the light green BF is scanned. Since the dark green BF has already been scanned and moved, this BF can freely move to its right (=left). Phase 4 shows the result of these moves.
Since the cave scan runs from top to bottom, in phase 4 the dark green BF is again scanned first, and moves to the right. Now the right side of the light green BF has become free and the BF will move there (=up).
Lastly, in phase 5, the light green BF’s way to the right is blocked and so it moves forward (=up), while the dark green BF moves freely to its left (=down). This results in phase 1’ and the cycle is complete.

At the end of the cycle, both BF have once been pushed up (this happens in phase 3 and 5), such that the whole group has effectively been pushed up. For each BF, the loop consists of 4 phases of spinning and one extra phase to be pushed up. This makes that the full loop takes 5 phases. Phase 1 and 1’ are similar, in the sense that within the group both BF occur at the same position. There is no swap of role. Thus, the long loop and the short loop both consist of 5 phases.

Why does a BnB move up?

A valid question. We have seen previously that a FnF moves to the left, while we know that a firefly tends to move left. Since a butterfly tends to move right, you could expect that a BnB also moves to the right, isn’t it?
Well, actually, the direction of a dancing pair is not determined by just the favourite moving direction of a fly, but rather by the combined effect of this moving direction and the cave scanning rules.
The magic happens in phases 3-5. Because butterflies spin clockwise, at the point of interference the left BF is pointing up, while the right BF is pointing down (as in phase 3). Now the cave scanning order determines what happens:
- Phase 3: because cave scan is from left to right, the left BF is pushed up.
- Phase 4: because cave scan is from top to bottom, both BF can follow their usual spinning path, so that the previously right BF now gets at the left side.
- Phase 5: because cave scan is from left to right, the other BF is pushed up.
In other words, the BF that is scanned first (according to the cave scanning order rules) makes the crucial move. This move is upwards for the BnB.

To compare the FnF and BnB, here is a summary of phase 3-5 in both formations:
FnF:
- Both FF are spinning counter-clockwise: gives top FF pointing left.
- Cave scan from top to bottom: top FF moves left.
- Cave scan from left to right: both FF swap position.
- Cave scan from top to bottom: top FF moves left. End result: both moved left.
BnB:
- Both BF are spinning clockwise: gives left BF pointing up.
- Cave scan from left to right: left BF moves up.
- Cave scan from top to bottom: both BF swap position.
- Cave scan from left to right: left BF moves up. End result: both moved up.
This explains why FnF moves to the left while BnB moves up.

In the previous article on FnF, we used an argument of rotation symmetry between phases to exclude other directions than left for the FnF. A similar argument could be used to exclude other movements than upwards for the BnB. (Check it!)

Are there any other dancing formations with 2 BF?

The answer is no, and we will confirm this by using a similar approach as we did for the FnF. Basically, we will test all possible setups. Remember, however, that the crucial phases of a dancing pair are the ones where both the BF interact. So we can skip all setups where both BF can freely move to their right.
Suppose that one BF (the light green one) is to be pushed forward, because it cannot move to its right. Below picture shows all possible configurations where this happens. The 4 columns represent the 4 target directions for the light green BF (up, right, down, left).

Image

Each setup indicates the result after testing it in the Construction Kit. Most of them lead to spinning flies. Some setups give a vortex of two BF. Two setups are equal to one of the 5 phases described above and will of course result in a BnB dance. Finally, there are two setups indirectly leading to phase 5 of the BnB and will thus result in a BnB as well.
Conclusion: no other dancing formation has been found, so BnB is the only dancing formation with 2 BF.

How to launch a BnB?

If you have 2 BF somewhere in a cave and you need to produce a BnB, basically, you need to trigger either one of the 5 phases, or one of the setups which indirectly lead to such phase (see above).

The most common strategy (also applied in the video), runs as follows:
1. Create a spinning BF.
2. Let the other BF approach, such that when it hits the spinning BF any of the 5 phases is triggered (either directly or indirectly). This must be timed right. If necessary, delay the approaching BF with one or more frames (e.g. by removing more (or less) dirt along the BF’s path).

There are more ways. One funny way is to let a FF bounce with 2 BF which in turn form a BnB. This is illustrated in this video, for a large group of BnB’s.

Final word

Now that we have concluded that:
- FnF is the only dancing fly formation of 2 FF, and
- BnB is the only dancing fly formation of 2 BF,
a natural question is whether exists a mixed dancing fly formation, consisting of 1 FF and 1 BF?
This is a question to be tackled in the next article! :)
User avatar
Arno
Site Admin
Posts: 2826
Joined: Sat Mar 17, 2007 2:26 pm
Location: netherlands
Contact:

Post by Arno »

Episode 4: Does a mixed dancing formation of 1 FF and 1 BF exist?

Until now we have found 2 dancing formations with 2 flies: the FnF and BnB. Both consist of 2 flies of the same type; either 2 FF or 2 BF. What remains is the question what happens if we combine 1 FF with 1 BF? Is it possible to create a mixed 2-fly dancing formation?
We will attempt to answer this question first by using some common logic, and afterwards by (smartly) testing all candidate setups.

Approach 1: use a logical argument

Remember that FF are spinning counter-clockwise, while BF are spinning clockwise. In other words, FF tend to move to the left, while BF tend to move to the right. You can argue that these opposite moving directions make it unlikely that a 1 FF + 1BF dancing formation exists.

Suppose that such formation exists, and that it moves to some direction d within the (short) loop.
This implies that there must be:
- A phase x where the BF pushes the FF in direction d.
- A phase y where the FF pushes the BF in direction d.
Now what should happen between phases x and y?
At phase x, the BF is somewhere at the FF’s left side. Because both are moving opposite, at phase y the setup is basically the opposite, where the FF is somewhere at the BF’s right side.
After phase x both flies are drifted apart and will spin in opposite directions. In order for phase y to happen both flies have to meet again and interact, while at the same time have swapped location at either side of the line in direction d. This seems possible, but since they were drifted apart, the timing will be asynchronously. In other words, when the FF is either on or past the line, the BF will get at the other side (at a point of interaction) one or more frames later (or vice versa). This implies that phase y cannot take place anymore. Consequently, a dancing formation 1 FF + 1 BF is probably not possible.

Approach 2: check all possible setups

We will now apply a more full proof method by checking all setups that could theoretically lead to a dancing duo. This approach is similar to what we have done in the previous articles about the FnF and BnB. Remember that there must at least be some phase where the BF pushes the FF in some direction. Below picture shows all possible configurations where this happens. The FF (blue arrow) is pushed to some direction by the BF (green arrow). The 4 columns represent the 4 target directions for the FF (up, right, down, left).

Image

After testing, it is found that all these setups lead to a situation where the 2 flies keep spinning close to each other. Sometimes both flies have completely drifted apart and spin around each in their own area. Sometimes they still share one or more positions in their 2x2 spinning areas. Such configurations look funny when used in a cave. But: none of the tested setups gives a dancing formation.
We have now tested all configurations where the BF pushes the FF. Should we also test the opposite setups, where the FF pushes the BF? In fact, we don’t need to. Since it is required that both types of phases occur in a dancing formation, and we already excluded one type, we don’t need to test for the other type anymore. (You could still do this test though, but you won’t find a dancing formation. ;))

Conclusion: a dancing formation with 1 FF and 1 BF does not exist.

Wrapping up all findings until now, we can conclude that when using just 2 flies, only 2 dancing formations exist: the FnF and the BnB. This means we can move on by looking at more complex formations, involving 3 or more flies!
Post Reply