做了這樣一個夢。

我手上提著一盒壽司，慢慢地爬上四周貼滿補習社、樓上書店、理髮店以及色情玩具店海報的樓梯，進入一部由更多海報舖成的狹窄空間。前後左右，連頭頂也不放過；唯一可以看見素色的就只有地板了－－不、地板上也散滿了掉下來的紙張，只是空白的背面沒那麼刺眼而已。

「叮」一聲，電梯緩緩在四樓打開了門。穿過左邊的文青型樓上書店和右邊的波鞋店，眼前是一條連接著兩梗大廈的橋樑。說是橋也不過是三四米左右的距離而已。兩邊用鐵絲網圍住大概就是防止有人在這裡跳下去吧。站在橋的中間向下望依稀可以看見幾座老舊的唐樓之間剛好空出了一小塊空地，上面排滿了一個個被清理完不久的垃圾筒，飄上來的一絲垃圾味被濃重的油煙味蓋過－－魚蛋燒賣、煎釀三寶……還有新有的炸雞？不過我的思緒卻沒有和這些氣味糾纏太久，一個有趣的問題在我腦中閃過：在寸金買不到尺土的這片地方，空出這樣「被遺忘的一畝」是一件很奢侈的事情。到底以前是發生了甚麼事讓大廈圍繞這裡建成？這一格土地又屬於何人、以後又會怎樣－－嘛，在這條街衰落之前大概不可能被重建吧。

其實穿過這條橋也就數秒的事。在兩層防火門之間我好好檢查一下這次的的裝備；水手服、有！過膝襪、有！水和毛巾、有！這可是去練舞的必要裝備，無論缺那一樣都會讓我渾身不舒服從而令表現變差。今天就先打兩道DEA(Dance Evolution Arcade)然後練十刀DDR(Dance Dance Revolution)，以1100大卡為底限吧。我這樣想著推開了防火門，眼前的景象從破舊的唐樓變成了荒廢的商場：兩尺見方的白方瓷磚大概是唯一比較淨的東西；乾透的醬汁一點點地散落在牆邊的桌子上，幾張膠椅在旁邊東倒西歪；垃圾筒早已超過它所能承載的容量，本來可以旅轉良蓋子現在反面朝天，露出裡面的快餐紙袋，還有顯然是我前天來時留下的空壽司盒。完全空置的三樓從扶手電梯那邊傳來野戰的聲音；有人或許會問到底是軍事宅對這個免租的樓層加以利用，還是一對對小情侶在享受價比千金的happy moment－－管它呢，那種地方我死也不會去。

一陣違和感從商場的另一邊傳了過來，明明是死寂的地方卻傳來了不該有的電子聲音。我把貼滿遊戲海報的玻璃門推開，模糊聲音立刻變得清晰可辨：前排是四個一組的街霸、拳王和鐵拳三代格鬥遊戲；中間放了傳統俄羅斯方塊(Classic tetris)、Pang、魂斗羅等中古經典小遊戲；後面貼牆的部分則是秋名山司機三五成群飆車的指定地點。裡面的違和感與其說是各種在發聲的機台倒不如說是機廳人滿為患，拳王等熱門遊戲不消說已經聚集了一群好武之人整裝待發，小眾遊戲如泡泡龍都有兩三人圍著討論機台和GBA版幀數算法不同引致爆彈用法上的分別－－這不可能啊！這種平時只有我一個認真玩遊戲其他人都過來做偷偷摸摸的事的地方就算貼出即將結業的公告也沒人來吧！況且在一旁煙癮還沒發作的老闆在一邊老神在在地和小孩玩耍，兌銀機也還活得好好的，根本不像是快要結業的樣子。

真好啊。我想起那家平日人山人海卻被加租逼走、真正承載著滿滿回憶的機廳－－

## Thursday 27 April 2017

## Tuesday 11 April 2017

### 11-04-2017

__The 10-point rating system__According to the announcement, Pixiv removed the 10 point rating system and instead put a "Like" button up there. The reason is that "95% of the evaluation function are currently evaluated at 10 points. Also, some problems rose due to the negative usage of the evaluation function".

Well the reason is not very surprising especially to those Osu! players. The average rating rises with time due to multiple reasons (the actual improvement in quality, fan-based community, points became popularity contests etc) and it's occasionally abused like spammed by 1-pointers (this is less common in pixiv because we don't have a in-built critic circle there, but for Osu! this is really obvious).

Two questions arose: should we modify the 10-point rating system to avoid those problems? Is the "Like" button serves as a better indicator than the rating system?

One important observation is that there's almost zero qualification required for someone to vote in both system. You just need to be a member (and played once, for Osu!) then you can rate the map/picture. That makes the source of voters very suspicious and very vulnerable against manipulation. Whether those manipulated accounts are alts or "followers" from the same community are not important -- it's out of the control of the system itself. The system can do nothing but to serve as what the sources wanted. In Pixiv, people spam 10-points for drawings they like/appreciate and that becomes a popularity contest, so why not? A "Like" system is better as for a popularity contest.

As for Osu! the in-build communication platform allows us to manually adhere some metric on the rating system - one may provide a guideline on giving rating and perhaps some suggested examples. Assuming that players (or at least the officials) reached an agreement on the ratings and players are willing to rate according to the guidelines, it is possible to introduce weighting on how valuable a vote is from a player. Players are still free to rate by their free will but votes that are overwhemingly random will receive a relatively lower weight. Ratings may also be scaled by approximating players' voting curve and make it close to the supposed guideline.

It is not possible to eliminate popularity contest because (1) first of all popularity-ish rating would still be the dominating voters after all (2) the minimal weight can't really be too low because at the end of the still this is "players' rating" not "players' rating on quality" - popularity remains as a non-negligible factor, but what we did is to reduce the power of pure haters/lovers and that gives a more representative overall rating.

A last note: although "my favourite" function exists in both Pixiv and Osu!, I would still prefer the "Like" button for Pixiv and the rating system to Osu! because Osu! system provide possibility of improving the rating system and we really have so many metric that has high correlation to pure popularity - instantaneous and long term play count etc that we don't really need another useless button to show that explicitly.

__3D Touhou__Blender these days are powerful to simulate these nasty bullet hell screens and this is one of my favourite. But my question comes from the perspective of the characters themselves.

It's extremely interesting to see how the authors blend a 2-dimensional spell card into a 3-dimensional space so that the bullets (at least apparently) fill the space. But what if we really want to fill the space and wipe those characters off the screen? What kind of spellcards should we use?

- For spherical bombs you would like to pack the space so that no escape route exists. That's essentially the sphere packing problem...that clearly gets harder at higher dimensions.

- If you want to shoot radial danmaku that floods the character without allowing it to move towards you, the thing you will need is to increase the bullet density on the manifold as the tangent plane of the character per Hausdorff measure in the space (?!?) -- in simple terms, it grows in the volume of (n-1)-sphere for Euclidean spaces, which is not looking good either.

- Laser type weapons. Using spherical coordinates it is also clear that aiming with the correct angles in all those angle-based coordinates has exponential difficulty as well.

The best weapon might be Sakuya's ability of freezing time because time as an extra dimension is independent of the space dimension so it works equally well despite the change in space...but well I am not a resident of Gensokyo so I'd better leave the problem to them...

## Tuesday 4 April 2017

### Two game mechanics

Great game follows from small details and smart mechanics.

As always, game mechanics are great source of giving interesting mathematical questions. Here are another two short examples on games that I've been following.

As a hardcore Nintendo fans this is probably a must, especially when the game is now full of GBA-era characters replenished. Without much money and effort I managed to score 4200~4400 per week in the arena, but this is not what I want to talk today. It is the summoning mechanism that caught my eye --- to be honest the summoning mechanism is quite special as a Japanese game because that can be treated as an attempt to adopt western consumption behavior on gaming, rather than the eastern elitism style, but such

Let's talk about simple probability. This is the (simplified version of) FEH's summoning mechanism:

- You spend 20 orbs to summon 5 heroes/cards (a complete summoning).

- By default, there will be a 6% chance of getting a 5-star (5*) hero.

- If you get no 5* heroes after a complete summoning, the chance for 5* is raised by 0.5%.

- The chance restores to 6% if a 5* hero is summoned.

- The chance only change after a complete summoning.

- Assume everything else to be independent.

Now the interesting special rule: if you get no 5* in 24 complete summonings, you will automatically get 5 5* heroes in the 25th summoning (i.e. the chance become 100% rather than 18%). The question is, why 24? A simple calculation reveals the truth:

Chance of getting 5 5*s under default chance = 0.06^5 = 0.0000007776 = 7.77*10^-7

Chance of getting 5 5*s via the special way = product (i=0..23) (1-(6+i/2)/100)^5 = 2.79*10^-7

That says, both ways getting 5 5*s in a single summoning process are of equal magnitude in terms of probability! It is quite clear that the chance varies exponentially if we change 24 to something else, so that is quite a slick design that gives mathematician a smile on his face.

I am recently sticking to another Japanese baseball android game, in which has an event where each team is assigned into a group of 5 every day. At the end of the day the rank is calculated and points are given to the team accordingly. At the end of the event (10 days, i.e. 10 rounds) the overall team rank is decided by the total points.

That reminds me of the guild battles from Fantasica -- the old good days where a team of 9 players around the world commit in 35 real time battles, each lasting 1 hr in 7 days that takes numerous hours of preparation work and probably thousands of cash -- that has a very similar system. Each round you fight with another guild and the total victory count determines your rank. The common feature between the two is that, your next opponent depends on your current standing and will not be someone that you have fought before.

Depending on your goals, it has been practically shown that in Fantasica there is a range of standing (typically the mid-high range) that can be achieved by lying dead in the first few battles despite random-ish weak opponents, because you can meet fewer top teams (hence less guaranteed defeat) by doing so.

The core principle in guild battle events --

The question here is, does it work for such system where you are assigned into groups of 5 instead of 2? It is foreseeable that if you always group all top teams together you will be running out of top teams very quickly. Another question is if we alter the matching algorithm will it be cheat-free? At the end of the day, we want to distinguish those heavy spenders (top 5-10), light spenders (top tier) and heavy free players (mid-top) while minimal players are not too important to game revenue. With 35 turns, Fanta somehow (but not quite) managed to put mid-top players to where they should have been, but the sinking phase is still a bit too short.

Here the dev solved this problem by matching 5 teams, each with some distance on the rank but not too far away, ranging from top teams to mid table teams. Each round can be deemed as battling with 4 other teams at the same time: finishing second in the day implies you won against the 3 lower teams and lost against the top team. By such the converging can be done even quicker than the Fanta system. It's also cheat-free in the sense that you are battling with teams of the same tier every round that you don't have much space to lose.

But that's only my prediction -- no one knows how the system exactly works and I doubt if this is systematically studied in this game given its competitiveness, but I look forward very much to those post-event statistics.

*

As always, game mechanics are great source of giving interesting mathematical questions. Here are another two short examples on games that I've been following.

__Fire Emblem Heroes__As a hardcore Nintendo fans this is probably a must, especially when the game is now full of GBA-era characters replenished. Without much money and effort I managed to score 4200~4400 per week in the arena, but this is not what I want to talk today. It is the summoning mechanism that caught my eye --- to be honest the summoning mechanism is quite special as a Japanese game because that can be treated as an attempt to adopt western consumption behavior on gaming, rather than the eastern elitism style, but such

*qualitative*topic does not fit this entry as well.Let's talk about simple probability. This is the (simplified version of) FEH's summoning mechanism:

- You spend 20 orbs to summon 5 heroes/cards (a complete summoning).

- By default, there will be a 6% chance of getting a 5-star (5*) hero.

- If you get no 5* heroes after a complete summoning, the chance for 5* is raised by 0.5%.

- The chance restores to 6% if a 5* hero is summoned.

- The chance only change after a complete summoning.

- Assume everything else to be independent.

Now the interesting special rule: if you get no 5* in 24 complete summonings, you will automatically get 5 5* heroes in the 25th summoning (i.e. the chance become 100% rather than 18%). The question is, why 24? A simple calculation reveals the truth:

Chance of getting 5 5*s under default chance = 0.06^5 = 0.0000007776 = 7.77*10^-7

Chance of getting 5 5*s via the special way = product (i=0..23) (1-(6+i/2)/100)^5 = 2.79*10^-7

That says, both ways getting 5 5*s in a single summoning process are of equal magnitude in terms of probability! It is quite clear that the chance varies exponentially if we change 24 to something else, so that is quite a slick design that gives mathematician a smile on his face.

__A round robin league__I am recently sticking to another Japanese baseball android game, in which has an event where each team is assigned into a group of 5 every day. At the end of the day the rank is calculated and points are given to the team accordingly. At the end of the event (10 days, i.e. 10 rounds) the overall team rank is decided by the total points.

That reminds me of the guild battles from Fantasica -- the old good days where a team of 9 players around the world commit in 35 real time battles, each lasting 1 hr in 7 days that takes numerous hours of preparation work and probably thousands of cash -- that has a very similar system. Each round you fight with another guild and the total victory count determines your rank. The common feature between the two is that, your next opponent depends on your current standing and will not be someone that you have fought before.

Depending on your goals, it has been practically shown that in Fantasica there is a range of standing (typically the mid-high range) that can be achieved by lying dead in the first few battles despite random-ish weak opponents, because you can meet fewer top teams (hence less guaranteed defeat) by doing so.

The core principle in guild battle events --

**rise fast, sink slow**. You quick edge towards the top by defeating consecutive weak opponents then get crushed by top opponents, but your rank drop slowly because everyone of the same tier is taking defeats at the same time as well.The question here is, does it work for such system where you are assigned into groups of 5 instead of 2? It is foreseeable that if you always group all top teams together you will be running out of top teams very quickly. Another question is if we alter the matching algorithm will it be cheat-free? At the end of the day, we want to distinguish those heavy spenders (top 5-10), light spenders (top tier) and heavy free players (mid-top) while minimal players are not too important to game revenue. With 35 turns, Fanta somehow (but not quite) managed to put mid-top players to where they should have been, but the sinking phase is still a bit too short.

Here the dev solved this problem by matching 5 teams, each with some distance on the rank but not too far away, ranging from top teams to mid table teams. Each round can be deemed as battling with 4 other teams at the same time: finishing second in the day implies you won against the 3 lower teams and lost against the top team. By such the converging can be done even quicker than the Fanta system. It's also cheat-free in the sense that you are battling with teams of the same tier every round that you don't have much space to lose.

But that's only my prediction -- no one knows how the system exactly works and I doubt if this is systematically studied in this game given its competitiveness, but I look forward very much to those post-event statistics.

*

*3 April, 2017*
Subscribe to:
Posts (Atom)