Thursday 25 July 2019

MSN minesweeper revisited (in 2019)

I have expressed numerous time my love on the MSN minesweeper...and now it is back online. It is a pity the mienfield was down without any support...but hopefully this is going to last longer.

So here this is a question related to the grid efficiency in MSN minesweeper.

\square & \square & B_1 & B_2 & B_3 & \square & \square\\
\cdots & 1 & 1 & 1 & 1 & 1 & \cdots \\
\cdots & 0 & 0 & 0 & 0 & 0 & \cdots

Suppose that you have a line of 1s along a long enough edge (basically you do not get any information from the two endpoints of the edge), then at any of the 1s, the chance of a mine appearing on a random grid should be 1/3...or is it?

Assume that the universal distribution is uniform. I.e. that is an equal chance of getting any of the $C^n_r$ many combinations (ignoring the corner rule since it is less relevant). Similarly without further hints, if we have n remaining unrevealed grids and r remaining mines, then the number of possible combinations is again $C^n_r$.

Out of the formula there is one single variable that varies with actual config - the number of remaining mines depends on the length of the edge modulo 3. Let $r_i$ be the remaining mines count after revealing the row given the configuration $B_i$. Then

$P(B_i) = \frac{C^n_{r_i}}{\sum C^n _{r_k}}$

If the number of mines to be revealed is independent of the configuration then we can conclude that the chance are equal. Otherwise we can compare the binomial terms:

$C^n_{r+1} = C^n_r \frac{n-r-1}{r+1}$

The usual ratio between grids and mines is 5:1 -- but that varies greatly depending on the given situation. In particular there are loads of 1s and 0s in our example, which boosts the ratio greatly. At the ratio of 2:1 the increase of mines would not increase the likelihood of the evisceration, but of course such ratio is unrealistic in a minesweeper setup, so we can say that the configuration that the configuration that leads to less mines on the row, is more likely.

One may raise the question: shouldn't the equilibrium happens at 3:1 instead of 2:1, from a likelihood perspective? We can visualize the likelihood approach by the following problem.

In a box there are $n$ balls, in which $r\approx n/x$ are white, and the rest are black. (i.e., the ratio between balls and white balls is $x:1$). Suppose we draw $\alpha$ balls out of it and we want to compare the chance of having $\beta \approx \alpha /3$ or $\beta +1$ white balls in the draw. If we want the chance between the two events to be comparable:

$\frac{C^{n-\alpha}_{r-\beta}C^{\alpha}_{\beta}}{C^{n-\alpha}_{r-\beta-1}C^{\alpha}_{\beta +1}} = \frac{(n-\alpha-(r-\beta))(\beta +1)}{(r-\beta)(\alpha -\beta-1)} \approx \frac{1}{2} \frac{n-\alpha - (r-\beta)}{r-\beta} = 1$

That gives $n-\alpha \approx 3(r-\beta)$, or $n \approx 3r$.

In our problem however, the term $C^{\alpha}_{\beta}$ does not exist, because we do not take the full combination within the balls drawn. In other words, we do not allow orders like


The three only allowed scenarios are


Once we fixed that in our formula, similar calculations yield $n\approx 2r$, instead of $3r$.


Of course there is no such 'infinite edge' in minesweeper. The endpoints is definitely giving extra information unless it looks like the following:

\square & \square & \square & \square & \square & \square & \square & \square & \square\\
\square & 1 & 1 & 1 & \cdots & 1 & 1 & 1 & \square\\
\square & 1 & 0 & 0 & \cdots & 0 & 0 & 1 & \square\\
\square & 1 & 0 & 0 & \cdots & 0 & 0 & 1 & \square\\
\square & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \square

Any extra information would impose extra difficulty on these kind of analyses, but I am here to give some primary idea on what's happening.

To give an application, consider the following example. I said on my twitter that red made a bad move:

The reason behind is simple. There is only [something between 1/4 and 1/2] chance that the grid contains a mine. On the other hand if it does not the opponent gets a free flag immediately with everything else remains the same. it possible to calculate the exact chance? Yes, and this is not hard at all: this is a 16x16 board with 51 mines. The shown area is the only revealed portion. To calculate the probability we list the few only scenarios then the chance follows by the binomial coefficients.

Tuesday 23 July 2019

Fire Emblem: Three Houses and Rokkr Sieges

Back to something casual...Fire Emblem. Surely quite a lot happened since last time I wrote about FE and now it is a good time to talk about that again, since Three Houses is coming soon.

Well what should I expect? Unfortunately it's very hard for me to make a fair comment because I have not played the main franchise since the GBA era, a time where skills did not exist and information was sacrce because you didn't know Japanese back in the days...But FEH players should beware of the vast difference between playing FEH and the main franchise.

In FEH the key word is competitiveness. We keep facing stronger and stronger metas and we need to use the same team to work around it (unless you spend heavily). When you use more or less the same team against the opponent, what brings you victories is either the tiny bit of stat difference, or a well-desgined tactic which after all tricks the AI.

In the main franchise it is a totally different story. You are not really fighting in the fair setup -- instead of a 4v4 battle you are doing a 15v50 battle in a well designed stage where you are expected to solve the puzzle bit by bit. Restrictions are kind of loosened but you often ended up putting soft restirctions on yourself: units can be "killed" without failing the stage, but you want to unlock all stories. Time limit is less of a problem but you want to get all secret items and recruit hidden characters...the flexibility is much higher but the difficulty can be no less than what we have met in FEH. The most important bit is, you need to know how to work with a complete army, instread of your precious 4 units.

But yeah I can't wait further for the game. And I am going for Edgelord. Based on the official tease and FEH unit intro she's gotta have an interesting story behind.


Back to FEH we now have two more game modes which I also want to talk about.

- Alligence battle -

Interesting concept, but competitiveness forces the highest difficulty and hence very tense and allows very limited unit choices. It's also very luck based when you are not using a DC/CC based team, then you will have to play multiple times to get a high enough score.

But the reward is kind of reasonable - taking 900 as the threshold, the effort required to climb above 900 is hard but not very rewarding, while scoring a 860 is of moderate difficulty. I believe a large portion of the players are settled to the casually playing state on this mode.

- Rokkr Siege -

The opposite of the alligence battle. Fun, promotes casual play and allows huge flexibility. The three difficulty means you can score quite a lot without getting into trouble, and the score cap means you do not need to strike for the optimal. For sure the reward is not the most attractive but 10k feather is still 10k feather and I will take it.

In the discord channel we have seen many different setups, but today I want to talk about my setup.

Three features about the dynamax (taking a lesson from the shitty pokemon sword&shield -- that's another story for another day) boss:
1) Swaps upon special proc
2) AOE damage upon special proc
3) Always counterattack creating non-zero damage

If you are taking lower difficulties, damage is not a problem and you can deploy simple means of recovery to overcome the damage like recover 3, or breath of life. In advanced however, you will either need to stop special from processing, or use a strong means of healing, like using a staff or heal based moves.

Swapping means your defense tiles will then be occupied by the boss, or that the boss will escape from your lineup. In lower difficulty, it is hard to hit the score cap just because the multiplier is too low, so stragety that adapts swapping is essential if we want to hit the score cap, especially if we are fighting cavalries.

With that being said, to tackle lower difficulties steadily you would like to:
- mobility to tackle swapping
- minimum healing power

And to tackle the advanced difficulty you would like to:
- much stronger healing
- ability to take down generic enemies
- not necessary to keep a full team to the end; in fact it would be easier to finish the battle within 5 or 6 turns with some units defeated

Some like to use tank units with guard and healing special to lock down the boss, but without enough merging it is hard to hit the score cap. Don't forget that special fighter and guard are both premium skills and quite costly to inherit (if you do not use to do that).

Another problem with guard is the 70% HP requirement which is hard to maintain during enemy phase. My brave sword guard DC Ayra strategy failed miserably -- not to mention that such build is so impractical in PVP battles.

So with my newly merged +10 Catria, I had an idea. A lesson taken from my Cherche.

The setup is basically dancer + flying healer (witchy hand) + 2 fliers

Dancer - Partial tank, need to tank attacks with triangle disadvantage

Olivia in my case
A - Atk/Def Bond 3
B - Wings of Mercy 3
C - Hone Atk 4 [flexible C-skill or depends on your flier performance]
S - Atk/Def Bond 3

L!Azura is of course a perfect choice for fliers, but she cannot tank physical attacks and you may not have enough Iote shields.

Flying healer - putting guard effect on enemy

HS!Sakura [with H!Mia inherited]
A - Iote shield [use something else if you have it on the S-slot]
B - Live to serve 3
C - Hone fliers [spur buffs are also preferred, since the units may move around]
S - Breath of life 3

Fliers - to block boss on one quadrant and DPS
Units depends on the color of enemy but they should be brave based with galeforce. Without galeforce we can steadily hit the cap in 5 turns. It is suggested to bring at least one galeforce flier. If you do not have galeforce, sol is a temporary solution.

Standard builds:
Weapon - Brave weapon [or amiti / whitewing weapons]
Special - Galeforce / Sol
A - Iote shield / Swift sparrow / Death blow / Life and death
B - Seal atk / seal def
C - Ward fliers
S - Iote shield / defensive based seals

We start by blocking the boss on one of the quadrant - attacking is of second priority because we have enough time. It is important to keep the right formation to keep things predictable.
(1): Cherche to destory the wall
(2): Sakura to attack so as to reset the special cooldown
(3): Catria attacks [quad attack due to whitewing effect] 3 times [galeforce + dancing]

If we are fighting close attack bosses then it's not going to move but otherwise the boss may move by a grid, then we have to reform. We first move the unit to facilitate Sakura - remember that when you are using Brave weapons, a second attack would trigger boss' special so we must use Sakura before the second attack.

Here Sonya moved up a grid.
(1): Cherche moved up and attack [galeforce activated so that she looks active again]
(2): Sakura goes up to attack
(3): Catria and Olivia go up accordingly

It is important to deal with other generic enemies. That's the advantage of using galeforce -- we wait until they approach the fliers and attack, within the attack range the two fliers can kill the enemy then going back to the original position without further dancing. The dancer is also expected to be capable to kill most non-armor enemy by floating around.

It is relatively easy to lock the boss using this strategy, unless it's cavalry distant boss -- then we will need to carefully corner her.

The theoretical limit is 6.5 mil points. I somehow used 2 crests in the first round, so this is a pretty good score. It's definitely not a very rewarding act, yet this is a fun mode to play.


Oh and the Three Houses banner is out. Bitybroken by Chrom I spent 400 orbs to get Edgelord and Byleth. Now I am not prepared for Ayra revival...

Monday 22 July 2019

夢.十夜 (3) The Arena





































按他的介紹下一個活動是所謂競技場活動,主要分為PVE[Player vs Environment]跟PVP[Player vs Player]兩項排名。PVE那邊沒甚麼好說的,就是刷固定的關卡打固定的對手組合。拼的是玩家能課多少抽活動角色,拼玩家能吃多少水,拼玩家能肝多少小時。





















卡羅:「先別吵(o´・ω・`)σ)Д`) 小紅對接下來的活動有點想法,需要四五個人來幫忙。有誰打算要衝這個活動的嗎?」