i just played like 5 matches with my 1/1/1 Hulk in PVP. In those, I got maxbe 3 turns (out of… 50?) where his tile switch actually matched a tile.
Just my bad luck, or is the AI trying to switch tiles that will not result in a tile match, and those 3 occasions wherr actually a failstate of the AI?
I don’t think I’ve had one yet, but I’m not surprised. “Any two tiles” out of 64 - I don’t know how to do the statistics on that, but the event of those two tiles filling in 3-in-a-row or greater are not favorable. Even less so for both tiles to match simultaneously.
This is just such an odd power to me. I suppose getting it to lv 4 might be more interesting. It’s a free miniature Loki purple. That can cause a little bit of havoc, potentially, but it’s just as likely to mess up matches you were trying to engineer.
4 corner tiles (2 possible directions to move each)
64 = 24 edge tiles (3 possible directions to move each)
66 = 36 center tiles (4 possible directions to move)
So 42 + 243 +36*4 = 224 possible moves
How many match do you typically see on a board? like 5-10? (I’m erring on the high side.)
Each unique match is actually 2 possible moves (e.g in an up/down swap, you can either move the top tile down, or bottom tile up to make the same match.), which gives us about 10-20 matching moves on average on a board.
10/224 = 0.044 chance to make a match
15/224 = 0.066 chance to make a match
20/224 = 0.088 chance to make a match
Your observation:
3/50 = 0.06
Looks okay to me.
Incidentally, you can also use this to calculate the expected ap gain/damage from the ability.
Edit Nevermind! This is would be if he only made adjacent swaps.
It’s not a match attempt, it’s a swap of any two tiles on the board. Corner tiles have the same number of swap possibilities as any other tile. Think Coulson or Quicksilver (except random), or Devil Dino.
You would probably be better off simulating this rather than trying to solve for it in the abstract. Writing a simple simulation script and brute-forcing iterations would be simpler to understand, interpret and ‘solve for’.
That fact only makes it even more rare by making the possible number of swaps significantly higher. Any one tile can be moved 63 other locations x 2. I’m not good with stats, but it seems that 6% estimate up there is very high compared to the actual odds. Probably more 0.06%.
With an average of about 9 tiles of a given color on the board at a time, I’m figuring an average of 4.5 pairs of tiles which share a color and are adjacent. I’ll assume each such pair has two places to move a tile to, to make a match (this isn’t true for pairs on the edge of the board, but it’s pretty close to two). Then account for tiles of the same color which are one space apart, to get 13.5 places on an average board to which a tile could be moved to make a match at any given time.
So, 13.5*2/64 of a chance that a tile is moved to that position (since two distinct tiles are always chosen, out of 64 possibilities), and 1/7 of a chance of the tile being the correct color. That gives you about a 6% chance of a match being made.
I wrote up a quick MATLAB script to simulate what the odds are of the random swap resulting in a match. It starts with 8x8 board with seven different tiles, and no already-there 3-in-a-row tiles. It then randomly switches 2 tiles, and checks to see if there is a match. With 1 million sims, it resulted in at least one match 12.7% of the time. There was only one time in the million sims where it resulted in a dual match-5.
If you get that power up to where it switches two tiles, the odds (as you would expect) nearly double. The sim switched one pair of tiles, and then another pair of tiles. A tile could have been switched with each pair, which I believe can happen with this ability…and I suppose if you wait around long enough, you’d see a pair of tiles switched and then switched back. In any event, the odds of at least one hit were 22.85% The best match was an absolutely enormous match that blew up three rows, two columns, and would have given 12 AP of a single color. Naturally, the AI would have got this one.
Short answer - Over a small sample size, it’s quite possible to see a 6% success rate. That’s RNG at work. Overall, you should hit at about double that rate.
It’s streaky like everything else. I’ve gone 3 games where he never makes a match, then he’ll make three in a row. As always, the answer is “random is random.”
No cascades in this one. As I said, it was a very simple script that only did the random swap. The vast majority of the matches, as you would expect, were simple 3-in-a-row. Four in a row was less common, and two 3-in-a-row were even less common than that. Fives were exceedingly rare. Overall, it was a little more than 1 extra AP every two turns for a single swap, not including cascades. For two swaps, it’s a little more than one AP per turn. Obviously, cascades would add a slight amount tot this value.
By the way, Team-Up tiles only have a 10% spawn rate; the other 6 colors have a 15% spawn rate. Not sure if you took that into account.
Also, the double swap selects two pairs of tiles, and then swaps all 4 at the same time. I don’t believe it’s possible for the same tile to be swapped twice (or the same pair of tiles swapped, and then swapped back, although that would be vanishing-ly rare even if possible)
I didn’t take that into account, because I didn’t know that! Where is that documented? That might change the success rate very slightly, but not a huge amount.
I wasn’t quite sure how that worked, so I decided to play it safe and assume that the same tile could be switched out twice. That actually makes it somewhat easier, and should be ever-so-slightly quicker to run.
It’s an interesting read. Some choose to interpret it as pure propaganda. I think that’s highly unlikely, mainly because the explanation given regarding the AI’s behavior is by far the simplest way to implement.
The part relevant to this discussion is:
The computer does not try to screw up your turn by dropping bad tiles either. Each new tile is selected at random, individually, without any feedback from the swap‑selection code. I did learn that Team-Up tiles drop with a slightly lower rate than color tiles. Each color is weighted with a value of 1.0, while Team‑Up tiles are weighted with 0.75. That means there’s about an 11% chance that a new tile will be a Team‑Up, and about a 15% chance for each of the colors.
Well to be fair, I’m not sure either. I’d assumed the code would simply select 4 different tiles at random, and then swap 1 with 2 and 3 with 4. Presumably that’s also how they handle a 5-cover Switcheroo when the AI uses it.