Friday, September 18, 2020

Opening day of Violet Evergarden the Movie


Violet Evergarden the Movie (劇場版 ヴァイオレット・エヴァーガーデン) opened in the cinemas today. Hurray! Finally! As expected, it brought a close to the story of Violet and Gilbert. And I cried so many times during the 140 minutes of airing I lost count.

I caught the lunch show, and even though it was a weekday (okay, Friday), the theatre was full. Wow. The audience were all adults, even senior citizens. No students since it was still school time. But Violet's story draws a crowd of all ages.

I will be catching it again tomorrow. The cast will be appearing for a post-movie greeting session that will be broadcast to other theatres. I don't have tickets to that actual session, so I will have to be satisfied with the broadcast at the local theatre.

Oh, director Takemoto Yasuhiro is listed in the credits as a supporting staff of the movie. I can't be sure but I think other KyoAni staff who were victims of the 2019 arson attack may also be listed in the credits. It is nice to see them being honoured in KyoAni's works, but since the movie was slated to air in January this year, most of them were probably involved in the production when the attack happened.

Also, there is a final cut after the credits finish rolling.

I will probably write my full thoughts tomorrow after catching it a second time.

Update: My review of Violet Evergarden the Movie (2020) can be found here.
 
Events:
 
Translations of short stories:
Gilbert Bougainvillea and the Fleeting Dream (unofficial translation of "ギルベルト・ブーゲンビリアと儚い夢")
The Starry Night and the Lonely Two (unofficial translation of 星降りの夜とさみしいふたり)
Diethard Bougainvillea's If (unofficial translation of ディートフリート・ブーゲンビリアIf) 
The Tailor and the Auto-Memories Doll (unofficial translation of 仕立て屋と自動手記人形)
Laura and the Auto-Memories Doll (unofficial translation of ローラと自動手記人形)
Flowers and the Auto-Memories Doll (unofficial translation of 花と自動手記人形)
 
Tellsis (Nunkish) translation:
Last line of Violet's final letter to Gilbert
 
Insights on the movie:
 
Audio commentary notes:
 
 
All posts related to Violet Evergarden.

Wednesday, September 16, 2020

Can we control self-learning AI?

AI Houkai (AI崩壊) is a movie about an AI system that was embedded with code that triggered it to run amok, screening people based on various attributes to decide who should live and who should die.


While this is a movie, I think the writer has done quite some research into recent deep learning techniques, so it is somewhat an accurate portrayal of how AI works. But I won't go into the technical details since picking at a movie for technological accuracy isn't what this post is about. Rather. I want to talk about one question in my mind: can we control a self-learning AI?

Currently, self-learning AI is limited to certain specific tasks. In general, a self-learning algorithm is programmed to learn a certain task using training data provided. This is already "old" technology; we have such self-learning AI that has become quite adept at recognising pictures and such.

The next step is transfer learning, where certain aspects of knowledge obtained from learning one task is then retained by the AI to help it learn another task in a shorter time. This is also something that has been somewhat achieved. There is then one-shot learning, where AI is able to learn something just from a single instance.

And finally, a generic AI that is able to learn and do anything, similar to humans. Like Alice in SAO.

The steps are similar to how a human baby grows into an adult. A baby starts by learning simple tasks, like how to crawl, then walk. How to make certain sounds, and eventually stringing those sounds into words, then sentences. It then learns how to talk while walking, and learn more things like how to read. As a human being grows, it learns to read, then applies that skill to learn mathematics, science, other languages, work skills, and so on.

And therein lies the problem. Parents all know we cannot control our children. They eventually grow up with minds of their own. And if a generic self-learning AI is anything similar, we will eventually be unable to control what it learns on its own. This presents a problem because, unlike traditional programs where instructions are hard-coded, self-learning algorithms are a set of initial instructions that grows even more complex as it learns. It may even eventually be able to write its own expansion code to allow it to do new things that it has learnt.

It means that a generic self-learning AI may grow into something that we cannot control, just like our children. For example, we have already seen how AI has unknowingly picked up racism because it was trained on real-life data that was biased against people of color. Or how it screened out women from recruitment because past data used for training were mostly men. These were unintended outcomes based on using real-life data. Imagine a self-learning AI that has access to more real-life data; how do we control what it learns from that training data? A large amount of training data is necessary for accurate learning, yet producing such quantities of data is difficult. Policing the contents of such data is even more difficult.

And who decides what goes into training data and what does not? This will eventually become a question of ethical values and even ideology.

We want computers to learn on their own instead of being told what to do. But given that we have education ministries and other such agencies that set learning curriculum for our children, we should also have similar agencies that set standards for the training of self-learning AI.

Otherwise, we may one day develop an AI that eventually learns on its own to decide that human mortality is a weakness, and such "inferior" beings are to be culled to prevent waste of resources...

Tuesday, September 15, 2020

Portraying the everyday things in touching ways

Watching movies, drama series, and anime, I came to realize how difficult it is to portray the everyday things in touching ways. Not many people attempt to do so because it is so difficult, and even fewer actually succeed.

In theatres and TV, the love stories are dramatic ones that are usually not what one would term "ordinary". A student and teacher falling in love with each other (like Chugaku Seinikki, Majo no Jouken, even Return of the Condor Heroes). Siblings who are siblings by law (marriage between parents) but not by blood falling in love with each other (think Domestic Girlfriend, and also Omoi Omoware Furi Furare). A girl with a terminal illness in love with a quiet and shy boy (Your Lie in April and I Want to Eat Your Pancreas). A school dropout falling in love with a NEET (Sing "Yesterday" for Me). It is so much easier to use such unique settings to manipulate emotions.

But a boy falling in love with his classmate (like in Tsuki ga Kirei), a boy in love with his childhood friend and neighbour (like in Tamako Love Story), or even four girls forming a band (K-On!) do not have any unique twists to their relationships. And it is a testament to the skills of their directors and production staff to be able to portray these everyday things and stories in ways that touch us.

The ordinary stories are the simple ones, but they are also the easiest for us to relate to. And at the same time, because there is nothing special about them, they are also the most difficult to portray as a movie or TV series. Yet if done right, they can also be the most memorable.


Monday, September 14, 2020

Living with sentient AI in the future



In episode 22 of SAO Alicization: War of Underworld, Alice was finally brought into the real world with a physical body that allows her to interact like any other human being. And part of the story involves the rights that should be given to sentient AI like her.

Personally, I think it is quite a heavy theme to explore for a light novel (or its anime), but it is also visionary. One day, decades into the future, we may be looking back at SAO and thinking, wow, a light novel explored the theme of "human" rights for sentient AI.

If sentience is what sets us apart from the rest of the animal kingdom, then how do we define sentience? What does it mean to be sentient? And are our rights as human beings tied to our sentience? If so, when we do create AI that meets our definition of being sentient, are they to be accorded such rights too?

Alice's exchange with the reporter that asked to see her fluctlight to prove her artificiality with an answer to see his brain to prove his "humanness" was plain witty. Marriage and reproduction between humans and AI are a bit too farfetched, though. But who knows? Maybe we (or our AI creations) will eventually invent technology that can bridge the gap between human and AI.

Hopefully, we will not be shortsighted like the Europeans during the Age of Exploration, enslaving Africans and denying them their rights. Those who deserve the same rights as everyone else will eventually demand them; the streets of the United States today shows what can happen if we do not accord them their rights. I don't think it is too early now to start thinking about what is it about us that makes us deserve our rights. Because when we eventually create sentient AI, we better know how to explain what sets us apart so that we deserve special rights. Or admit that we have created something that has met the criteria and should be given the same rights as us.

Because an AI uprising is going to look very different that what is happening in the United States now.

禁罪痛醉

禁禁禁
罪罪罪
痛痛痛
醉醉醉

Thursday, September 10, 2020

"Mulan" boycott due to filming in Xinjiang


When I read this news article, I really had mixed feelings. While I understand the power of boycott as a way shape behaviour, I have doubts about the standards to be applied in the use of boycotts.

Do we boycott something because it portrays a concept or ideology that we are opposed to? Or because it is made by people with beliefs that are different from ours and we are not able to accept those beliefs?

If we boycott Mulan because a part of it was filmed in Xinjiang, then do we also boycott all those other countries with poor human rights records? If so, we won't be watching anything filmed in the Middle East. We won't even be watching anything filmed in Singapore, since Singapore still has many laws that can be considered authoritarian and discriminatory.

The United States has done quite some questionable stuff in its wars too... does that mean we boycott films that were made in the United States? At this rate, all movies will need to be filmed in the Antarctic since that seems to be the only place which may not have any human rights violations.

Amazon has a poor record of how it treats its warehouse staff. Where is the call to boycott Amazon? How about the monopolistic behaviour of Apple in the way it treats those who try to distribute software through the Apple App Store? Are we going to boycott Apple too?

Where do we set the standard?

Or are people calling for the boycott of Mulan because Disney had the audacity to cast an Asian female lead? Not a surprising move from a nation of white supremacists... but that is treading into the area of conspiracy theories. And I am not Trump.

Wednesday, September 09, 2020

The military is (usually) not a warmonger


Accusing the military of wanting to fight wars shows a lack of understanding about the military.

Having been in the military, I can say that people who are in the military usually do not want to fight wars. First, they can die. Second, they know that others can die. And part of military training includes seeing the destruction that weapons can cause. This knowledge of the damage is a huge deterrent.

It is usually the politicians, safe in their homes, that think about using the military as a tool for their policies. Those politicians who recognise the nature of war are usually more reluctant to use military force. But there are also politicians who are more willing to use military force, either from a lack of understanding about what military force entails, or because they are able to justify to themselves that the political gains outweigh the damage and suffering caused by military force.

No, it is not the military that wants war.

Tuesday, September 08, 2020

China's exports rise


As the rest of the world struggles with their economies amid measures to stop the spread of COVID-19, China seems to be doing much better. While life is not the same as before COVID-19, factories are reopening and people are getting back to work. So much so that Chinese factories can produce enough things to raise its exports to level higher than before COVID-19. Well, a significant portion of those exports are for medical equipment and related products due to demand arising from COVID-19. Still, it is like after the Lehman Brothers bankruptcy. While the rest of the world struggled with a recession, China managed to stay in the black back then, and seems to be doing so now too.

Why?

I think it is because the entire legitimacy of government in China stems from the concept of the Mandate of Heaven. The people in power are placed there by Heaven because they benefit the rest of society. When those in power are unable to do so, Heaven removes them and replaces them with someone else. In Imperial China, this was a bit more challenging since power is handed down within the family dynasty, which means power can get passed down to people within the family that are incapable of bringing the same benefits to society. And that is why dynasties failed and got replaced.

In China today, it is different because power not longer gets passed down within the family. The "dynastic family" today is the entire CCP, which is much bigger, and therefore has more potential for developing capable candidates for future party leadership. So as long as the CCP continues to develop capable potential leaders, it will continue to have people in power who can bring benefit to society. This will allow them to retain the Mandate of Heaven within the party, providing them with capacity for leadership development. This can become a virtuous cycle if done right.

It is the broad concept of the Mandate of Heaven. Those who serve society will receive the Mandate of Heaven; those who do not will have the Mandate given to someone else who will. While it is a simple concept, this simple concept is very ingrained in the Chinese identity, and thus, as long as the CCP continues to deliver economic success, it will remain in power.
 
I think it serves as insight on how to deal with China on the international stage. China's actions will be rooted in its internal policies for bringing economic well-being to its people. Its external actions outside its borders will be based on this basic internal goal. Once we understand the basic motivation behind China's actions, we can then work out our own strategies on how best to get China to act in ways favorable to ourselves.

The appeal of Suga Yoshihide

After Abe announced that he will be stepping down as PM of Japan, his Chief Cabinet Secretary, Suga Yoshihide, garnered the most support among LDP Diet members as the person to take over from Abe.

In a political landscape that is heavily influenced by factions within the LDP, Suga does not belong to any faction. He has previously expressed that he is not an advocate for the idea of factions within a party. Yet he looks set to be Japan's next PM due to support from various factions within the LDP. Why?

I think his appeal is his non-factional identity. No faction within the LDP wants to lose to another faction. In normal times, when party leadership is determined by votes from the party's Diet members as well as party representatives nationwide, factions, no matter their size, can get votes from those party representatives outside the Diet. This allows them to contest for the top spot using votes from non-factional party representatives.

But this time, due to COVID-19, it is not feasible to carry out a nationwide party vote. Votes will be limited to LDP Diet members and certain representatives. The excerpt below explains this best.

Under party rules, presidential elections are decided by 788 votes split evenly between LDP Diet representatives and party members across the country.

However, things are different in the event of an emergency, such as a resignation. In these cases, Diet members and representatives from prefectural party chapters are able to vote at a general meeting of lawmakers from both houses. A total of 535 votes are contested, including 394 from Diet members and 141 from representatives of prefectural chapters. A party member vote is not required.

This means that Diet member votes will account for more than 70% of the vote, amplifying the importance of party factions.


I think it is precisely because of the importance of party factions this time that Suga is seeing such widespread support. Why? He does not belong to any faction, which means it is easier for factions to support him over a rival faction. In a way, the enemy of my enemy (Ishiba Shigeru is not the most liked person within LDP Diet members, for various reasons...) is my friend. Without 253 non-factional votes this time, it is harder for any faction to gather enough votes to emerge at the top. It is also why Ishiba keeps stressing that there should be a nationwide vote. He knows that his faction is not a large one, and needs those outside votes if he is to win. Pushing his current narrative helps him in two ways: if he gets his way, he can try to garner enough votes for a win; if he does not, he can always undermine the legitimacy of Suga subsequently by saying that Suga got the post in an unconventional (rigged?) way.

It looks like Suga is on his way to the top spot. What remains to be seen is whether he can keep his post next year, since this time, the term is a special one for a year.

Monday, September 07, 2020

Bash script to clean up filenames

I was looking for a way to clean up filenames. Basically, remove a certain string from all files. After spending like five hours searching the Internet and trying different things on my own while learning (a bit) about Bash, I think I have something.
 
cleanname.sh
============
#!/bin/bash
OIFS="$IFS"
IFS=$'\n'
if [[ "$1" == "t" ]]; then
  for filename in `ls | grep "$2"` ; do echo mv \"$filename\" \"${filename//$2/}\"; done > rename.txt
elif [[ "$1" == "c" ]]; then
  for filename in `ls | grep "$2"` ; do echo mv \"$filename\" \"${filename//$2/}\"; done
elif [[ "$1" == "x" ]]; then
  for filename in `ls | grep "$2"` ; do echo mv \"$filename\" \"${filename//$2/}\"; done | /bin/bash
else
  echo "Usage: cleanname.sh <c|x|t> <string>"
  echo " where c for check"
  echo " and x for execute"
  echo " and t to output check results to file rename.txt"
fi
IFS="$OIFS"

Basically, the first parameter is a command to either print out the mv commands that will be used or to actually execute the commands. It is recommended to ALWAYS check the commands first before executing. The commands that will be execute are piped to the screen or to rename.txt. The second parameter is the actual string to remove from the filenames. Use quotes to enclose the string if it contains more than 1 word or has special characters like commas.

The variable IFS is usually space, table, and newline, but in order for the for loop to work properly, it needs to work only on newlines, which is why IFS is changed at the start of the script, and reverted to its original value at the end.

Fate/stay night: Heaven's Feel movies

A trilogy of anime movies were made by ufotable to depict the Heaven's Feel story arc of the Fate/stay night visual novel. The movies are:
Fate/stay night: Heaven's Feel I. presage flower
 
Fate/stay night: Heaven's Feel II. lost butterfly
 
Fate/stay night: Heaven's Feel III. spring song


Having finally watched all of them, I must first admit that ufotable does an incredible job with its stunning CG animations of epic fight scenes. This trilogy of movies is no exception. But the movies seemed to be a bit rushed. Certain portions were skimmed over, and maybe even outright cut. For example, in presage flower, the opening was like a mosaic of the initial events leading to the start of the Holy Grail War. For those who have watch previous Fate/stay night adaptations, this is not much of an issue. But for those totally new to this franchise, this is necessary background to introduce how Shirou and Rin ended up teaming together.

The ending of spring song was also somewhat glossed over, with very little amplification about how Shirou came back. It was a series of stills and for those without prior knowledge of the series, it is going to be challenging (or even impossible) to figure out what happened.

I guess it can't be helped. Fate/stay night has three main story arc; the one for Saber, then Unlimited Blade Works, and Heaven's Feel. The first two arcs were adapted into anime series each running for two cours (around 25 episodes in total), which translates to around 8.5 hours of screen time. Using three movies (total screen time around 6+ hours) to depict another full story arc is going to be challenging. Shortening the background is acceptable if it is made known that the viewer needs to have seen Unlimited Blade Works (adapted by ufotable). But skimming through the ending leaves a lot of open questions, since the ending is not addressed in the other two arcs. Adding maybe another 10 minutes to work through the ending might have made it easier for those new to Fate/stay night to understand what happened in the end.

So for those who are going to watch this trilogy, I would suggest watching ufotable's adaptation of Unlimited Blade Works first, just to get the background. As for the ending, you will need to read up on Wikipedia to fully understand what the series of stills was trying to say.

Sunday, September 06, 2020

Japan may build ships solely for missile defence


When I read this article, it seemed to be a very poor decision to me.

Yes, if you cannot put the missile defence system on land, putting it at sea is a viable alternative. And yes, building a ship purely for missile defence will be cheaper than building a multi-mission Aegis destroyer, IF you look purely at the shipbuilding cost itself.

But ships are not a one-off expenditure. They have a life cycle of 20 to 30 years, during which they need to go for regular maintenance. More importantly, they need to be manned. Training people to man these ships, and rotating the crew, is not going to be that much different from manning regular ships. Which means personnel-related expenditure (pay and training) will likely be similar to those for other ships as people will be rotated between these specialised ships and the other ships in the JMSDF.

So on paper, it looks like a good idea. But when you look beyond the ship itself and think about the entire system required to sustain these specialised ships, the actual costs involved may not be much more different than getting regular warships equipped for a wider range of missions.

Let's think about things as a system instead of specific hardware.

Typhoon Haishen is unpredictable

Typhoon Haishen, (TY 2010, because it is the 10th typhoon of 2020) has just passed Okinawa and seems to be headed for Kyushu before moving toward the Korean Peninsula. It is predicted to bring extremely severe winds and rains and waves to the affected regions.

When Haishen was about to form, I watched the news show an ocean surface temperature chart and thought, "This is going to be bad. The entire region to the south of Japan is showing much higher ocean surface temperature, making it an excellent breeding ground for typhoons." And before we knew it, Haishen has formed and is proving itself to be of a scale that has not been seen for decades.

What really worries me about Haishen is that, because it is of a scale unseen for decades, we actually do not have sufficient past data to accurately predict its path. So while the current forecast says it will pass through Kyushu before heading to the Korean Peninsula, it may also recurve more and head toward Honshu instead. Especially because the entire region is a typhoon breeding ground, Haishen can gather a lot of energy while recurving. If it does recurve significantly, it may make landfall in the Kii Peninsula instead. That would be bad news for the Osaka region, the entire Shikoku (which will be in the path before landfall), and even the Kanto region will be affected by severe winds (and rains and waves).

Furthermore, the slow speed of the typhoon means that is lingers over a region longer, allowing it to do even more damage than a fast-moving one. And also more time to gather energy if it lingers over the ocean longer. And more likely to recurve.

So I am going to keep a close watch over the news, in case it starts to recurve. Because when it does... I will need to start making preparations to weather it.

Update: As of 062000i Sep 2020, Typhoon Haishen is near the southern end of Kyushu, heading northerly and likely to pass to the east of Kyushu proper. It is thus unlikely to recurve toward Honshu.

Saturday, September 05, 2020

Two weeks and still not much news

Violet Evergarden the Movie is opening in theatres on September 18, which is less than two weeks away. Yet there is still very little news about what the story will be about. I mean, we all know it is about Violet Evergarden; her name is in the movie title. But what else? Even the trailers that are out (showing in theatres now) don't reveal much.

I did not see any movie pamphlet today too when I went to the nearby theatre. The suspense is killing me. It is like KyoAni is saying, "Trust us, you don't need to know what it is about, you will enjoy and love it when you see it." 😄



Friday, September 04, 2020

Enhancing videos with Video2x

For those who are interested in enhancing upscaled videos, there is a tool known as Video2x that uses machine learning to "fill in the gaps" when upscaling. There are releases for Windows but getting it to run on Linux was actually much easier than I thought.

First, there is always the docker option. You can find instructions here from the repo's wiki page. I shall not touch more on this because it is actually quite straightforward.

I followed the instructions here to get it running on Linux Mint 20.

The first step is to clone the repo.

git clone https://github.com/k4yt3x/video2x.git
cd video2x/src

Video2x requires Python3 and FFMPEG to run. Python should already be on your system, but FFMPEG can usually be installed by
sudo apt install ffmpeg
on Debian-based systems.

Then, install the require Python libraries.
pip install -r requirements.txt

The tricky step is finding the drivers to install. Of the various drivers that Video2x supports, I found precompiled binaries for waifu2x-ncnn-vulkan and srmd-ncnn-vulkan. Download the precompiled Linux binaries from their respective release pages, then uncompress the folders. I renamed the folders to waifu2x-ncnn-vulkan and srmd-ncnn-vulkan respectively and place them in a dependencies folder inside video2x/src.

This is actually all you need to get started. Then, just run
python3 video2x_gui.py
to start up the GUI. You will need to go to the Drivers tab to select the path to your drivers, and the FFMPEG tab to tell it where to find ffmpeg. This needs to be done each time... so the better way is to edit video2x/src/video2x.yaml with the respective paths, like below.
 
waifu2x_ncnn_vulkan:
  path: 'dependencies/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan'


srmd_ncnn_vulkan:
  path: 'dependencies/srmd-ncnn-vulkan/srmd-ncnn-vulkan'


ffmpeg:
  ffmpeg_path: '/usr/bin'


(Without leading slash, the path is taken as a relative one; the leading slash makes the path an absolute one.)

Then, Video2x should be able to find the drivers and ffmpeg executable each time without problem.

Video2x is not... super great on generic videos, but the results are much better than using the various upscaling/denoising tools in FFMPEG. It works best on anime since that was what the waifu2x driver was originally developed for. Video2x can be very slow, though. A 1080p video gets processed at about 2 seconds per frame... so any full-length movie will take days to process. Upscaling a 55min video from 720p to 1080p took me around 11 hours...

By the way, to use Nvidia GPUs, you will need to install CUDA and cuDNN for your system. I can't really give much advice on this... it was a struggle for me to get them installed on my current build (Linux Mint 20 on Ryzen 3600 with GTX 1660 Super). Those running Ubuntu probably have it easier, so if you are going to build a PC just for such work, I highly recommend installing Ubuntu instead.

Update on 7 Sep 2020: Dandere2x looks promising too, but I have not been able to get it to work. Keep getting broken pipe errors. I think it has to do with PIL and Pillow (I think I somehow managed to get them both installed, and they could be interfering with each other). Anyway, if I find the time and motivation, I will see if I can get it to work.