Clash Royale 4-Card Cycle - Shortest Path to the Same Card


This is a companion discussion topic for the original entry at https://royaleapi.com/blog/four-card-cycle

Shortest Path is an interesting metric but I think would be better if we could also understand the Average Path. Depending on the deck and what card you use, you will not have the 4 cheapests cards in hand. If we know Average Path we have a better understanding how fast the deck is.

Define what you meant by Average Path. If you can describe the logic then we can write it.

We have 8 cards (A to H). If I play card A we have the shortest path using cards B to H, let’s say it is 6 elixirs. If I play card B we have the shortest path considering A and C to H, let’s say it is 7. If we do this for each of the 8 cards we will have the shortest path in each case. I uderstand you find the lowest number and that’s the Shortest Path. If you average 8 paths we also have the average shortest path of this deck

I still failed to see what you are after. I’ve made a diagram showing that you can get to any card you want if you follow the shortest path. So what would be the purpose of showing “average path” when the fastest is the shortest?

cycle-explain

If we map all the possibilities to find the average, it’s not actually 8 paths. You would need to count all node connections connecting 8 nodes in a network graph topology where no nodes can be visited twice.

Let’s say a deck with the cards and elixirs: A1 (card A with 1 elixir), B1, C2, D2, E4, F4, G5 and H5. It is a 3.0 deck with shortest path of 6.

Let’s calculate the shortest path for each card we play:

If we play card H the shortest path to play H again is: A1+B1+C2+D2 = 6
If we play card G the shortest path to play G again is: A1+B1+C2+D2 = 6
If we play card F the shortest path to play F again is: A1+B1+C2+D2 = 6
If we play card E the shortest path to play E again is: A1+B1+C2+D2 = 6
If we play card D the shortest path to play D again is: A1+B1+C2+E4 = 8
If we play card C the shortest path to play C again is: A1+B1+D2+E4 = 8
If we play card B the shortest path to play B again is: A1+C2+D2+E4 = 9
If we play card A the shortest path to play A again is: B1+C2+D2+E4 = 9

Depending on the card played the shortest path can increase a lot. If we play a 1 elixir card we will need 9 elixirs to play the same card again (not only 6).

On average this deck has a shortest path of 7.3

Now, let’s look at another deck with the cards: A1, B1, C2, D2, E2, F3, G6 and H7. It is also a 3.0 deck with shortest path of 6!

If we play card H the shortest path is: A1+B1+C2+D2 = 6
If we play card G the shortest path is: A1+B1+C2+D2 = 6
If we play card F the shortest path is: A1+B1+C2+D2 = 6
If we play card E the shortest path is: A1+B1+C2+D2 = 6
If we play card D the shortest path is: A1+B1+C2+E2 = 6
If we play card C the shortest path is: A1+B1+D2+E2 = 6
If we play card B the shortest path is: A1+C2+D2+E2 = 7
If we play card A the shortest path is: B1+C2+D2+E2 = 7

On average this deck has a shortest path of 6.3.

On cycling perspective there is a significant difference between the two decks. The second one is faster and will, probably, allow the player more fast cycling strategies.

Let’s use your first example:

A1-B1-C2-D2-E4-F4-G5-H5

I don’t see how you have arrived at:

If we play card A the shortest path to play A again is: B1+C2+D2+E4 = 9

Even if your hand only has the cards with the highest elixir costs:

Played In-Hand (IH) In-Pile (IP)
A1 G5-H5-F4-E4 B1-C2-D2

Let’s notate this this way:

turn played IH1 IH2 IH3 IH4 IP1 IP2 IP3
1 A1 G5 H5 E4 F4 C2 D2 B1
2 F4 G5 H5 E4 C2 D2 B1 A1
3 C2 G5 H5 E4 D2 B1 A1 F4
4 D2 G5 H5 E4 B1 A1 F4 C2
5 B1 G5 H5 E4 A1 F4 C2 D2
6 A1 G5 H5 E4 F4 C2 D2 B1

→ Your shortest path to play A1 again is still 6 elixir, not 9.

Correction: as noted in later replies, the shortest path here is indeed 9.

Fist of all thanks for you patience :slight_smile:

Maybe we are having different views or I’m wrong.

But my point is: how many elixirs would I need to play the same card again (so, how fast the deck can cycle).

Based on your table we have:

On turn 1 we have A1, G5, H5 nd F4 in hand. We use card A1 and go to turn 2 where we habe G5, H5, F4 and E4 in hand. How many elixirs we will use to have A1 again?

On turn 2 we play the cheapest card, which is 4 elixirs (E or F). Then on turn 3 we play the cheapest card, which is D (2 elixirs), …

On turn 6 we have card A again in hand. To get there we played: F4, D2, C2, and B1, a total of 4+2+2+1 = 9 elixirs

Ok you know what, I think I got what you are saying… because A1 is already the cheapest, you can’t get back to A1 with the cheapest.

I see that my table actually shows 9 and not 6 :sweat_smile:

I’ll think about it. However, I’m not entirely sure how valid this point is because generally speaking the cheapest cards are rarely the card you want to cycle to.

For example, say you have skeletons — how often do you need to spend 9 elixir to get back to skeletons? not really that much, I’d say.

So while your idea is logical, what use case does it actually solve and what type of strategy would it inform? How would a player use that info to determine if they should play the deck?

If we can’t find a reason for this number to exist, then it’d be hard for me to want to implement it.

I agree with you. But that’s why I suggested the average. So the average would indicate how really fast you can cycle a deck in general :slight_smile:

Going back to my examples the first deck is a 3.0 with shortest path of 6 and avg of 7.3. And the second deck is also 3.0 with shortest path of 6 but avg of 6.3. So the second one will be 16% faster than the first one on average.

But I agree that this is not an essencial metric. It’s just nice for those who like fast cycle decks to find and build new decks.

And I just noticed that because after whatching some oyassuu videos I started using fast cycle decks and I’m trying to find or build some.

The definition of fast cycle is the shortest path. Have you calculated avg shortest path to see if it gives anything meaningful? I can obviously check it and see if it gives anything meaningful, but as it stands right now I am not seeing a clear reason for it.

So there are two possible solutions for this:

  1. You assemble a bunch of decks (e.g. 20) and show me the results, and demonstrate why average is useful.
  2. I do the same when I have time.

Unfortunately I don’t really have a lot of time so if you want me to do this then it will be added to the low-priority to-do list. If you are convinced that what you are proposing makes sense, then do the work and show me why it would be relevant. Sounds good?

Sure! That was just an out of the blue idea I had when I read about the shortest path metric. I’ll try to go deeper into the avg shortest path to se if I find something and let you know!

1 Like

I tend to agree that the average cycle cost doesn’t matter. You don’t cycle to get back to your cycle cards, and if you have 4 cycle cards, one will always be available upon playing a “power” card to start the cycle. The sequence you use the cycle cards may be different, but they will be available to use consecutively, even if you didn’t complete the cycle last time through. A cycle deck’s average elixir cost and the combined elixir cost of its 4 cheapest cards is all you need to know.

1 Like

I was looking at a few decks and the 4-card cycle value. In this deck:

  • barbs-5,bomber-2,espirit-1,fireball-4,furnace-4,goblin hut-5,mirror-*,mother witch-4

4-card cycle is listed as 8, but it looks like it would have to be

eg: bomber(2)+espirit(1)+mirror(2)+4 = 9

Am I missing something?

It’s because in-game count mirror as 1 elixir and so we also count it as one when calculating anything. We can obviously change it to something logical — but in the past when we have done that to calculate average elixir, people complained and asked why it doesn’t match the same value in-game…

Ah right, the fact that in-game counts as 1 is basically broken IMHO. It be better if they assigned it average of the remaining cards. Whenever you have mirror in the deck you know the number isn’t right. Since they don’t show the cycle value you could at least compute that one correctly.

“Knowing how quickly you can get back to your defensive or offensive options is what makes some decks easier to play. Some decks cycle so quickly that you are able to attack / defend with the same card before your opponent can put in another card.”
I agree with your post but this paragraph very inaccurate the classic 6 elixir (4-card-cycle,log icegolem,a spirit,skelitons) let’s use 2.6 your previous muski is dead you need to deploy another one you have icegolem to tank her log to deal with swarm.
Also the way you put those four cards before you get to the card you need is also very important like there is a difference between throwing cards randomly and placing them well.