Author Archives: Liyun

About Liyun

M.Sc. Economics from Barcelona Graduate School of Economics.

An efficient way to give gifts in Stardew Valley

I was playing Stardew Valley recently... well, it consumed much of my weekends...

In the game, the player has to give gifts to all villagers to keep a good relationship with them. There is an official page displaying each one's preference, wiki. However, my life will be much easier if I can minimize the amount of distinct gifts I carry every day. When there is an optimization question, there is an analytical solution 🙂

My approach:

Use wiki's data as input, then identify the items that are favored by more than one villagers, and easy to obtain regardless of the season...as a result, I can arrange production and carriage easily and efficiently.

Output:

A network graph that shows how villagers are connected by gifts.

screen-shot-2016-11-06-at-6-52-54-pm

Source codes:

Original dataset:
sheet-1-table-1.csv

Vector graph output:
svgift.pdf

My Second 600 KM

Ever since I first drove 600 KM in a day by myself, I never tried to drive that long again. Finally, it happened. Last weekend I had to drive 600 KM, for the second time in life.

The route was a loop starting from San Jose, then Monterey, then through 17 mile to Carmel, then down south to Big Sur and Hearst Castle, and finally drive back via 101.

Screen Shot 2016-02-29 at 10.53.52 PMWe were fortune enough to see the fog disappears in 17 mile. Everything happened in a sudden; dynamic.

DSC04474Then a front page photo of the famous tree in 17 mile.

DSC04553We saw three happy (or scared) rabbits... near the concrete bridge.

DSC04571

Sharp cliff and sapphire blue sea.

DSC04592

Sunset Near the Hearst Castle.

DSC04659

DSC04651

Random Discovery from the City Lights, San Francisco

Having heard about the City Lights bookstore for a while, finally I got an idle afternoon to check out this cultural place. It was impressive that how the store encouraged people to read -- signs saying "have a seat + read a book" were everywhere.

I went to the poetry room and found a seat in the corner. The room was very quite in the afternoon with a ray of sunshine coming in through the window. Everything was just perfect to have a seat and read. So I picked a book randomly and started to read. I was expecting to read a poetry book but it turned out that the book was actually about Afghanistan -- stories about Afghanistan behind a collection of lansays. The name of the book was I Am the Beggar of the World: Landays from Contemporary Afghanistan.

I was more interested in reading and feeling the stories. To be honest, I only had limited knowledge of the middle east (or the West Asia), in spite of a fortunate trip to Israel this summer. When thinking about Afghanistan, my reactions were the American-Taliban war, withdrawal of American armies from Afghanistan, and some pieces of memories on the sharp contrast of Afghanistan in 50 years ago v.s. today. The book records some real stories in Afghanistan -- sex, rape, slave, war, marriage, family, exchange, education. Some brutal stories happened simply because people had no other choice. A vivid example is women's roles in a family. In the early days, women were responsible for bringing drinkable water to the family, and at that time they used containers like jugs to carry water from rivers to their houses. Recently, some families started to dig deep well to extract water directly from the underground so women no longer had to go out and carry water back. The interesting part was that because of the risk of rape and kidnap, women were not allowed to go out if not necessary, then it became hard for young girls to meet young boys. As a result, young people had fewer chances to meet each other. This side effect makes it harder to judge whether that technology improvement was good or bad; however, the wide applications of Internet (e.g. facebook) have significantly and positively impacted people's lives, as this lansay shows.

IMG_3319

Continue reading