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.

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

Thursday, 9 March 2017

09-03-2017

十年了呢。

6/3/2007 - 6/3/2017

從單純的分享短片和文章到寫自己的筆記和小說,我在這十年裡面發了大約七百篇東西。當然每一篇的價值各有高低:有些比較用腦、有些比較費時、有些就是單純的轉貼而已。以下是一些節綠和感想:

筆記:我成績進步就是從整理筆記開始的。堂上抄下來的總是帶點雜亂,整理一次剛好可以理順各種疑點也可以找出自己的不足。現在看回去的話其實自己整理筆記的能力還有很大的進步空間--可能是關鍵字使然一篇中史筆記成為了這裡人氣最高的其中一篇。不過當你按一看進去就會發現根本只是一堆史實嘛!文科就是這樣:光知道事實是不夠的,將事實整合起來分析對比才是關鍵。如果我還能再寫十年的話結合自己的文史根基鍛練自己的文筆或許是努力的方向之一吧。

數學筆記:這方面其實沒有太花腦力,倒是要想一些有用的範例比較耗神。很多篇的靈感都是從日常生活和接觸到的東西而獲得的:同學/學生問的問題、舊試卷、奧數、新看的書……每一篇除了可能給不知道存在與否的讀者帶來啟發外也給我帶來了不同角度去處理問題的機會。雖然以我現在研究的方向要寫出類似程度的內容不太容易,不過靈感來的時候還是擋不住--最近用線代做實分析那篇就是個很好的例子。

隨著你在大學深入鑽研一個課題,你對基礎的東西理解也會更深。線性代數的舖排一直是近代數學教育家分歧比較大的議題:不同學系的學生對線代有/需要不同的解讀方式,學生的程度則限制了部分的舖排方式。我自己寫的筆記裡面偏好的是純代數的舖排,而且盡量搭上每項工具的幾何意義。無何否認地這種玩法對學生能力要求比較高,但是我覺得至少對數學系的學生來說一個帶有以嚴謹證明築構出來的核心內容的基礎課程是有必要的。這份筆記到現在無論對我來說還是我回答學生疑問時都給予了一定幫助。

隨筆/作品:就是比較輕鬆的作品。當我檢閱這個標籤時發現很多都是旅遊筆記,不過這也不是一件壞事:因為這恰好證明了自己的旅途並不沉悶,充滿了值得書寫的故事。有趣的是與大多數人不同,我單獨出遊時未必對大部分人感興趣的景點感興趣,反而很喜歡找家出名的咖啡店享受一杯用心調出來的咖啡或者一份本地的甜點,然後觀察窗外(匆匆而過的)行人及其點綴的城市。花上幾小時和異地的朋友天南地北的聊也是我每次出游必做的事,因為正是這些人構成了他們的文化和國家,然後才有了(人工)景點。可以在世界各地找到知音人聊天,應該算是自己的福分吧。

我一直覺得自己寫了很多異想天開的東西,卻沒一個可以好好收尾的。我一直有寫長篇小說的夢,不過果然還是從短篇開始寫起比較好吧?

電腦/遊戲:算法(algorithm)的話先歸到數學那邊,這裡講的是一般的網絡觀察和遊戲心得。遊戲心得並不是一般的攻略(嘛,無論是2007還是2017,將攻略口耳相傳的年代已經過去了;在2017獨立的攻略網也成為了過去式;剩下wikia結構和門戶式大型綜合論壇的世界實在有點單調呢)而是結合自己對數學或是人文的理解所做出的宏觀預測。這種我從小學時代就開始做的事到現在還是滿有趣的,可惜之後的十年可以玩的時間肯定比以前少了吧……以下是幾個我用心肝過的網遊

新絕代雙嬌Online (2005-2009)
到現在還會偶而上,但是轉回新斷線把公會搞散後也沒動力肝了。不過有幾位好友到現在還會聯絡。
Ogame (2008-2009)
就……一款很現實很殘酷很耗肝的遊戲,到頭來還是一場空。
Osu! (2008-)
無須多言,可以參考上方的Osu!頁面。在這裡學到很多東西,不單是樂理,更多是做人的技巧--管理、溝通、協調的技巧。還有很多大概是一輩子的朋友。
Fantasica (2012-2015)
一個用肝和用錢打都可以打出一片天的遊戲,極為多元的玩法和自由交易將這個遊戲的吸金能力推到極致;我在這裡認識的人和Osu那邊的熱血青年們稍有分別,但一樣都是值得深交的朋友。
Quiz.「黑貓」.RPG (2013-2017)
剛倒閉。益智養成的先驅,夠大的故事觀和高質日系畫風都相當吸引,可惜英文版實在做不起來。
地城戰棋 (2015-)
休閒玩?比起上述遊戲遠未到要肝的程度。

運動:顯然地我是車路士(Chelsea)的球迷,不過棒球可以算是我一直有興趣看的第二運動。從小時候的超棒球外傳到甲子園(或者各種類似甲子園式的高校競技)相關動畫到種花職棒網上開始直播,我終於將棒球納入我生活的一部分。在我執筆之時台灣種花隊正和韓國隊8-8平手,希望種花隊今晚不用吃鍋貼吧?………吧?

(EDIT: 無生還啊無生還,讓我們一勝也不行?)

*

我真的沒想過這裡可以堅持十年(另一邊廂xanga倒下了又以另一形式復活過來……透過我朋友之手),但是希望接下來十年我都可以透過這裡和大家再會 :)

Forretrio / Chris
9th Mar, 2017